gv-3.7.4/0000775000076400007640000000000012121323370007146 500000000000000gv-3.7.4/lib/0000775000076400007640000000000012121323370007714 500000000000000gv-3.7.4/lib/sys_time.in.h0000664000076400007640000000540511735103745012266 00000000000000/* Provide a more complete sys/time.h. Copyright (C) 2007-2011 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Paul Eggert. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined _GL_SYS_TIME_H /* Simply delegate to the system's header, without adding anything. */ # if @HAVE_SYS_TIME_H@ # @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ # endif #else # define _GL_SYS_TIME_H # if @HAVE_SYS_TIME_H@ # @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ # else # include # endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ # ifdef __cplusplus extern "C" { # endif # if ! @HAVE_STRUCT_TIMEVAL@ # if !GNULIB_defined_struct_timeval struct timeval { time_t tv_sec; long int tv_usec; }; # define GNULIB_defined_struct_timeval 1 # endif # endif # ifdef __cplusplus } # endif # if @GNULIB_GETTIMEOFDAY@ # if @REPLACE_GETTIMEOFDAY@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gettimeofday # define gettimeofday rpl_gettimeofday # endif _GL_FUNCDECL_RPL (gettimeofday, int, (struct timeval *restrict, void *restrict) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (gettimeofday, int, (struct timeval *restrict, void *restrict)); # else # if !@HAVE_GETTIMEOFDAY@ _GL_FUNCDECL_SYS (gettimeofday, int, (struct timeval *restrict, void *restrict) _GL_ARG_NONNULL ((1))); # endif /* Need to cast, because on glibc systems, by default, the second argument is struct timezone *. */ _GL_CXXALIAS_SYS_CAST (gettimeofday, int, (struct timeval *restrict, void *restrict)); # endif _GL_CXXALIASWARN (gettimeofday); # elif defined GNULIB_POSIXCHECK # undef gettimeofday # if HAVE_RAW_DECL_GETTIMEOFDAY _GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - " "use gnulib module gettimeofday for portability"); # endif # endif #endif /* _GL_SYS_TIME_H */ gv-3.7.4/lib/sys_stat.in.h0000664000076400007640000004317511735103745012311 00000000000000/* Provide a more complete sys/stat header file. Copyright (C) 2005-2011 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Eric Blake, Paul Eggert, and Jim Meyering. */ /* This file is supposed to be used on platforms where is incomplete. It is intended to provide definitions and prototypes needed by an application. Start with what the system provides. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined __need_system_sys_stat_h /* Special invocation convention. */ #@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@ #else /* Normal invocation convention. */ #ifndef _GL_SYS_STAT_H /* Get nlink_t. */ #include /* Get struct timespec. */ #include /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@ #ifndef _GL_SYS_STAT_H #define _GL_SYS_STAT_H /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Before doing "#define mkdir rpl_mkdir" below, we need to include all headers that may declare mkdir(). */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include /* mingw32, mingw64 */ # include /* mingw64 */ #endif #ifndef S_IFMT # define S_IFMT 0170000 #endif #if STAT_MACROS_BROKEN # undef S_ISBLK # undef S_ISCHR # undef S_ISDIR # undef S_ISFIFO # undef S_ISLNK # undef S_ISNAM # undef S_ISMPB # undef S_ISMPC # undef S_ISNWK # undef S_ISREG # undef S_ISSOCK #endif #ifndef S_ISBLK # ifdef S_IFBLK # define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) # else # define S_ISBLK(m) 0 # endif #endif #ifndef S_ISCHR # ifdef S_IFCHR # define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) # else # define S_ISCHR(m) 0 # endif #endif #ifndef S_ISDIR # ifdef S_IFDIR # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) # else # define S_ISDIR(m) 0 # endif #endif #ifndef S_ISDOOR /* Solaris 2.5 and up */ # define S_ISDOOR(m) 0 #endif #ifndef S_ISFIFO # ifdef S_IFIFO # define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) # else # define S_ISFIFO(m) 0 # endif #endif #ifndef S_ISLNK # ifdef S_IFLNK # define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) # else # define S_ISLNK(m) 0 # endif #endif #ifndef S_ISMPB /* V7 */ # ifdef S_IFMPB # define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB) # define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC) # else # define S_ISMPB(m) 0 # define S_ISMPC(m) 0 # endif #endif #ifndef S_ISNAM /* Xenix */ # ifdef S_IFNAM # define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM) # else # define S_ISNAM(m) 0 # endif #endif #ifndef S_ISNWK /* HP/UX */ # ifdef S_IFNWK # define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) # else # define S_ISNWK(m) 0 # endif #endif #ifndef S_ISPORT /* Solaris 10 and up */ # define S_ISPORT(m) 0 #endif #ifndef S_ISREG # ifdef S_IFREG # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) # else # define S_ISREG(m) 0 # endif #endif #ifndef S_ISSOCK # ifdef S_IFSOCK # define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) # else # define S_ISSOCK(m) 0 # endif #endif #ifndef S_TYPEISMQ # define S_TYPEISMQ(p) 0 #endif #ifndef S_TYPEISTMO # define S_TYPEISTMO(p) 0 #endif #ifndef S_TYPEISSEM # ifdef S_INSEM # define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM) # else # define S_TYPEISSEM(p) 0 # endif #endif #ifndef S_TYPEISSHM # ifdef S_INSHD # define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD) # else # define S_TYPEISSHM(p) 0 # endif #endif /* high performance ("contiguous data") */ #ifndef S_ISCTG # define S_ISCTG(p) 0 #endif /* Cray DMF (data migration facility): off line, with data */ #ifndef S_ISOFD # define S_ISOFD(p) 0 #endif /* Cray DMF (data migration facility): off line, with no data */ #ifndef S_ISOFL # define S_ISOFL(p) 0 #endif /* 4.4BSD whiteout */ #ifndef S_ISWHT # define S_ISWHT(m) 0 #endif /* If any of the following are undefined, define them to their de facto standard values. */ #if !S_ISUID # define S_ISUID 04000 #endif #if !S_ISGID # define S_ISGID 02000 #endif /* S_ISVTX is a common extension to POSIX. */ #ifndef S_ISVTX # define S_ISVTX 01000 #endif #if !S_IRUSR && S_IREAD # define S_IRUSR S_IREAD #endif #if !S_IRUSR # define S_IRUSR 00400 #endif #if !S_IRGRP # define S_IRGRP (S_IRUSR >> 3) #endif #if !S_IROTH # define S_IROTH (S_IRUSR >> 6) #endif #if !S_IWUSR && S_IWRITE # define S_IWUSR S_IWRITE #endif #if !S_IWUSR # define S_IWUSR 00200 #endif #if !S_IWGRP # define S_IWGRP (S_IWUSR >> 3) #endif #if !S_IWOTH # define S_IWOTH (S_IWUSR >> 6) #endif #if !S_IXUSR && S_IEXEC # define S_IXUSR S_IEXEC #endif #if !S_IXUSR # define S_IXUSR 00100 #endif #if !S_IXGRP # define S_IXGRP (S_IXUSR >> 3) #endif #if !S_IXOTH # define S_IXOTH (S_IXUSR >> 6) #endif #if !S_IRWXU # define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) #endif #if !S_IRWXG # define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) #endif #if !S_IRWXO # define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) #endif /* S_IXUGO is a common extension to POSIX. */ #if !S_IXUGO # define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) #endif #ifndef S_IRWXUGO # define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO) #endif /* Macros for futimens and utimensat. */ #ifndef UTIME_NOW # define UTIME_NOW (-1) # define UTIME_OMIT (-2) #endif #if @GNULIB_FCHMODAT@ # if !@HAVE_FCHMODAT@ _GL_FUNCDECL_SYS (fchmodat, int, (int fd, char const *file, mode_t mode, int flag) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (fchmodat, int, (int fd, char const *file, mode_t mode, int flag)); _GL_CXXALIASWARN (fchmodat); #elif defined GNULIB_POSIXCHECK # undef fchmodat # if HAVE_RAW_DECL_FCHMODAT _GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @REPLACE_FSTAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define fstat rpl_fstat # endif _GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf)); #else _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); #endif _GL_CXXALIASWARN (fstat); #if @GNULIB_FSTATAT@ # if @REPLACE_FSTATAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fstatat # define fstatat rpl_fstatat # endif _GL_FUNCDECL_RPL (fstatat, int, (int fd, char const *name, struct stat *st, int flags) _GL_ARG_NONNULL ((2, 3))); _GL_CXXALIAS_RPL (fstatat, int, (int fd, char const *name, struct stat *st, int flags)); # else # if !@HAVE_FSTATAT@ _GL_FUNCDECL_SYS (fstatat, int, (int fd, char const *name, struct stat *st, int flags) _GL_ARG_NONNULL ((2, 3))); # endif _GL_CXXALIAS_SYS (fstatat, int, (int fd, char const *name, struct stat *st, int flags)); # endif _GL_CXXALIASWARN (fstatat); #elif defined GNULIB_POSIXCHECK # undef fstatat # if HAVE_RAW_DECL_FSTATAT _GL_WARN_ON_USE (fstatat, "fstatat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @GNULIB_FUTIMENS@ /* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our futimens implementation relies on futimesat, which on Solaris 10 makes an invocation to futimens that is meant to invoke the libc's futimens(), not gnulib's futimens(). */ # if @REPLACE_FUTIMENS@ || (!@HAVE_FUTIMENS@ && defined __sun) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef futimens # define futimens rpl_futimens # endif _GL_FUNCDECL_RPL (futimens, int, (int fd, struct timespec const times[2])); _GL_CXXALIAS_RPL (futimens, int, (int fd, struct timespec const times[2])); # else # if !@HAVE_FUTIMENS@ _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2])); # endif _GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); # endif # if @HAVE_FUTIMENS@ _GL_CXXALIASWARN (futimens); # endif #elif defined GNULIB_POSIXCHECK # undef futimens # if HAVE_RAW_DECL_FUTIMENS _GL_WARN_ON_USE (futimens, "futimens is not portable - " "use gnulib module futimens for portability"); # endif #endif #if @GNULIB_LCHMOD@ /* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME denotes a symbolic link. */ # if !@HAVE_LCHMOD@ /* The lchmod replacement follows symbolic links. Callers should take this into account; lchmod should be applied only to arguments that are known to not be symbolic links. On hosts that lack lchmod, this can lead to race conditions between the check and the invocation of lchmod, but we know of no workarounds that are reliable in general. You might try requesting support for lchmod from your operating system supplier. */ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define lchmod chmod # endif /* Need to cast, because on mingw, the second parameter of chmod is int mode. */ _GL_CXXALIAS_RPL_CAST_1 (lchmod, chmod, int, (const char *filename, mode_t mode)); # else # if 0 /* assume already declared */ _GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode)); # endif # if @HAVE_LCHMOD@ _GL_CXXALIASWARN (lchmod); # endif #elif defined GNULIB_POSIXCHECK # undef lchmod # if HAVE_RAW_DECL_LCHMOD _GL_WARN_ON_USE (lchmod, "lchmod is unportable - " "use gnulib module lchmod for portability"); # endif #endif #if @GNULIB_LSTAT@ # if ! @HAVE_LSTAT@ /* mingw does not support symlinks, therefore it does not have lstat. But without links, stat does just fine. */ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define lstat stat # endif _GL_CXXALIAS_RPL_1 (lstat, stat, int, (const char *name, struct stat *buf)); # elif @REPLACE_LSTAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef lstat # define lstat rpl_lstat # endif _GL_FUNCDECL_RPL (lstat, int, (const char *name, struct stat *buf) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (lstat, int, (const char *name, struct stat *buf)); # else _GL_CXXALIAS_SYS (lstat, int, (const char *name, struct stat *buf)); # endif # if @HAVE_LSTAT@ _GL_CXXALIASWARN (lstat); # endif #elif defined GNULIB_POSIXCHECK # undef lstat # if HAVE_RAW_DECL_LSTAT _GL_WARN_ON_USE (lstat, "lstat is unportable - " "use gnulib module lstat for portability"); # endif #endif #if @REPLACE_MKDIR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mkdir # define mkdir rpl_mkdir # endif _GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); #else /* mingw's _mkdir() function has 1 argument, but we pass 2 arguments. Additionally, it declares _mkdir (and depending on compile flags, an alias mkdir), only in the nonstandard includes and , which are included above. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # if !GNULIB_defined_rpl_mkdir static inline int rpl_mkdir (char const *name, mode_t mode) { return _mkdir (name); } # define GNULIB_defined_rpl_mkdir 1 # endif # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mkdir rpl_mkdir # endif _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); # else _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); # endif #endif _GL_CXXALIASWARN (mkdir); #if @GNULIB_MKDIRAT@ # if !@HAVE_MKDIRAT@ _GL_FUNCDECL_SYS (mkdirat, int, (int fd, char const *file, mode_t mode) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (mkdirat, int, (int fd, char const *file, mode_t mode)); _GL_CXXALIASWARN (mkdirat); #elif defined GNULIB_POSIXCHECK # undef mkdirat # if HAVE_RAW_DECL_MKDIRAT _GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @GNULIB_MKFIFO@ # if @REPLACE_MKFIFO@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mkfifo # define mkfifo rpl_mkfifo # endif _GL_FUNCDECL_RPL (mkfifo, int, (char const *file, mode_t mode) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mkfifo, int, (char const *file, mode_t mode)); # else # if !@HAVE_MKFIFO@ _GL_FUNCDECL_SYS (mkfifo, int, (char const *file, mode_t mode) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode)); # endif _GL_CXXALIASWARN (mkfifo); #elif defined GNULIB_POSIXCHECK # undef mkfifo # if HAVE_RAW_DECL_MKFIFO _GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - " "use gnulib module mkfifo for portability"); # endif #endif #if @GNULIB_MKFIFOAT@ # if !@HAVE_MKFIFOAT@ _GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)); _GL_CXXALIASWARN (mkfifoat); #elif defined GNULIB_POSIXCHECK # undef mkfifoat # if HAVE_RAW_DECL_MKFIFOAT _GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - " "use gnulib module mkfifoat for portability"); # endif #endif #if @GNULIB_MKNOD@ # if @REPLACE_MKNOD@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mknod # define mknod rpl_mknod # endif _GL_FUNCDECL_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev)); # else # if !@HAVE_MKNOD@ _GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev) _GL_ARG_NONNULL ((1))); # endif /* Need to cast, because on OSF/1 5.1, the third parameter is '...'. */ _GL_CXXALIAS_SYS_CAST (mknod, int, (char const *file, mode_t mode, dev_t dev)); # endif _GL_CXXALIASWARN (mknod); #elif defined GNULIB_POSIXCHECK # undef mknod # if HAVE_RAW_DECL_MKNOD _GL_WARN_ON_USE (mknod, "mknod is not portable - " "use gnulib module mknod for portability"); # endif #endif #if @GNULIB_MKNODAT@ # if !@HAVE_MKNODAT@ _GL_FUNCDECL_SYS (mknodat, int, (int fd, char const *file, mode_t mode, dev_t dev) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (mknodat, int, (int fd, char const *file, mode_t mode, dev_t dev)); _GL_CXXALIASWARN (mknodat); #elif defined GNULIB_POSIXCHECK # undef mknodat # if HAVE_RAW_DECL_MKNODAT _GL_WARN_ON_USE (mknodat, "mknodat is not portable - " "use gnulib module mkfifoat for portability"); # endif #endif #if @GNULIB_STAT@ # if @REPLACE_STAT@ /* We can't use the object-like #define stat rpl_stat, because of struct stat. This means that rpl_stat will not be used if the user does (stat)(a,b). Oh well. */ # undef stat # ifdef _LARGE_FILES /* With _LARGE_FILES defined, AIX (only) defines stat to stat64, so we have to replace stat64() instead of stat(). */ # define stat stat64 # undef stat64 # define stat64(name, st) rpl_stat (name, st) # else /* !_LARGE_FILES */ # define stat(name, st) rpl_stat (name, st) # endif /* !_LARGE_FILES */ _GL_EXTERN_C int stat (const char *name, struct stat *buf) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef stat # if HAVE_RAW_DECL_STAT _GL_WARN_ON_USE (stat, "stat is unportable - " "use gnulib module stat for portability"); # endif #endif #if @GNULIB_UTIMENSAT@ /* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat implementation relies on futimesat, which on Solaris 10 makes an invocation to utimensat that is meant to invoke the libc's utimensat(), not gnulib's utimensat(). */ # if @REPLACE_UTIMENSAT@ || (!@HAVE_UTIMENSAT@ && defined __sun) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef utimensat # define utimensat rpl_utimensat # endif _GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name, struct timespec const times[2], int flag) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name, struct timespec const times[2], int flag)); # else # if !@HAVE_UTIMENSAT@ _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name, struct timespec const times[2], int flag) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, struct timespec const times[2], int flag)); # endif # if @HAVE_UTIMENSAT@ _GL_CXXALIASWARN (utimensat); # endif #elif defined GNULIB_POSIXCHECK # undef utimensat # if HAVE_RAW_DECL_UTIMENSAT _GL_WARN_ON_USE (utimensat, "utimensat is not portable - " "use gnulib module utimensat for portability"); # endif #endif #endif /* _GL_SYS_STAT_H */ #endif /* _GL_SYS_STAT_H */ #endif gv-3.7.4/lib/signal.in.h0000664000076400007640000002611711735103745011712 00000000000000/* A GNU-like . Copyright (C) 2006-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined __need_sig_atomic_t || defined __need_sigset_t /* Special invocation convention inside glibc header files. */ # @INCLUDE_NEXT@ @NEXT_SIGNAL_H@ #else /* Normal invocation convention. */ #ifndef _GL_SIGNAL_H /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_SIGNAL_H@ #ifndef _GL_SIGNAL_H #define _GL_SIGNAL_H /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Define pid_t, uid_t. Also, mingw defines sigset_t not in , but in . */ #include /* On AIX, sig_atomic_t already includes volatile. C99 requires that 'volatile sig_atomic_t' ignore the extra modifier, but C89 did not. Hence, redefine this to a non-volatile type as needed. */ #if ! @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ # if !GNULIB_defined_sig_atomic_t typedef int rpl_sig_atomic_t; # undef sig_atomic_t # define sig_atomic_t rpl_sig_atomic_t # define GNULIB_defined_sig_atomic_t 1 # endif #endif /* A set or mask of signals. */ #if !@HAVE_SIGSET_T@ # if !GNULIB_defined_sigset_t typedef unsigned int sigset_t; # define GNULIB_defined_sigset_t 1 # endif #endif /* Define sighandler_t, the type of signal handlers. A GNU extension. */ #if !@HAVE_SIGHANDLER_T@ # ifdef __cplusplus extern "C" { # endif # if !GNULIB_defined_sighandler_t typedef void (*sighandler_t) (int); # define GNULIB_defined_sighandler_t 1 # endif # ifdef __cplusplus } # endif #endif #if @GNULIB_SIGNAL_H_SIGPIPE@ # ifndef SIGPIPE /* Define SIGPIPE to a value that does not overlap with other signals. */ # define SIGPIPE 13 # define GNULIB_defined_SIGPIPE 1 /* To actually use SIGPIPE, you also need the gnulib modules 'sigprocmask', 'write', 'stdio'. */ # endif #endif /* Maximum signal number + 1. */ #ifndef NSIG # if defined __TANDEM # define NSIG 32 # endif #endif #if @GNULIB_SIGPROCMASK@ # if !@HAVE_POSIX_SIGNALBLOCKING@ /* Maximum signal number + 1. */ # ifndef NSIG # define NSIG 32 # endif /* This code supports only 32 signals. */ # if !GNULIB_defined_verify_NSIG_constraint typedef int verify_NSIG_constraint[NSIG <= 32 ? 1 : -1]; # define GNULIB_defined_verify_NSIG_constraint 1 # endif # endif /* Test whether a given signal is contained in a signal set. */ # if @HAVE_POSIX_SIGNALBLOCKING@ /* This function is defined as a macro on MacOS X. */ # if defined __cplusplus && defined GNULIB_NAMESPACE # undef sigismember # endif # else _GL_FUNCDECL_SYS (sigismember, int, (const sigset_t *set, int sig) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (sigismember, int, (const sigset_t *set, int sig)); _GL_CXXALIASWARN (sigismember); /* Initialize a signal set to the empty set. */ # if @HAVE_POSIX_SIGNALBLOCKING@ /* This function is defined as a macro on MacOS X. */ # if defined __cplusplus && defined GNULIB_NAMESPACE # undef sigemptyset # endif # else _GL_FUNCDECL_SYS (sigemptyset, int, (sigset_t *set) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (sigemptyset, int, (sigset_t *set)); _GL_CXXALIASWARN (sigemptyset); /* Add a signal to a signal set. */ # if @HAVE_POSIX_SIGNALBLOCKING@ /* This function is defined as a macro on MacOS X. */ # if defined __cplusplus && defined GNULIB_NAMESPACE # undef sigaddset # endif # else _GL_FUNCDECL_SYS (sigaddset, int, (sigset_t *set, int sig) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (sigaddset, int, (sigset_t *set, int sig)); _GL_CXXALIASWARN (sigaddset); /* Remove a signal from a signal set. */ # if @HAVE_POSIX_SIGNALBLOCKING@ /* This function is defined as a macro on MacOS X. */ # if defined __cplusplus && defined GNULIB_NAMESPACE # undef sigdelset # endif # else _GL_FUNCDECL_SYS (sigdelset, int, (sigset_t *set, int sig) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (sigdelset, int, (sigset_t *set, int sig)); _GL_CXXALIASWARN (sigdelset); /* Fill a signal set with all possible signals. */ # if @HAVE_POSIX_SIGNALBLOCKING@ /* This function is defined as a macro on MacOS X. */ # if defined __cplusplus && defined GNULIB_NAMESPACE # undef sigfillset # endif # else _GL_FUNCDECL_SYS (sigfillset, int, (sigset_t *set) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (sigfillset, int, (sigset_t *set)); _GL_CXXALIASWARN (sigfillset); /* Return the set of those blocked signals that are pending. */ # if !@HAVE_POSIX_SIGNALBLOCKING@ _GL_FUNCDECL_SYS (sigpending, int, (sigset_t *set) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (sigpending, int, (sigset_t *set)); _GL_CXXALIASWARN (sigpending); /* If OLD_SET is not NULL, put the current set of blocked signals in *OLD_SET. Then, if SET is not NULL, affect the current set of blocked signals by combining it with *SET as indicated in OPERATION. In this implementation, you are not allowed to change a signal handler while the signal is blocked. */ # if !@HAVE_POSIX_SIGNALBLOCKING@ # define SIG_BLOCK 0 /* blocked_set = blocked_set | *set; */ # define SIG_SETMASK 1 /* blocked_set = *set; */ # define SIG_UNBLOCK 2 /* blocked_set = blocked_set & ~*set; */ _GL_FUNCDECL_SYS (sigprocmask, int, (int operation, const sigset_t *set, sigset_t *old_set)); # endif _GL_CXXALIAS_SYS (sigprocmask, int, (int operation, const sigset_t *set, sigset_t *old_set)); _GL_CXXALIASWARN (sigprocmask); /* Install the handler FUNC for signal SIG, and return the previous handler. */ # ifdef __cplusplus extern "C" { # endif # if !GNULIB_defined_function_taking_int_returning_void_t typedef void (*_gl_function_taking_int_returning_void_t) (int); # define GNULIB_defined_function_taking_int_returning_void_t 1 # endif # ifdef __cplusplus } # endif # if !@HAVE_POSIX_SIGNALBLOCKING@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define signal rpl_signal # endif _GL_FUNCDECL_RPL (signal, _gl_function_taking_int_returning_void_t, (int sig, _gl_function_taking_int_returning_void_t func)); _GL_CXXALIAS_RPL (signal, _gl_function_taking_int_returning_void_t, (int sig, _gl_function_taking_int_returning_void_t func)); # else _GL_CXXALIAS_SYS (signal, _gl_function_taking_int_returning_void_t, (int sig, _gl_function_taking_int_returning_void_t func)); # endif _GL_CXXALIASWARN (signal); /* Raise signal SIG. */ # if !@HAVE_POSIX_SIGNALBLOCKING@ && GNULIB_defined_SIGPIPE # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef raise # define raise rpl_raise # endif _GL_FUNCDECL_RPL (raise, int, (int sig)); _GL_CXXALIAS_RPL (raise, int, (int sig)); # else _GL_CXXALIAS_SYS (raise, int, (int sig)); # endif _GL_CXXALIASWARN (raise); #elif defined GNULIB_POSIXCHECK # undef sigaddset # if HAVE_RAW_DECL_SIGADDSET _GL_WARN_ON_USE (sigaddset, "sigaddset is unportable - " "use the gnulib module sigprocmask for portability"); # endif # undef sigdelset # if HAVE_RAW_DECL_SIGDELSET _GL_WARN_ON_USE (sigdelset, "sigdelset is unportable - " "use the gnulib module sigprocmask for portability"); # endif # undef sigemptyset # if HAVE_RAW_DECL_SIGEMPTYSET _GL_WARN_ON_USE (sigemptyset, "sigemptyset is unportable - " "use the gnulib module sigprocmask for portability"); # endif # undef sigfillset # if HAVE_RAW_DECL_SIGFILLSET _GL_WARN_ON_USE (sigfillset, "sigfillset is unportable - " "use the gnulib module sigprocmask for portability"); # endif # undef sigismember # if HAVE_RAW_DECL_SIGISMEMBER _GL_WARN_ON_USE (sigismember, "sigismember is unportable - " "use the gnulib module sigprocmask for portability"); # endif # undef sigpending # if HAVE_RAW_DECL_SIGPENDING _GL_WARN_ON_USE (sigpending, "sigpending is unportable - " "use the gnulib module sigprocmask for portability"); # endif # undef sigprocmask # if HAVE_RAW_DECL_SIGPROCMASK _GL_WARN_ON_USE (sigprocmask, "sigprocmask is unportable - " "use the gnulib module sigprocmask for portability"); # endif #endif /* @GNULIB_SIGPROCMASK@ */ #if @GNULIB_SIGACTION@ # if !@HAVE_SIGACTION@ # if !@HAVE_SIGINFO_T@ # if !GNULIB_defined_siginfo_types /* Present to allow compilation, but unsupported by gnulib. */ union sigval { int sival_int; void *sival_ptr; }; /* Present to allow compilation, but unsupported by gnulib. */ struct siginfo_t { int si_signo; int si_code; int si_errno; pid_t si_pid; uid_t si_uid; void *si_addr; int si_status; long si_band; union sigval si_value; }; typedef struct siginfo_t siginfo_t; # define GNULIB_defined_siginfo_types 1 # endif # endif /* !@HAVE_SIGINFO_T@ */ /* We assume that platforms which lack the sigaction() function also lack the 'struct sigaction' type, and vice versa. */ # if !GNULIB_defined_struct_sigaction struct sigaction { union { void (*_sa_handler) (int); /* Present to allow compilation, but unsupported by gnulib. POSIX says that implementations may, but not must, make sa_sigaction overlap with sa_handler, but we know of no implementation where they do not overlap. */ void (*_sa_sigaction) (int, siginfo_t *, void *); } _sa_func; sigset_t sa_mask; /* Not all POSIX flags are supported. */ int sa_flags; }; # define sa_handler _sa_func._sa_handler # define sa_sigaction _sa_func._sa_sigaction /* Unsupported flags are not present. */ # define SA_RESETHAND 1 # define SA_NODEFER 2 # define SA_RESTART 4 # define GNULIB_defined_struct_sigaction 1 # endif _GL_FUNCDECL_SYS (sigaction, int, (int, const struct sigaction *restrict, struct sigaction *restrict)); # elif !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@ # define sa_sigaction sa_handler # endif /* !@HAVE_SIGACTION@, !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@ */ _GL_CXXALIAS_SYS (sigaction, int, (int, const struct sigaction *restrict, struct sigaction *restrict)); _GL_CXXALIASWARN (sigaction); #elif defined GNULIB_POSIXCHECK # undef sigaction # if HAVE_RAW_DECL_SIGACTION _GL_WARN_ON_USE (sigaction, "sigaction is unportable - " "use the gnulib module sigaction for portability"); # endif #endif /* Some systems don't have SA_NODEFER. */ #ifndef SA_NODEFER # define SA_NODEFER 0 #endif #endif /* _GL_SIGNAL_H */ #endif /* _GL_SIGNAL_H */ #endif gv-3.7.4/lib/malloca.valgrind0000664000076400007640000000025711735103745013014 00000000000000# Suppress a valgrind message about use of uninitialized memory in freea(). # This use is OK because it provides only a speedup. { freea Memcheck:Cond fun:freea } gv-3.7.4/lib/stat.c0000664000076400007640000000654411735103745011000 00000000000000/* Work around platform bugs in stat. Copyright (C) 2009-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* written by Eric Blake */ #include /* Get the original definition of stat. It might be defined as a macro. */ #define __need_system_sys_stat_h #include #include #undef __need_system_sys_stat_h static inline int orig_stat (const char *filename, struct stat *buf) { return stat (filename, buf); } /* Specification. */ #include #include #include #include #include #include "dosname.h" /* Store information about NAME into ST. Work around bugs with trailing slashes. Mingw has other bugs (such as st_ino always being 0 on success) which this wrapper does not work around. But at least this implementation provides the ability to emulate fchdir correctly. */ int rpl_stat (char const *name, struct stat *st) { int result = orig_stat (name, st); #if REPLACE_FUNC_STAT_FILE /* Solaris 9 mistakenly succeeds when given a non-directory with a trailing slash. */ if (result == 0 && !S_ISDIR (st->st_mode)) { size_t len = strlen (name); if (ISSLASH (name[len - 1])) { errno = ENOTDIR; return -1; } } #endif /* REPLACE_FUNC_STAT_FILE */ #if REPLACE_FUNC_STAT_DIR if (result == -1 && errno == ENOENT) { /* Due to mingw's oddities, there are some directories (like c:\) where stat() only succeeds with a trailing slash, and other directories (like c:\windows) where stat() only succeeds without a trailing slash. But we want the two to be synonymous, since chdir() manages either style. Likewise, Mingw also reports ENOENT for names longer than PATH_MAX, when we want ENAMETOOLONG, and for stat("file/"), when we want ENOTDIR. Fortunately, mingw PATH_MAX is small enough for stack allocation. */ char fixed_name[PATH_MAX + 1] = {0}; size_t len = strlen (name); bool check_dir = false; if (PATH_MAX <= len) errno = ENAMETOOLONG; else if (len) { strcpy (fixed_name, name); if (ISSLASH (fixed_name[len - 1])) { check_dir = true; while (len && ISSLASH (fixed_name[len - 1])) fixed_name[--len] = '\0'; if (!len) fixed_name[0] = '/'; } else fixed_name[len++] = '/'; result = orig_stat (fixed_name, st); if (result == 0 && check_dir && !S_ISDIR (st->st_mode)) { result = -1; errno = ENOTDIR; } } } #endif /* REPLACE_FUNC_STAT_DIR */ return result; } gv-3.7.4/lib/Makefile.in0000664000076400007640000017774312121323352011724 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2002-2011 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --no-libtool --macro-prefix=gl canonicalize-lgpl getopt-gnu inttypes mkdtemp mkstemp signal VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = lib DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/canonicalize.m4 \ $(top_srcdir)/m4/double-slash-root.m4 \ $(top_srcdir)/m4/eealloc.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/getopt.m4 \ $(top_srcdir)/m4/gettimeofday.m4 \ $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 \ $(top_srcdir)/m4/include_next.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mkdtemp.m4 \ $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/multiarch.m4 \ $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/pathmax.m4 \ $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/signal_h.m4 \ $(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/stdbool.m4 \ $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/sys_stat_h.m4 \ $(top_srcdir)/m4/sys_time_h.m4 $(top_srcdir)/m4/tempname.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/wchar_t.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/ac_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) AR = ar ARFLAGS = cru libgnu_a_AR = $(AR) $(ARFLAGS) am__DEPENDENCIES_1 = am_libgnu_a_OBJECTS = malloca.$(OBJEXT) libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS) LTLIBRARIES = $(noinst_LTLIBRARIES) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libgnu_a_SOURCES) $(EXTRA_libgnu_a_SOURCES) DIST_SOURCES = $(libgnu_a_SOURCES) $(EXTRA_libgnu_a_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEPS_CFLAGS = @DEPS_CFLAGS@ DEPS_LIBS = @DEPS_LIBS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ GETOPT_H = @GETOPT_H@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_READ = @GNULIB_READ@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ LDFLAGS = @LDFLAGS@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANUALEDITION = @MANUALEDITION@ MKDIR_P = @MKDIR_P@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PAPERSIZE = @PAPERSIZE@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRINT_COMMAND = @PRINT_COMMAND@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WRITE = @REPLACE_WRITE@ SAVE_DIR = @SAVE_DIR@ SCRATCH_DIR = @SCRATCH_DIR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_BACKING_PIXMAP = @USE_BACKING_PIXMAP@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = 1.5 gnits SUBDIRS = noinst_HEADERS = noinst_LIBRARIES = libgnu.a noinst_LTLIBRARIES = EXTRA_DIST = alloca.in.h $(top_srcdir)/./arg-nonnull.h \ $(top_srcdir)/./c++defs.h canonicalize-lgpl.c dosname.h \ errno.in.h getopt.c getopt.in.h getopt1.c getopt_int.h \ gettimeofday.c inttypes.in.h lstat.c malloca.h \ malloca.valgrind mkdtemp.c mkstemp.c pathmax.h readlink.c \ signal.in.h stat.c stdbool.in.h stddef.in.h stdint.in.h \ stdlib.in.h sys_stat.in.h sys_time.in.h tempname.c tempname.h \ time.in.h unistd.in.h $(top_srcdir)/./warn-on-use.h # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. BUILT_SOURCES = $(ALLOCA_H) arg-nonnull.h c++defs.h $(ERRNO_H) \ $(GETOPT_H) inttypes.h signal.h $(STDBOOL_H) $(STDDEF_H) \ $(STDINT_H) stdlib.h sys/stat.h sys/time.h time.h unistd.h \ warn-on-use.h SUFFIXES = MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t arg-nonnull.h \ arg-nonnull.h-t c++defs.h c++defs.h-t errno.h errno.h-t \ getopt.h getopt.h-t inttypes.h inttypes.h-t signal.h \ signal.h-t stdbool.h stdbool.h-t stddef.h stddef.h-t stdint.h \ stdint.h-t stdlib.h stdlib.h-t sys/stat.h sys/stat.h-t \ sys/time.h sys/time.h-t time.h time.h-t unistd.h unistd.h-t \ warn-on-use.h warn-on-use.h-t MOSTLYCLEANDIRS = sys CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = AM_CPPFLAGS = AM_CFLAGS = libgnu_a_SOURCES = gettext.h malloca.c verify.h libgnu_a_LIBADD = $(gl_LIBOBJS) libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) EXTRA_libgnu_a_SOURCES = canonicalize-lgpl.c getopt.c getopt1.c \ gettimeofday.c lstat.c mkdtemp.c mkstemp.c readlink.c stat.c \ tempname.c ARG_NONNULL_H = arg-nonnull.h CXXDEFS_H = c++defs.h WARN_ON_USE_H = warn-on-use.h all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits lib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits lib/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libgnu.a: $(libgnu_a_OBJECTS) $(libgnu_a_DEPENDENCIES) -rm -f libgnu.a $(libgnu_a_AR) libgnu.a $(libgnu_a_OBJECTS) $(libgnu_a_LIBADD) $(RANLIB) libgnu.a clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canonicalize-lgpl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettimeofday.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloca.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdtemp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkstemp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tempname.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) installdirs: installdirs-recursive installdirs-am: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-local pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ ctags-recursive install install-am install-strip \ tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES clean-noinstLTLIBRARIES ctags \ ctags-recursive distclean distclean-compile distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-local pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # We need the following in order to create when the system # doesn't have one that works with the given compiler. @GL_GENERATE_ALLOCA_H_TRUE@alloca.h: alloca.in.h $(top_builddir)/config.status @GL_GENERATE_ALLOCA_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ @GL_GENERATE_ALLOCA_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ @GL_GENERATE_ALLOCA_H_TRUE@ cat $(srcdir)/alloca.in.h; \ @GL_GENERATE_ALLOCA_H_TRUE@ } > $@-t && \ @GL_GENERATE_ALLOCA_H_TRUE@ mv -f $@-t $@ @GL_GENERATE_ALLOCA_H_FALSE@alloca.h: $(top_builddir)/config.status @GL_GENERATE_ALLOCA_H_FALSE@ rm -f $@ # The arg-nonnull.h that gets inserted into generated .h files is the same as # build-aux/arg-nonnull.h, except that it has the copyright header cut off. arg-nonnull.h: $(top_srcdir)/./arg-nonnull.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/GL_ARG_NONNULL/,$$p' \ < $(top_srcdir)/./arg-nonnull.h \ > $@-t && \ mv $@-t $@ # The c++defs.h that gets inserted into generated .h files is the same as # build-aux/c++defs.h, except that it has the copyright header cut off. c++defs.h: $(top_srcdir)/./c++defs.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/_GL_CXXDEFS/,$$p' \ < $(top_srcdir)/./c++defs.h \ > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that is POSIX compliant. @GL_GENERATE_ERRNO_H_TRUE@errno.h: errno.in.h $(top_builddir)/config.status @GL_GENERATE_ERRNO_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ @GL_GENERATE_ERRNO_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ @GL_GENERATE_ERRNO_H_TRUE@ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ @GL_GENERATE_ERRNO_H_TRUE@ < $(srcdir)/errno.in.h; \ @GL_GENERATE_ERRNO_H_TRUE@ } > $@-t && \ @GL_GENERATE_ERRNO_H_TRUE@ mv $@-t $@ @GL_GENERATE_ERRNO_H_FALSE@errno.h: $(top_builddir)/config.status @GL_GENERATE_ERRNO_H_FALSE@ rm -f $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ < $(srcdir)/getopt.in.h; \ } > $@-t && \ mv -f $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. inttypes.h: inttypes.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \ -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \ -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \ -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \ -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \ -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \ -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \ -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \ -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \ -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \ -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \ -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \ -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/inttypes.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have a complete one. signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \ -e 's|@''GNULIB_SIGNAL_H_SIGPIPE''@|$(GNULIB_SIGNAL_H_SIGPIPE)|g' \ -e 's|@''GNULIB_SIGPROCMASK''@|$(GNULIB_SIGPROCMASK)|g' \ -e 's|@''GNULIB_SIGACTION''@|$(GNULIB_SIGACTION)|g' \ -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \ -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \ -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \ -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \ -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \ -e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \ -e 's|@''HAVE_SIGHANDLER_T''@|$(HAVE_SIGHANDLER_T)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/signal.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works. @GL_GENERATE_STDBOOL_H_TRUE@stdbool.h: stdbool.in.h $(top_builddir)/config.status @GL_GENERATE_STDBOOL_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ @GL_GENERATE_STDBOOL_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ @GL_GENERATE_STDBOOL_H_TRUE@ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ @GL_GENERATE_STDBOOL_H_TRUE@ } > $@-t && \ @GL_GENERATE_STDBOOL_H_TRUE@ mv $@-t $@ @GL_GENERATE_STDBOOL_H_FALSE@stdbool.h: $(top_builddir)/config.status @GL_GENERATE_STDBOOL_H_FALSE@ rm -f $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. @GL_GENERATE_STDDEF_H_TRUE@stddef.h: stddef.in.h $(top_builddir)/config.status @GL_GENERATE_STDDEF_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ @GL_GENERATE_STDDEF_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ @GL_GENERATE_STDDEF_H_TRUE@ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ @GL_GENERATE_STDDEF_H_TRUE@ < $(srcdir)/stddef.in.h; \ @GL_GENERATE_STDDEF_H_TRUE@ } > $@-t && \ @GL_GENERATE_STDDEF_H_TRUE@ mv $@-t $@ @GL_GENERATE_STDDEF_H_FALSE@stddef.h: $(top_builddir)/config.status @GL_GENERATE_STDDEF_H_FALSE@ rm -f $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. @GL_GENERATE_STDINT_H_TRUE@stdint.h: stdint.in.h $(top_builddir)/config.status @GL_GENERATE_STDINT_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ @GL_GENERATE_STDINT_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ @GL_GENERATE_STDINT_H_TRUE@ sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ @GL_GENERATE_STDINT_H_TRUE@ < $(srcdir)/stdint.in.h; \ @GL_GENERATE_STDINT_H_TRUE@ } > $@-t && \ @GL_GENERATE_STDINT_H_TRUE@ mv $@-t $@ @GL_GENERATE_STDINT_H_FALSE@stdint.h: $(top_builddir)/config.status @GL_GENERATE_STDINT_H_FALSE@ rm -f $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ -e 's|@''GNULIB__EXIT''@|$(GNULIB__EXIT)|g' \ -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \ -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \ -e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \ -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \ -e 's|@''GNULIB_GRANTPT''@|$(GNULIB_GRANTPT)|g' \ -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \ -e 's|@''GNULIB_MBTOWC''@|$(GNULIB_MBTOWC)|g' \ -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \ -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \ -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \ -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \ -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \ -e 's|@''GNULIB_PTSNAME''@|$(GNULIB_PTSNAME)|g' \ -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \ -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \ -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \ -e 's|@''GNULIB_REALPATH''@|$(GNULIB_REALPATH)|g' \ -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \ -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \ -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \ -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \ -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \ -e 's|@''GNULIB_SYSTEM_POSIX''@|$(GNULIB_SYSTEM_POSIX)|g' \ -e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \ -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \ -e 's|@''GNULIB_WCTOMB''@|$(GNULIB_WCTOMB)|g' \ < $(srcdir)/stdlib.in.h | \ sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # has one that is incomplete. sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ -e 's|@''GNULIB_FCHMODAT''@|$(GNULIB_FCHMODAT)|g' \ -e 's|@''GNULIB_FSTATAT''@|$(GNULIB_FSTATAT)|g' \ -e 's|@''GNULIB_FUTIMENS''@|$(GNULIB_FUTIMENS)|g' \ -e 's|@''GNULIB_LCHMOD''@|$(GNULIB_LCHMOD)|g' \ -e 's|@''GNULIB_LSTAT''@|$(GNULIB_LSTAT)|g' \ -e 's|@''GNULIB_MKDIRAT''@|$(GNULIB_MKDIRAT)|g' \ -e 's|@''GNULIB_MKFIFO''@|$(GNULIB_MKFIFO)|g' \ -e 's|@''GNULIB_MKFIFOAT''@|$(GNULIB_MKFIFOAT)|g' \ -e 's|@''GNULIB_MKNOD''@|$(GNULIB_MKNOD)|g' \ -e 's|@''GNULIB_MKNODAT''@|$(GNULIB_MKNODAT)|g' \ -e 's|@''GNULIB_STAT''@|$(GNULIB_STAT)|g' \ -e 's|@''GNULIB_UTIMENSAT''@|$(GNULIB_UTIMENSAT)|g' \ -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \ -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \ -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \ -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \ -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \ -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \ -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \ -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \ -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \ -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \ -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \ -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \ -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \ -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \ -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \ -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_stat.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \ -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_time.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ -e 's|@''GNULIB_MKTIME''@|$(GNULIB_MKTIME)|g' \ -e 's|@''GNULIB_NANOSLEEP''@|$(GNULIB_NANOSLEEP)|g' \ -e 's|@''GNULIB_STRPTIME''@|$(GNULIB_STRPTIME)|g' \ -e 's|@''GNULIB_TIMEGM''@|$(GNULIB_TIMEGM)|g' \ -e 's|@''GNULIB_TIME_R''@|$(GNULIB_TIME_R)|g' \ -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \ -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/time.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create an empty placeholder for # when the system doesn't have one. unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \ -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \ -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \ -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \ -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \ -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \ -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \ -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \ -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \ -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \ -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \ -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \ -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \ -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \ -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \ -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \ -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \ -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \ -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \ -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \ -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \ -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \ -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \ -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \ -e 's|@''GNULIB_PIPE''@|$(GNULIB_PIPE)|g' \ -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \ -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \ -e 's|@''GNULIB_PWRITE''@|$(GNULIB_PWRITE)|g' \ -e 's|@''GNULIB_READ''@|$(GNULIB_READ)|g' \ -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \ -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \ -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \ -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \ -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \ -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \ -e 's|@''GNULIB_TTYNAME_R''@|$(GNULIB_TTYNAME_R)|g' \ -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \ -e 's|@''GNULIB_UNISTD_H_NONBLOCKING''@|$(GNULIB_UNISTD_H_NONBLOCKING)|g' \ -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \ -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \ -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \ -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \ -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \ < $(srcdir)/unistd.in.h | \ sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \ -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \ -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \ -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \ -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \ -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \ -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \ -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \ -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ | \ sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \ -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \ -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \ -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \ -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \ -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ # The warn-on-use.h that gets inserted into generated .h files is the same as # build-aux/warn-on-use.h, except that it has the copyright header cut off. warn-on-use.h: $(top_srcdir)/./warn-on-use.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/^.ifndef/,$$p' \ < $(top_srcdir)/./warn-on-use.h \ > $@-t && \ mv $@-t $@ mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ if test -n "$$dir" && test -d $$dir; then \ echo "rmdir $$dir"; rmdir $$dir; \ fi; \ done; \ : # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gv-3.7.4/lib/mkstemp.c0000664000076400007640000000301011735103745011466 00000000000000/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2011 Free Software Foundation, Inc. This file is derived from the one in the GNU C Library. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #if !_LIBC # include #endif #include #if !_LIBC # include "tempname.h" # define __gen_tempname gen_tempname # ifndef __GT_FILE # define __GT_FILE GT_FILE # endif #endif #include #ifndef __GT_FILE # define __GT_FILE 0 #endif /* Generate a unique temporary file name from XTEMPLATE. The last six characters of XTEMPLATE must be "XXXXXX"; they are replaced with a string that makes the file name unique. Then open the file and return a fd. If you are creating temporary files which will later be removed, consider using the clean-temp module, which avoids several pitfalls of using mkstemp directly. */ int mkstemp (char *xtemplate) { return __gen_tempname (xtemplate, 0, 0, __GT_FILE); } gv-3.7.4/lib/verify.h0000664000076400007640000001755711735103745011344 00000000000000/* Compile-time assert-like macros. Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ #ifndef VERIFY_H # define VERIFY_H 1 /* Define HAVE__STATIC_ASSERT to 1 if _Static_assert works as per the C1X draft N1548 section 6.7.10. This is supported by GCC 4.6.0 and later, in C mode, and its use here generates easier-to-read diagnostics when verify (R) fails. Define HAVE_STATIC_ASSERT to 1 if static_assert works as per the C1X draft N1548 section 7.2 or the C++0X draft N3242 section 7.(4). This will likely be supported by future GCC versions, in C++ mode. For now, use this only with GCC. Eventually whether _Static_assert and static_assert works should be determined by 'configure'. */ # if (4 < __GNUC__ || (__GNUC__ == 4 && 6 <= __GNUC_MINOR__)) && !defined __cplusplus # define HAVE__STATIC_ASSERT 1 # endif /* The condition (99 < __GNUC__) is temporary, until we know about the first G++ release that supports static_assert. */ # if (99 < __GNUC__) && defined __cplusplus # define HAVE_STATIC_ASSERT 1 # endif /* Each of these macros verifies that its argument R is nonzero. To be portable, R should be an integer constant expression. Unlike assert (R), there is no run-time overhead. There are two macros, since no single macro can be used in all contexts in C. verify_true (R) is for scalar contexts, including integer constant expression contexts. verify (R) is for declaration contexts, e.g., the top level. Symbols ending in "__" are private to this header. If _Static_assert works, verify (R) uses it directly. Similarly, verify_true (R) works by packaging a _Static_assert inside a struct that is an operand of sizeof. The code below uses several ideas for C++ compilers, and for C compilers that do not support _Static_assert: * The first step is ((R) ? 1 : -1). Given an expression R, of integral or boolean or floating-point type, this yields an expression of integral type, whose value is later verified to be constant and nonnegative. * Next this expression W is wrapped in a type struct verify_type__ { unsigned int verify_error_if_negative_size__: W; }. If W is negative, this yields a compile-time error. No compiler can deal with a bit-field of negative size. One might think that an array size check would have the same effect, that is, that the type struct { unsigned int dummy[W]; } would work as well. However, inside a function, some compilers (such as C++ compilers and GNU C) allow local parameters and variables inside array size expressions. With these compilers, an array size check would not properly diagnose this misuse of the verify macro: void function (int n) { verify (n < 0); } * For the verify macro, the struct verify_type__ will need to somehow be embedded into a declaration. To be portable, this declaration must declare an object, a constant, a function, or a typedef name. If the declared entity uses the type directly, such as in struct dummy {...}; typedef struct {...} dummy; extern struct {...} *dummy; extern void dummy (struct {...} *); extern struct {...} *dummy (void); two uses of the verify macro would yield colliding declarations if the entity names are not disambiguated. A workaround is to attach the current line number to the entity name: #define _GL_CONCAT0(x, y) x##y #define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) extern struct {...} * _GL_CONCAT (dummy, __LINE__); But this has the problem that two invocations of verify from within the same macro would collide, since the __LINE__ value would be the same for both invocations. (The GCC __COUNTER__ macro solves this problem, but is not portable.) A solution is to use the sizeof operator. It yields a number, getting rid of the identity of the type. Declarations like extern int dummy [sizeof (struct {...})]; extern void dummy (int [sizeof (struct {...})]); extern int (*dummy (void)) [sizeof (struct {...})]; can be repeated. * Should the implementation use a named struct or an unnamed struct? Which of the following alternatives can be used? extern int dummy [sizeof (struct {...})]; extern int dummy [sizeof (struct verify_type__ {...})]; extern void dummy (int [sizeof (struct {...})]); extern void dummy (int [sizeof (struct verify_type__ {...})]); extern int (*dummy (void)) [sizeof (struct {...})]; extern int (*dummy (void)) [sizeof (struct verify_type__ {...})]; In the second and sixth case, the struct type is exported to the outer scope; two such declarations therefore collide. GCC warns about the first, third, and fourth cases. So the only remaining possibility is the fifth case: extern int (*dummy (void)) [sizeof (struct {...})]; * GCC warns about duplicate declarations of the dummy function if -Wredundant_decls is used. GCC 4.3 and later have a builtin __COUNTER__ macro that can let us generate unique identifiers for each dummy function, to suppress this warning. * This implementation exploits the fact that older versions of GCC, which do not support _Static_assert, also do not warn about the last declaration mentioned above. * In C++, any struct definition inside sizeof is invalid. Use a template type to work around the problem. */ /* Concatenate two preprocessor tokens. */ # define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) # define _GL_CONCAT0(x, y) x##y /* _GL_COUNTER is an integer, preferably one that changes each time we use it. Use __COUNTER__ if it works, falling back on __LINE__ otherwise. __LINE__ isn't perfect, but it's better than a constant. */ # if defined __COUNTER__ && __COUNTER__ != __COUNTER__ # define _GL_COUNTER __COUNTER__ # else # define _GL_COUNTER __LINE__ # endif /* Generate a symbol with the given prefix, making it unique if possible. */ # define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER) /* Verify requirement R at compile-time, as an integer constant expression. Return 1. */ # ifdef __cplusplus template struct verify_type__ { unsigned int verify_error_if_negative_size__: w; }; # define verify_true(R) \ (!!sizeof (verify_type__<(R) ? 1 : -1>)) # elif HAVE__STATIC_ASSERT # define verify_true(R) \ (!!sizeof \ (struct { \ _Static_assert (R, "verify_true (" #R ")"); \ int verify_dummy__; \ })) # elif HAVE_STATIC_ASSERT # define verify_true(R) \ (!!sizeof \ (struct { \ static_assert (R, "verify_true (" #R ")"); \ int verify_dummy__; \ })) # else # define verify_true(R) \ (!!sizeof \ (struct { unsigned int verify_error_if_negative_size__: (R) ? 1 : -1; })) # endif /* Verify requirement R at compile-time, as a declaration without a trailing ';'. */ # if HAVE__STATIC_ASSERT # define verify(R) _Static_assert (R, "verify (" #R ")") # elif HAVE_STATIC_ASSERT # define verify(R) static_assert (R, "verify (" #R ")") # else # define verify(R) \ extern int (* _GL_GENSYM (verify_function) (void)) [verify_true (R)] # endif #endif gv-3.7.4/lib/errno.in.h0000664000076400007640000001124711735103745011560 00000000000000/* A POSIX-like . Copyright (C) 2008-2011 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _GL_ERRNO_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_ERRNO_H@ #ifndef _GL_ERRNO_H #define _GL_ERRNO_H /* On native Windows platforms, many macros are not defined. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* POSIX says that EAGAIN and EWOULDBLOCK may have the same value. */ # define EWOULDBLOCK EAGAIN /* Values >= 100 seem safe to use. */ # define ETXTBSY 100 # define GNULIB_defined_ETXTBSY 1 /* These are intentionally the same values as the WSA* error numbers, defined in . */ # define EINPROGRESS 10036 # define EALREADY 10037 # define ENOTSOCK 10038 # define EDESTADDRREQ 10039 # define EMSGSIZE 10040 # define EPROTOTYPE 10041 # define ENOPROTOOPT 10042 # define EPROTONOSUPPORT 10043 # define ESOCKTNOSUPPORT 10044 /* not required by POSIX */ # define EOPNOTSUPP 10045 # define EPFNOSUPPORT 10046 /* not required by POSIX */ # define EAFNOSUPPORT 10047 # define EADDRINUSE 10048 # define EADDRNOTAVAIL 10049 # define ENETDOWN 10050 # define ENETUNREACH 10051 # define ENETRESET 10052 # define ECONNABORTED 10053 # define ECONNRESET 10054 # define ENOBUFS 10055 # define EISCONN 10056 # define ENOTCONN 10057 # define ESHUTDOWN 10058 /* not required by POSIX */ # define ETOOMANYREFS 10059 /* not required by POSIX */ # define ETIMEDOUT 10060 # define ECONNREFUSED 10061 # define ELOOP 10062 # define EHOSTDOWN 10064 /* not required by POSIX */ # define EHOSTUNREACH 10065 # define EPROCLIM 10067 /* not required by POSIX */ # define EUSERS 10068 /* not required by POSIX */ # define EDQUOT 10069 # define ESTALE 10070 # define EREMOTE 10071 /* not required by POSIX */ # define GNULIB_defined_ESOCK 1 # endif /* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros EMULTIHOP, ENOLINK, EOVERFLOW are not defined. */ # if @EMULTIHOP_HIDDEN@ # define EMULTIHOP @EMULTIHOP_VALUE@ # define GNULIB_defined_EMULTIHOP 1 # endif # if @ENOLINK_HIDDEN@ # define ENOLINK @ENOLINK_VALUE@ # define GNULIB_defined_ENOLINK 1 # endif # if @EOVERFLOW_HIDDEN@ # define EOVERFLOW @EOVERFLOW_VALUE@ # define GNULIB_defined_EOVERFLOW 1 # endif /* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK, EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined. Likewise, on NonStop Kernel, EDQUOT is not defined. Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151, HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133. Note: When one of these systems defines some of these macros some day, binaries will have to be recompiled so that they recognizes the new errno values from the system. */ # ifndef ENOMSG # define ENOMSG 2000 # define GNULIB_defined_ENOMSG 1 # endif # ifndef EIDRM # define EIDRM 2001 # define GNULIB_defined_EIDRM 1 # endif # ifndef ENOLINK # define ENOLINK 2002 # define GNULIB_defined_ENOLINK 1 # endif # ifndef EPROTO # define EPROTO 2003 # define GNULIB_defined_EPROTO 1 # endif # ifndef EMULTIHOP # define EMULTIHOP 2004 # define GNULIB_defined_EMULTIHOP 1 # endif # ifndef EBADMSG # define EBADMSG 2005 # define GNULIB_defined_EBADMSG 1 # endif # ifndef EOVERFLOW # define EOVERFLOW 2006 # define GNULIB_defined_EOVERFLOW 1 # endif # ifndef ENOTSUP # define ENOTSUP 2007 # define GNULIB_defined_ENOTSUP 1 # endif # ifndef ESTALE # define ESTALE 2009 # define GNULIB_defined_ESTALE 1 # endif # ifndef EDQUOT # define EDQUOT 2010 # define GNULIB_defined_EDQUOT 1 # endif # ifndef ECANCELED # define ECANCELED 2008 # define GNULIB_defined_ECANCELED 1 # endif #endif /* _GL_ERRNO_H */ #endif /* _GL_ERRNO_H */ gv-3.7.4/lib/dosname.h0000664000076400007640000000373311735103745011455 00000000000000/* File names on MS-DOS/Windows systems. Copyright (C) 2000-2001, 2004-2006, 2009-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . From Paul Eggert and Jim Meyering. */ #ifndef _DOSNAME_H #define _DOSNAME_H #if (defined _WIN32 || defined __WIN32__ || \ defined __MSDOS__ || defined __CYGWIN__ || \ defined __EMX__ || defined __DJGPP__) /* This internal macro assumes ASCII, but all hosts that support drive letters use ASCII. */ # define _IS_DRIVE_LETTER(C) (((unsigned int) (C) | ('a' - 'A')) - 'a' \ <= 'z' - 'a') # define FILE_SYSTEM_PREFIX_LEN(Filename) \ (_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0) # ifndef __CYGWIN__ # define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 1 # endif # define ISSLASH(C) ((C) == '/' || (C) == '\\') #else # define FILE_SYSTEM_PREFIX_LEN(Filename) 0 # define ISSLASH(C) ((C) == '/') #endif #ifndef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE # define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0 #endif #if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE # define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)]) # else # define IS_ABSOLUTE_FILE_NAME(F) \ (ISSLASH ((F)[0]) || FILE_SYSTEM_PREFIX_LEN (F) != 0) #endif #define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F)) #endif /* DOSNAME_H_ */ gv-3.7.4/lib/pathmax.h0000664000076400007640000000276511735103745011475 00000000000000/* Define PATH_MAX somehow. Requires sys/types.h. Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2011 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _PATHMAX_H # define _PATHMAX_H # include # include # ifndef _POSIX_PATH_MAX # define _POSIX_PATH_MAX 256 # endif # if !defined PATH_MAX && defined _PC_PATH_MAX && defined HAVE_PATHCONF # define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 \ : pathconf ("/", _PC_PATH_MAX)) # endif /* Don't include sys/param.h if it already has been. */ # if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN # include # endif # if !defined PATH_MAX && defined MAXPATHLEN # define PATH_MAX MAXPATHLEN # endif # ifndef PATH_MAX # define PATH_MAX _POSIX_PATH_MAX # endif #endif /* _PATHMAX_H */ gv-3.7.4/lib/tempname.h0000664000076400007640000000346511735103745011637 00000000000000/* Create a temporary file or directory. Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* header written by Eric Blake */ #ifndef GL_TEMPNAME_H # define GL_TEMPNAME_H # include # ifdef __GT_FILE # define GT_FILE __GT_FILE # define GT_DIR __GT_DIR # define GT_NOCREATE __GT_NOCREATE # else # define GT_FILE 0 # define GT_DIR 1 # define GT_NOCREATE 2 # endif /* Generate a temporary file name based on TMPL. TMPL must match the rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix). The name constructed does not exist at the time of the call to gen_tempname. TMPL is overwritten with the result. KIND may be one of: GT_NOCREATE: simply verify that the name does not exist at the time of the call. GT_FILE: create a large file using open(O_CREAT|O_EXCL) and return a read-write fd. The file is mode 0600. GT_DIR: create a directory, which will be mode 0700. We use a clever algorithm to get hard-to-predict names. */ extern int gen_tempname (char *tmpl, int suffixlen, int flags, int kind); #endif /* GL_TEMPNAME_H */ gv-3.7.4/lib/stdint.in.h0000664000076400007640000004203611735103745011740 00000000000000/* Copyright (C) 2001-2002, 2004-2011 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* * ISO C 99 for platforms that lack it. * */ #ifndef _GL_STDINT_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* When including a system file that in turn includes , use the system , not our substitute. This avoids problems with (for example) VMS, whose includes . */ #define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* Get those types that are already defined in other system include files, so that we can "#define int8_t signed char" below without worrying about a later system include file containing a "typedef signed char int8_t;" that will get messed up by our macro. Our macros should all be consistent with the system versions, except for the "fast" types and macros, which we recommend against using in public interfaces due to compiler differences. */ #if @HAVE_STDINT_H@ # if defined __sgi && ! defined __c99 /* Bypass IRIX's if in C89 mode, since it merely annoys users with "This header file is to be used only for c99 mode compilations" diagnostics. */ # define __STDINT_H__ # endif /* Other systems may have an incomplete or buggy . Include it before , since any "#include " in would reinclude us, skipping our contents because _GL_STDINT_H is defined. The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_STDINT_H@ #endif #if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H #define _GL_STDINT_H /* defines some of the stdint.h types as well, on glibc, IRIX 6.5, and OpenBSD 3.8 (via ). AIX 5.2 isn't needed and causes troubles. MacOS X 10.4.6 includes (which is us), but relies on the system definitions, so include after @NEXT_STDINT_H@. */ #if @HAVE_SYS_TYPES_H@ && ! defined _AIX # include #endif /* Get LONG_MIN, LONG_MAX, ULONG_MAX. */ #include #if @HAVE_INTTYPES_H@ /* In OpenBSD 3.8, includes , which defines int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. also defines intptr_t and uintptr_t. */ # include #elif @HAVE_SYS_INTTYPES_H@ /* Solaris 7 has the types except the *_fast*_t types, and the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ # include #endif #if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__ /* Linux libc4 >= 4.6.7 and libc5 have a that defines int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is included by . */ # include #endif #undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* Minimum and maximum values for a integer type under the usual assumption. Return an unspecified value if BITS == 0, adding a check to pacify picky compilers. */ #define _STDINT_MIN(signed, bits, zero) \ ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero)) #define _STDINT_MAX(signed, bits, zero) \ ((signed) \ ? ~ _STDINT_MIN (signed, bits, zero) \ : /* The expression for the unsigned case. The subtraction of (signed) \ is a nop in the unsigned case and avoids "signed integer overflow" \ warnings in the signed case. */ \ ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) #if !GNULIB_defined_stdint_types /* 7.18.1.1. Exact-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. */ #undef int8_t #undef uint8_t typedef signed char gl_int8_t; typedef unsigned char gl_uint8_t; #define int8_t gl_int8_t #define uint8_t gl_uint8_t #undef int16_t #undef uint16_t typedef short int gl_int16_t; typedef unsigned short int gl_uint16_t; #define int16_t gl_int16_t #define uint16_t gl_uint16_t #undef int32_t #undef uint32_t typedef int gl_int32_t; typedef unsigned int gl_uint32_t; #define int32_t gl_int32_t #define uint32_t gl_uint32_t /* If the system defines INT64_MAX, assume int64_t works. That way, if the underlying platform defines int64_t to be a 64-bit long long int, the code below won't mistakenly define it to be a 64-bit long int, which would mess up C++ name mangling. We must use #ifdef rather than #if, to avoid an error with HP-UX 10.20 cc. */ #ifdef INT64_MAX # define GL_INT64_T #else /* Do not undefine int64_t if gnulib is not being used with 64-bit types, since otherwise it breaks platforms like Tandem/NSK. */ # if LONG_MAX >> 31 >> 31 == 1 # undef int64_t typedef long int gl_int64_t; # define int64_t gl_int64_t # define GL_INT64_T # elif defined _MSC_VER # undef int64_t typedef __int64 gl_int64_t; # define int64_t gl_int64_t # define GL_INT64_T # elif @HAVE_LONG_LONG_INT@ # undef int64_t typedef long long int gl_int64_t; # define int64_t gl_int64_t # define GL_INT64_T # endif #endif #ifdef UINT64_MAX # define GL_UINT64_T #else # if ULONG_MAX >> 31 >> 31 >> 1 == 1 # undef uint64_t typedef unsigned long int gl_uint64_t; # define uint64_t gl_uint64_t # define GL_UINT64_T # elif defined _MSC_VER # undef uint64_t typedef unsigned __int64 gl_uint64_t; # define uint64_t gl_uint64_t # define GL_UINT64_T # elif @HAVE_UNSIGNED_LONG_LONG_INT@ # undef uint64_t typedef unsigned long long int gl_uint64_t; # define uint64_t gl_uint64_t # define GL_UINT64_T # endif #endif /* Avoid collision with Solaris 2.5.1 etc. */ #define _UINT8_T #define _UINT32_T #define _UINT64_T /* 7.18.1.2. Minimum-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types are the same as the corresponding N_t types. */ #undef int_least8_t #undef uint_least8_t #undef int_least16_t #undef uint_least16_t #undef int_least32_t #undef uint_least32_t #undef int_least64_t #undef uint_least64_t #define int_least8_t int8_t #define uint_least8_t uint8_t #define int_least16_t int16_t #define uint_least16_t uint16_t #define int_least32_t int32_t #define uint_least32_t uint32_t #ifdef GL_INT64_T # define int_least64_t int64_t #endif #ifdef GL_UINT64_T # define uint_least64_t uint64_t #endif /* 7.18.1.3. Fastest minimum-width integer types */ /* Note: Other substitutes may define these types differently. It is not recommended to use these types in public header files. */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types are taken from the same list of types. Assume that 'long int' is fast enough for all narrower integers. */ #undef int_fast8_t #undef uint_fast8_t #undef int_fast16_t #undef uint_fast16_t #undef int_fast32_t #undef uint_fast32_t #undef int_fast64_t #undef uint_fast64_t typedef long int gl_int_fast8_t; typedef unsigned long int gl_uint_fast8_t; typedef long int gl_int_fast16_t; typedef unsigned long int gl_uint_fast16_t; typedef long int gl_int_fast32_t; typedef unsigned long int gl_uint_fast32_t; #define int_fast8_t gl_int_fast8_t #define uint_fast8_t gl_uint_fast8_t #define int_fast16_t gl_int_fast16_t #define uint_fast16_t gl_uint_fast16_t #define int_fast32_t gl_int_fast32_t #define uint_fast32_t gl_uint_fast32_t #ifdef GL_INT64_T # define int_fast64_t int64_t #endif #ifdef GL_UINT64_T # define uint_fast64_t uint64_t #endif /* 7.18.1.4. Integer types capable of holding object pointers */ #undef intptr_t #undef uintptr_t typedef long int gl_intptr_t; typedef unsigned long int gl_uintptr_t; #define intptr_t gl_intptr_t #define uintptr_t gl_uintptr_t /* 7.18.1.5. Greatest-width integer types */ /* Note: These types are compiler dependent. It may be unwise to use them in public header files. */ #undef intmax_t #if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 typedef long long int gl_intmax_t; # define intmax_t gl_intmax_t #elif defined GL_INT64_T # define intmax_t int64_t #else typedef long int gl_intmax_t; # define intmax_t gl_intmax_t #endif #undef uintmax_t #if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 typedef unsigned long long int gl_uintmax_t; # define uintmax_t gl_uintmax_t #elif defined GL_UINT64_T # define uintmax_t uint64_t #else typedef unsigned long int gl_uintmax_t; # define uintmax_t gl_uintmax_t #endif /* Verify that intmax_t and uintmax_t have the same size. Too much code breaks if this is not the case. If this check fails, the reason is likely to be found in the autoconf macros. */ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) ? 1 : -1]; #define GNULIB_defined_stdint_types 1 #endif /* !GNULIB_defined_stdint_types */ /* 7.18.2. Limits of specified-width integer types */ #if ! defined __cplusplus || defined __STDC_LIMIT_MACROS /* 7.18.2.1. Limits of exact-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. */ #undef INT8_MIN #undef INT8_MAX #undef UINT8_MAX #define INT8_MIN (~ INT8_MAX) #define INT8_MAX 127 #define UINT8_MAX 255 #undef INT16_MIN #undef INT16_MAX #undef UINT16_MAX #define INT16_MIN (~ INT16_MAX) #define INT16_MAX 32767 #define UINT16_MAX 65535 #undef INT32_MIN #undef INT32_MAX #undef UINT32_MAX #define INT32_MIN (~ INT32_MAX) #define INT32_MAX 2147483647 #define UINT32_MAX 4294967295U #if defined GL_INT64_T && ! defined INT64_MAX /* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 evaluates the latter incorrectly in preprocessor expressions. */ # define INT64_MIN (- INTMAX_C (1) << 63) # define INT64_MAX INTMAX_C (9223372036854775807) #endif #if defined GL_UINT64_T && ! defined UINT64_MAX # define UINT64_MAX UINTMAX_C (18446744073709551615) #endif /* 7.18.2.2. Limits of minimum-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types are the same as the corresponding N_t types. */ #undef INT_LEAST8_MIN #undef INT_LEAST8_MAX #undef UINT_LEAST8_MAX #define INT_LEAST8_MIN INT8_MIN #define INT_LEAST8_MAX INT8_MAX #define UINT_LEAST8_MAX UINT8_MAX #undef INT_LEAST16_MIN #undef INT_LEAST16_MAX #undef UINT_LEAST16_MAX #define INT_LEAST16_MIN INT16_MIN #define INT_LEAST16_MAX INT16_MAX #define UINT_LEAST16_MAX UINT16_MAX #undef INT_LEAST32_MIN #undef INT_LEAST32_MAX #undef UINT_LEAST32_MAX #define INT_LEAST32_MIN INT32_MIN #define INT_LEAST32_MAX INT32_MAX #define UINT_LEAST32_MAX UINT32_MAX #undef INT_LEAST64_MIN #undef INT_LEAST64_MAX #ifdef GL_INT64_T # define INT_LEAST64_MIN INT64_MIN # define INT_LEAST64_MAX INT64_MAX #endif #undef UINT_LEAST64_MAX #ifdef GL_UINT64_T # define UINT_LEAST64_MAX UINT64_MAX #endif /* 7.18.2.3. Limits of fastest minimum-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types are taken from the same list of types. */ #undef INT_FAST8_MIN #undef INT_FAST8_MAX #undef UINT_FAST8_MAX #define INT_FAST8_MIN LONG_MIN #define INT_FAST8_MAX LONG_MAX #define UINT_FAST8_MAX ULONG_MAX #undef INT_FAST16_MIN #undef INT_FAST16_MAX #undef UINT_FAST16_MAX #define INT_FAST16_MIN LONG_MIN #define INT_FAST16_MAX LONG_MAX #define UINT_FAST16_MAX ULONG_MAX #undef INT_FAST32_MIN #undef INT_FAST32_MAX #undef UINT_FAST32_MAX #define INT_FAST32_MIN LONG_MIN #define INT_FAST32_MAX LONG_MAX #define UINT_FAST32_MAX ULONG_MAX #undef INT_FAST64_MIN #undef INT_FAST64_MAX #ifdef GL_INT64_T # define INT_FAST64_MIN INT64_MIN # define INT_FAST64_MAX INT64_MAX #endif #undef UINT_FAST64_MAX #ifdef GL_UINT64_T # define UINT_FAST64_MAX UINT64_MAX #endif /* 7.18.2.4. Limits of integer types capable of holding object pointers */ #undef INTPTR_MIN #undef INTPTR_MAX #undef UINTPTR_MAX #define INTPTR_MIN LONG_MIN #define INTPTR_MAX LONG_MAX #define UINTPTR_MAX ULONG_MAX /* 7.18.2.5. Limits of greatest-width integer types */ #undef INTMAX_MIN #undef INTMAX_MAX #ifdef INT64_MAX # define INTMAX_MIN INT64_MIN # define INTMAX_MAX INT64_MAX #else # define INTMAX_MIN INT32_MIN # define INTMAX_MAX INT32_MAX #endif #undef UINTMAX_MAX #ifdef UINT64_MAX # define UINTMAX_MAX UINT64_MAX #else # define UINTMAX_MAX UINT32_MAX #endif /* 7.18.3. Limits of other integer types */ /* ptrdiff_t limits */ #undef PTRDIFF_MIN #undef PTRDIFF_MAX #if @APPLE_UNIVERSAL_BUILD@ # ifdef _LP64 # define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l) # define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) # else # define PTRDIFF_MIN _STDINT_MIN (1, 32, 0) # define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) # endif #else # define PTRDIFF_MIN \ _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) # define PTRDIFF_MAX \ _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) #endif /* sig_atomic_t limits */ #undef SIG_ATOMIC_MIN #undef SIG_ATOMIC_MAX #define SIG_ATOMIC_MIN \ _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ 0@SIG_ATOMIC_T_SUFFIX@) #define SIG_ATOMIC_MAX \ _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ 0@SIG_ATOMIC_T_SUFFIX@) /* size_t limit */ #undef SIZE_MAX #if @APPLE_UNIVERSAL_BUILD@ # ifdef _LP64 # define SIZE_MAX _STDINT_MAX (0, 64, 0ul) # else # define SIZE_MAX _STDINT_MAX (0, 32, 0ul) # endif #else # define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@) #endif /* wchar_t limits */ /* Get WCHAR_MIN, WCHAR_MAX. This include is not on the top, above, because on OSF/1 4.0 we have a sequence of nested includes -> -> -> , and the latter includes and assumes its types are already defined. */ #if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX) /* BSD/OS 4.0.1 has a bug: , and must be included before . */ # include # include # include # define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H # include # undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H #endif #undef WCHAR_MIN #undef WCHAR_MAX #define WCHAR_MIN \ _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) #define WCHAR_MAX \ _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) /* wint_t limits */ #undef WINT_MIN #undef WINT_MAX #define WINT_MIN \ _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) #define WINT_MAX \ _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) #endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */ /* 7.18.4. Macros for integer constants */ #if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS /* 7.18.4.1. Macros for minimum-width integer constants */ /* According to ISO C 99 Technical Corrigendum 1 */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ #undef INT8_C #undef UINT8_C #define INT8_C(x) x #define UINT8_C(x) x #undef INT16_C #undef UINT16_C #define INT16_C(x) x #define UINT16_C(x) x #undef INT32_C #undef UINT32_C #define INT32_C(x) x #define UINT32_C(x) x ## U #undef INT64_C #undef UINT64_C #if LONG_MAX >> 31 >> 31 == 1 # define INT64_C(x) x##L #elif defined _MSC_VER # define INT64_C(x) x##i64 #elif @HAVE_LONG_LONG_INT@ # define INT64_C(x) x##LL #endif #if ULONG_MAX >> 31 >> 31 >> 1 == 1 # define UINT64_C(x) x##UL #elif defined _MSC_VER # define UINT64_C(x) x##ui64 #elif @HAVE_UNSIGNED_LONG_LONG_INT@ # define UINT64_C(x) x##ULL #endif /* 7.18.4.2. Macros for greatest-width integer constants */ #undef INTMAX_C #if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 # define INTMAX_C(x) x##LL #elif defined GL_INT64_T # define INTMAX_C(x) INT64_C(x) #else # define INTMAX_C(x) x##L #endif #undef UINTMAX_C #if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 # define UINTMAX_C(x) x##ULL #elif defined GL_UINT64_T # define UINTMAX_C(x) UINT64_C(x) #else # define UINTMAX_C(x) x##UL #endif #endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */ #endif /* _GL_STDINT_H */ #endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ gv-3.7.4/lib/inttypes.in.h0000664000076400007640000006425111735103745012315 00000000000000/* Copyright (C) 2006-2011 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Derek Price. This file is part of gnulib. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* * ISO C 99 for platforms that lack it. * */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* Include the original if it exists, and if this file has not been included yet or if this file includes gnulib stdint.h which in turn includes this file. The include_next requires a split double-inclusion guard. */ #if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H # if @HAVE_INTTYPES_H@ # @INCLUDE_NEXT@ @NEXT_INTTYPES_H@ # endif #endif #if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H #define INTTYPES_H /* Include or the gnulib replacement. But avoid namespace pollution on glibc systems. */ #ifndef __GLIBC__ # include #endif /* Get CHAR_BIT. */ #include #if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX) # error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to ." #endif /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* 7.8.1 Macros for format specifiers */ #if ! defined __cplusplus || defined __STDC_FORMAT_MACROS # if defined _TNS_R_TARGET /* Tandem NonStop R series and compatible platforms released before July 2005 support %Ld but not %lld. */ # define _LONG_LONG_FORMAT_PREFIX "L" # else # define _LONG_LONG_FORMAT_PREFIX "ll" # endif # if !defined PRId8 || @PRI_MACROS_BROKEN@ # undef PRId8 # ifdef INT8_MAX # define PRId8 "d" # endif # endif # if !defined PRIi8 || @PRI_MACROS_BROKEN@ # undef PRIi8 # ifdef INT8_MAX # define PRIi8 "i" # endif # endif # if !defined PRIo8 || @PRI_MACROS_BROKEN@ # undef PRIo8 # ifdef UINT8_MAX # define PRIo8 "o" # endif # endif # if !defined PRIu8 || @PRI_MACROS_BROKEN@ # undef PRIu8 # ifdef UINT8_MAX # define PRIu8 "u" # endif # endif # if !defined PRIx8 || @PRI_MACROS_BROKEN@ # undef PRIx8 # ifdef UINT8_MAX # define PRIx8 "x" # endif # endif # if !defined PRIX8 || @PRI_MACROS_BROKEN@ # undef PRIX8 # ifdef UINT8_MAX # define PRIX8 "X" # endif # endif # if !defined PRId16 || @PRI_MACROS_BROKEN@ # undef PRId16 # ifdef INT16_MAX # define PRId16 "d" # endif # endif # if !defined PRIi16 || @PRI_MACROS_BROKEN@ # undef PRIi16 # ifdef INT16_MAX # define PRIi16 "i" # endif # endif # if !defined PRIo16 || @PRI_MACROS_BROKEN@ # undef PRIo16 # ifdef UINT16_MAX # define PRIo16 "o" # endif # endif # if !defined PRIu16 || @PRI_MACROS_BROKEN@ # undef PRIu16 # ifdef UINT16_MAX # define PRIu16 "u" # endif # endif # if !defined PRIx16 || @PRI_MACROS_BROKEN@ # undef PRIx16 # ifdef UINT16_MAX # define PRIx16 "x" # endif # endif # if !defined PRIX16 || @PRI_MACROS_BROKEN@ # undef PRIX16 # ifdef UINT16_MAX # define PRIX16 "X" # endif # endif # if !defined PRId32 || @PRI_MACROS_BROKEN@ # undef PRId32 # ifdef INT32_MAX # define PRId32 "d" # endif # endif # if !defined PRIi32 || @PRI_MACROS_BROKEN@ # undef PRIi32 # ifdef INT32_MAX # define PRIi32 "i" # endif # endif # if !defined PRIo32 || @PRI_MACROS_BROKEN@ # undef PRIo32 # ifdef UINT32_MAX # define PRIo32 "o" # endif # endif # if !defined PRIu32 || @PRI_MACROS_BROKEN@ # undef PRIu32 # ifdef UINT32_MAX # define PRIu32 "u" # endif # endif # if !defined PRIx32 || @PRI_MACROS_BROKEN@ # undef PRIx32 # ifdef UINT32_MAX # define PRIx32 "x" # endif # endif # if !defined PRIX32 || @PRI_MACROS_BROKEN@ # undef PRIX32 # ifdef UINT32_MAX # define PRIX32 "X" # endif # endif # ifdef INT64_MAX # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@) # define _PRI64_PREFIX "l" # elif defined _MSC_VER || defined __MINGW32__ # define _PRI64_PREFIX "I64" # elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 # define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX # endif # if !defined PRId64 || @PRI_MACROS_BROKEN@ # undef PRId64 # define PRId64 _PRI64_PREFIX "d" # endif # if !defined PRIi64 || @PRI_MACROS_BROKEN@ # undef PRIi64 # define PRIi64 _PRI64_PREFIX "i" # endif # endif # ifdef UINT64_MAX # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@) # define _PRIu64_PREFIX "l" # elif defined _MSC_VER || defined __MINGW32__ # define _PRIu64_PREFIX "I64" # elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 # define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX # endif # if !defined PRIo64 || @PRI_MACROS_BROKEN@ # undef PRIo64 # define PRIo64 _PRIu64_PREFIX "o" # endif # if !defined PRIu64 || @PRI_MACROS_BROKEN@ # undef PRIu64 # define PRIu64 _PRIu64_PREFIX "u" # endif # if !defined PRIx64 || @PRI_MACROS_BROKEN@ # undef PRIx64 # define PRIx64 _PRIu64_PREFIX "x" # endif # if !defined PRIX64 || @PRI_MACROS_BROKEN@ # undef PRIX64 # define PRIX64 _PRIu64_PREFIX "X" # endif # endif # if !defined PRIdLEAST8 || @PRI_MACROS_BROKEN@ # undef PRIdLEAST8 # define PRIdLEAST8 "d" # endif # if !defined PRIiLEAST8 || @PRI_MACROS_BROKEN@ # undef PRIiLEAST8 # define PRIiLEAST8 "i" # endif # if !defined PRIoLEAST8 || @PRI_MACROS_BROKEN@ # undef PRIoLEAST8 # define PRIoLEAST8 "o" # endif # if !defined PRIuLEAST8 || @PRI_MACROS_BROKEN@ # undef PRIuLEAST8 # define PRIuLEAST8 "u" # endif # if !defined PRIxLEAST8 || @PRI_MACROS_BROKEN@ # undef PRIxLEAST8 # define PRIxLEAST8 "x" # endif # if !defined PRIXLEAST8 || @PRI_MACROS_BROKEN@ # undef PRIXLEAST8 # define PRIXLEAST8 "X" # endif # if !defined PRIdLEAST16 || @PRI_MACROS_BROKEN@ # undef PRIdLEAST16 # define PRIdLEAST16 "d" # endif # if !defined PRIiLEAST16 || @PRI_MACROS_BROKEN@ # undef PRIiLEAST16 # define PRIiLEAST16 "i" # endif # if !defined PRIoLEAST16 || @PRI_MACROS_BROKEN@ # undef PRIoLEAST16 # define PRIoLEAST16 "o" # endif # if !defined PRIuLEAST16 || @PRI_MACROS_BROKEN@ # undef PRIuLEAST16 # define PRIuLEAST16 "u" # endif # if !defined PRIxLEAST16 || @PRI_MACROS_BROKEN@ # undef PRIxLEAST16 # define PRIxLEAST16 "x" # endif # if !defined PRIXLEAST16 || @PRI_MACROS_BROKEN@ # undef PRIXLEAST16 # define PRIXLEAST16 "X" # endif # if !defined PRIdLEAST32 || @PRI_MACROS_BROKEN@ # undef PRIdLEAST32 # define PRIdLEAST32 "d" # endif # if !defined PRIiLEAST32 || @PRI_MACROS_BROKEN@ # undef PRIiLEAST32 # define PRIiLEAST32 "i" # endif # if !defined PRIoLEAST32 || @PRI_MACROS_BROKEN@ # undef PRIoLEAST32 # define PRIoLEAST32 "o" # endif # if !defined PRIuLEAST32 || @PRI_MACROS_BROKEN@ # undef PRIuLEAST32 # define PRIuLEAST32 "u" # endif # if !defined PRIxLEAST32 || @PRI_MACROS_BROKEN@ # undef PRIxLEAST32 # define PRIxLEAST32 "x" # endif # if !defined PRIXLEAST32 || @PRI_MACROS_BROKEN@ # undef PRIXLEAST32 # define PRIXLEAST32 "X" # endif # ifdef INT64_MAX # if !defined PRIdLEAST64 || @PRI_MACROS_BROKEN@ # undef PRIdLEAST64 # define PRIdLEAST64 PRId64 # endif # if !defined PRIiLEAST64 || @PRI_MACROS_BROKEN@ # undef PRIiLEAST64 # define PRIiLEAST64 PRIi64 # endif # endif # ifdef UINT64_MAX # if !defined PRIoLEAST64 || @PRI_MACROS_BROKEN@ # undef PRIoLEAST64 # define PRIoLEAST64 PRIo64 # endif # if !defined PRIuLEAST64 || @PRI_MACROS_BROKEN@ # undef PRIuLEAST64 # define PRIuLEAST64 PRIu64 # endif # if !defined PRIxLEAST64 || @PRI_MACROS_BROKEN@ # undef PRIxLEAST64 # define PRIxLEAST64 PRIx64 # endif # if !defined PRIXLEAST64 || @PRI_MACROS_BROKEN@ # undef PRIXLEAST64 # define PRIXLEAST64 PRIX64 # endif # endif # if !defined PRIdFAST8 || @PRI_MACROS_BROKEN@ # undef PRIdFAST8 # if INT_FAST8_MAX > INT32_MAX # define PRIdFAST8 PRId64 # else # define PRIdFAST8 "d" # endif # endif # if !defined PRIiFAST8 || @PRI_MACROS_BROKEN@ # undef PRIiFAST8 # if INT_FAST8_MAX > INT32_MAX # define PRIiFAST8 PRIi64 # else # define PRIiFAST8 "i" # endif # endif # if !defined PRIoFAST8 || @PRI_MACROS_BROKEN@ # undef PRIoFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define PRIoFAST8 PRIo64 # else # define PRIoFAST8 "o" # endif # endif # if !defined PRIuFAST8 || @PRI_MACROS_BROKEN@ # undef PRIuFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define PRIuFAST8 PRIu64 # else # define PRIuFAST8 "u" # endif # endif # if !defined PRIxFAST8 || @PRI_MACROS_BROKEN@ # undef PRIxFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define PRIxFAST8 PRIx64 # else # define PRIxFAST8 "x" # endif # endif # if !defined PRIXFAST8 || @PRI_MACROS_BROKEN@ # undef PRIXFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define PRIXFAST8 PRIX64 # else # define PRIXFAST8 "X" # endif # endif # if !defined PRIdFAST16 || @PRI_MACROS_BROKEN@ # undef PRIdFAST16 # if INT_FAST16_MAX > INT32_MAX # define PRIdFAST16 PRId64 # else # define PRIdFAST16 "d" # endif # endif # if !defined PRIiFAST16 || @PRI_MACROS_BROKEN@ # undef PRIiFAST16 # if INT_FAST16_MAX > INT32_MAX # define PRIiFAST16 PRIi64 # else # define PRIiFAST16 "i" # endif # endif # if !defined PRIoFAST16 || @PRI_MACROS_BROKEN@ # undef PRIoFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define PRIoFAST16 PRIo64 # else # define PRIoFAST16 "o" # endif # endif # if !defined PRIuFAST16 || @PRI_MACROS_BROKEN@ # undef PRIuFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define PRIuFAST16 PRIu64 # else # define PRIuFAST16 "u" # endif # endif # if !defined PRIxFAST16 || @PRI_MACROS_BROKEN@ # undef PRIxFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define PRIxFAST16 PRIx64 # else # define PRIxFAST16 "x" # endif # endif # if !defined PRIXFAST16 || @PRI_MACROS_BROKEN@ # undef PRIXFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define PRIXFAST16 PRIX64 # else # define PRIXFAST16 "X" # endif # endif # if !defined PRIdFAST32 || @PRI_MACROS_BROKEN@ # undef PRIdFAST32 # if INT_FAST32_MAX > INT32_MAX # define PRIdFAST32 PRId64 # else # define PRIdFAST32 "d" # endif # endif # if !defined PRIiFAST32 || @PRI_MACROS_BROKEN@ # undef PRIiFAST32 # if INT_FAST32_MAX > INT32_MAX # define PRIiFAST32 PRIi64 # else # define PRIiFAST32 "i" # endif # endif # if !defined PRIoFAST32 || @PRI_MACROS_BROKEN@ # undef PRIoFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define PRIoFAST32 PRIo64 # else # define PRIoFAST32 "o" # endif # endif # if !defined PRIuFAST32 || @PRI_MACROS_BROKEN@ # undef PRIuFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define PRIuFAST32 PRIu64 # else # define PRIuFAST32 "u" # endif # endif # if !defined PRIxFAST32 || @PRI_MACROS_BROKEN@ # undef PRIxFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define PRIxFAST32 PRIx64 # else # define PRIxFAST32 "x" # endif # endif # if !defined PRIXFAST32 || @PRI_MACROS_BROKEN@ # undef PRIXFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define PRIXFAST32 PRIX64 # else # define PRIXFAST32 "X" # endif # endif # ifdef INT64_MAX # if !defined PRIdFAST64 || @PRI_MACROS_BROKEN@ # undef PRIdFAST64 # define PRIdFAST64 PRId64 # endif # if !defined PRIiFAST64 || @PRI_MACROS_BROKEN@ # undef PRIiFAST64 # define PRIiFAST64 PRIi64 # endif # endif # ifdef UINT64_MAX # if !defined PRIoFAST64 || @PRI_MACROS_BROKEN@ # undef PRIoFAST64 # define PRIoFAST64 PRIo64 # endif # if !defined PRIuFAST64 || @PRI_MACROS_BROKEN@ # undef PRIuFAST64 # define PRIuFAST64 PRIu64 # endif # if !defined PRIxFAST64 || @PRI_MACROS_BROKEN@ # undef PRIxFAST64 # define PRIxFAST64 PRIx64 # endif # if !defined PRIXFAST64 || @PRI_MACROS_BROKEN@ # undef PRIXFAST64 # define PRIXFAST64 PRIX64 # endif # endif # if !defined PRIdMAX || @PRI_MACROS_BROKEN@ # undef PRIdMAX # if @INT32_MAX_LT_INTMAX_MAX@ # define PRIdMAX PRId64 # else # define PRIdMAX "ld" # endif # endif # if !defined PRIiMAX || @PRI_MACROS_BROKEN@ # undef PRIiMAX # if @INT32_MAX_LT_INTMAX_MAX@ # define PRIiMAX PRIi64 # else # define PRIiMAX "li" # endif # endif # if !defined PRIoMAX || @PRI_MACROS_BROKEN@ # undef PRIoMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define PRIoMAX PRIo64 # else # define PRIoMAX "lo" # endif # endif # if !defined PRIuMAX || @PRI_MACROS_BROKEN@ # undef PRIuMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define PRIuMAX PRIu64 # else # define PRIuMAX "lu" # endif # endif # if !defined PRIxMAX || @PRI_MACROS_BROKEN@ # undef PRIxMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define PRIxMAX PRIx64 # else # define PRIxMAX "lx" # endif # endif # if !defined PRIXMAX || @PRI_MACROS_BROKEN@ # undef PRIXMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define PRIXMAX PRIX64 # else # define PRIXMAX "lX" # endif # endif # if !defined PRIdPTR || @PRI_MACROS_BROKEN@ # undef PRIdPTR # ifdef INTPTR_MAX # define PRIdPTR @PRIPTR_PREFIX@ "d" # endif # endif # if !defined PRIiPTR || @PRI_MACROS_BROKEN@ # undef PRIiPTR # ifdef INTPTR_MAX # define PRIiPTR @PRIPTR_PREFIX@ "i" # endif # endif # if !defined PRIoPTR || @PRI_MACROS_BROKEN@ # undef PRIoPTR # ifdef UINTPTR_MAX # define PRIoPTR @PRIPTR_PREFIX@ "o" # endif # endif # if !defined PRIuPTR || @PRI_MACROS_BROKEN@ # undef PRIuPTR # ifdef UINTPTR_MAX # define PRIuPTR @PRIPTR_PREFIX@ "u" # endif # endif # if !defined PRIxPTR || @PRI_MACROS_BROKEN@ # undef PRIxPTR # ifdef UINTPTR_MAX # define PRIxPTR @PRIPTR_PREFIX@ "x" # endif # endif # if !defined PRIXPTR || @PRI_MACROS_BROKEN@ # undef PRIXPTR # ifdef UINTPTR_MAX # define PRIXPTR @PRIPTR_PREFIX@ "X" # endif # endif # if !defined SCNd8 || @PRI_MACROS_BROKEN@ # undef SCNd8 # ifdef INT8_MAX # define SCNd8 "hhd" # endif # endif # if !defined SCNi8 || @PRI_MACROS_BROKEN@ # undef SCNi8 # ifdef INT8_MAX # define SCNi8 "hhi" # endif # endif # if !defined SCNo8 || @PRI_MACROS_BROKEN@ # undef SCNo8 # ifdef UINT8_MAX # define SCNo8 "hho" # endif # endif # if !defined SCNu8 || @PRI_MACROS_BROKEN@ # undef SCNu8 # ifdef UINT8_MAX # define SCNu8 "hhu" # endif # endif # if !defined SCNx8 || @PRI_MACROS_BROKEN@ # undef SCNx8 # ifdef UINT8_MAX # define SCNx8 "hhx" # endif # endif # if !defined SCNd16 || @PRI_MACROS_BROKEN@ # undef SCNd16 # ifdef INT16_MAX # define SCNd16 "hd" # endif # endif # if !defined SCNi16 || @PRI_MACROS_BROKEN@ # undef SCNi16 # ifdef INT16_MAX # define SCNi16 "hi" # endif # endif # if !defined SCNo16 || @PRI_MACROS_BROKEN@ # undef SCNo16 # ifdef UINT16_MAX # define SCNo16 "ho" # endif # endif # if !defined SCNu16 || @PRI_MACROS_BROKEN@ # undef SCNu16 # ifdef UINT16_MAX # define SCNu16 "hu" # endif # endif # if !defined SCNx16 || @PRI_MACROS_BROKEN@ # undef SCNx16 # ifdef UINT16_MAX # define SCNx16 "hx" # endif # endif # if !defined SCNd32 || @PRI_MACROS_BROKEN@ # undef SCNd32 # ifdef INT32_MAX # define SCNd32 "d" # endif # endif # if !defined SCNi32 || @PRI_MACROS_BROKEN@ # undef SCNi32 # ifdef INT32_MAX # define SCNi32 "i" # endif # endif # if !defined SCNo32 || @PRI_MACROS_BROKEN@ # undef SCNo32 # ifdef UINT32_MAX # define SCNo32 "o" # endif # endif # if !defined SCNu32 || @PRI_MACROS_BROKEN@ # undef SCNu32 # ifdef UINT32_MAX # define SCNu32 "u" # endif # endif # if !defined SCNx32 || @PRI_MACROS_BROKEN@ # undef SCNx32 # ifdef UINT32_MAX # define SCNx32 "x" # endif # endif # ifdef INT64_MAX # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@) # define _SCN64_PREFIX "l" # elif defined _MSC_VER || defined __MINGW32__ # define _SCN64_PREFIX "I64" # elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 # define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX # endif # if !defined SCNd64 || @PRI_MACROS_BROKEN@ # undef SCNd64 # define SCNd64 _SCN64_PREFIX "d" # endif # if !defined SCNi64 || @PRI_MACROS_BROKEN@ # undef SCNi64 # define SCNi64 _SCN64_PREFIX "i" # endif # endif # ifdef UINT64_MAX # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@) # define _SCNu64_PREFIX "l" # elif defined _MSC_VER || defined __MINGW32__ # define _SCNu64_PREFIX "I64" # elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 # define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX # endif # if !defined SCNo64 || @PRI_MACROS_BROKEN@ # undef SCNo64 # define SCNo64 _SCNu64_PREFIX "o" # endif # if !defined SCNu64 || @PRI_MACROS_BROKEN@ # undef SCNu64 # define SCNu64 _SCNu64_PREFIX "u" # endif # if !defined SCNx64 || @PRI_MACROS_BROKEN@ # undef SCNx64 # define SCNx64 _SCNu64_PREFIX "x" # endif # endif # if !defined SCNdLEAST8 || @PRI_MACROS_BROKEN@ # undef SCNdLEAST8 # define SCNdLEAST8 "hhd" # endif # if !defined SCNiLEAST8 || @PRI_MACROS_BROKEN@ # undef SCNiLEAST8 # define SCNiLEAST8 "hhi" # endif # if !defined SCNoLEAST8 || @PRI_MACROS_BROKEN@ # undef SCNoLEAST8 # define SCNoLEAST8 "hho" # endif # if !defined SCNuLEAST8 || @PRI_MACROS_BROKEN@ # undef SCNuLEAST8 # define SCNuLEAST8 "hhu" # endif # if !defined SCNxLEAST8 || @PRI_MACROS_BROKEN@ # undef SCNxLEAST8 # define SCNxLEAST8 "hhx" # endif # if !defined SCNdLEAST16 || @PRI_MACROS_BROKEN@ # undef SCNdLEAST16 # define SCNdLEAST16 "hd" # endif # if !defined SCNiLEAST16 || @PRI_MACROS_BROKEN@ # undef SCNiLEAST16 # define SCNiLEAST16 "hi" # endif # if !defined SCNoLEAST16 || @PRI_MACROS_BROKEN@ # undef SCNoLEAST16 # define SCNoLEAST16 "ho" # endif # if !defined SCNuLEAST16 || @PRI_MACROS_BROKEN@ # undef SCNuLEAST16 # define SCNuLEAST16 "hu" # endif # if !defined SCNxLEAST16 || @PRI_MACROS_BROKEN@ # undef SCNxLEAST16 # define SCNxLEAST16 "hx" # endif # if !defined SCNdLEAST32 || @PRI_MACROS_BROKEN@ # undef SCNdLEAST32 # define SCNdLEAST32 "d" # endif # if !defined SCNiLEAST32 || @PRI_MACROS_BROKEN@ # undef SCNiLEAST32 # define SCNiLEAST32 "i" # endif # if !defined SCNoLEAST32 || @PRI_MACROS_BROKEN@ # undef SCNoLEAST32 # define SCNoLEAST32 "o" # endif # if !defined SCNuLEAST32 || @PRI_MACROS_BROKEN@ # undef SCNuLEAST32 # define SCNuLEAST32 "u" # endif # if !defined SCNxLEAST32 || @PRI_MACROS_BROKEN@ # undef SCNxLEAST32 # define SCNxLEAST32 "x" # endif # ifdef INT64_MAX # if !defined SCNdLEAST64 || @PRI_MACROS_BROKEN@ # undef SCNdLEAST64 # define SCNdLEAST64 SCNd64 # endif # if !defined SCNiLEAST64 || @PRI_MACROS_BROKEN@ # undef SCNiLEAST64 # define SCNiLEAST64 SCNi64 # endif # endif # ifdef UINT64_MAX # if !defined SCNoLEAST64 || @PRI_MACROS_BROKEN@ # undef SCNoLEAST64 # define SCNoLEAST64 SCNo64 # endif # if !defined SCNuLEAST64 || @PRI_MACROS_BROKEN@ # undef SCNuLEAST64 # define SCNuLEAST64 SCNu64 # endif # if !defined SCNxLEAST64 || @PRI_MACROS_BROKEN@ # undef SCNxLEAST64 # define SCNxLEAST64 SCNx64 # endif # endif # if !defined SCNdFAST8 || @PRI_MACROS_BROKEN@ # undef SCNdFAST8 # if INT_FAST8_MAX > INT32_MAX # define SCNdFAST8 SCNd64 # elif INT_FAST8_MAX == 0x7fff # define SCNdFAST8 "hd" # elif INT_FAST8_MAX == 0x7f # define SCNdFAST8 "hhd" # else # define SCNdFAST8 "d" # endif # endif # if !defined SCNiFAST8 || @PRI_MACROS_BROKEN@ # undef SCNiFAST8 # if INT_FAST8_MAX > INT32_MAX # define SCNiFAST8 SCNi64 # elif INT_FAST8_MAX == 0x7fff # define SCNiFAST8 "hi" # elif INT_FAST8_MAX == 0x7f # define SCNiFAST8 "hhi" # else # define SCNiFAST8 "i" # endif # endif # if !defined SCNoFAST8 || @PRI_MACROS_BROKEN@ # undef SCNoFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define SCNoFAST8 SCNo64 # elif UINT_FAST8_MAX == 0xffff # define SCNoFAST8 "ho" # elif UINT_FAST8_MAX == 0xff # define SCNoFAST8 "hho" # else # define SCNoFAST8 "o" # endif # endif # if !defined SCNuFAST8 || @PRI_MACROS_BROKEN@ # undef SCNuFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define SCNuFAST8 SCNu64 # elif UINT_FAST8_MAX == 0xffff # define SCNuFAST8 "hu" # elif UINT_FAST8_MAX == 0xff # define SCNuFAST8 "hhu" # else # define SCNuFAST8 "u" # endif # endif # if !defined SCNxFAST8 || @PRI_MACROS_BROKEN@ # undef SCNxFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define SCNxFAST8 SCNx64 # elif UINT_FAST8_MAX == 0xffff # define SCNxFAST8 "hx" # elif UINT_FAST8_MAX == 0xff # define SCNxFAST8 "hhx" # else # define SCNxFAST8 "x" # endif # endif # if !defined SCNdFAST16 || @PRI_MACROS_BROKEN@ # undef SCNdFAST16 # if INT_FAST16_MAX > INT32_MAX # define SCNdFAST16 SCNd64 # elif INT_FAST16_MAX == 0x7fff # define SCNdFAST16 "hd" # else # define SCNdFAST16 "d" # endif # endif # if !defined SCNiFAST16 || @PRI_MACROS_BROKEN@ # undef SCNiFAST16 # if INT_FAST16_MAX > INT32_MAX # define SCNiFAST16 SCNi64 # elif INT_FAST16_MAX == 0x7fff # define SCNiFAST16 "hi" # else # define SCNiFAST16 "i" # endif # endif # if !defined SCNoFAST16 || @PRI_MACROS_BROKEN@ # undef SCNoFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define SCNoFAST16 SCNo64 # elif UINT_FAST16_MAX == 0xffff # define SCNoFAST16 "ho" # else # define SCNoFAST16 "o" # endif # endif # if !defined SCNuFAST16 || @PRI_MACROS_BROKEN@ # undef SCNuFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define SCNuFAST16 SCNu64 # elif UINT_FAST16_MAX == 0xffff # define SCNuFAST16 "hu" # else # define SCNuFAST16 "u" # endif # endif # if !defined SCNxFAST16 || @PRI_MACROS_BROKEN@ # undef SCNxFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define SCNxFAST16 SCNx64 # elif UINT_FAST16_MAX == 0xffff # define SCNxFAST16 "hx" # else # define SCNxFAST16 "x" # endif # endif # if !defined SCNdFAST32 || @PRI_MACROS_BROKEN@ # undef SCNdFAST32 # if INT_FAST32_MAX > INT32_MAX # define SCNdFAST32 SCNd64 # else # define SCNdFAST32 "d" # endif # endif # if !defined SCNiFAST32 || @PRI_MACROS_BROKEN@ # undef SCNiFAST32 # if INT_FAST32_MAX > INT32_MAX # define SCNiFAST32 SCNi64 # else # define SCNiFAST32 "i" # endif # endif # if !defined SCNoFAST32 || @PRI_MACROS_BROKEN@ # undef SCNoFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define SCNoFAST32 SCNo64 # else # define SCNoFAST32 "o" # endif # endif # if !defined SCNuFAST32 || @PRI_MACROS_BROKEN@ # undef SCNuFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define SCNuFAST32 SCNu64 # else # define SCNuFAST32 "u" # endif # endif # if !defined SCNxFAST32 || @PRI_MACROS_BROKEN@ # undef SCNxFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define SCNxFAST32 SCNx64 # else # define SCNxFAST32 "x" # endif # endif # ifdef INT64_MAX # if !defined SCNdFAST64 || @PRI_MACROS_BROKEN@ # undef SCNdFAST64 # define SCNdFAST64 SCNd64 # endif # if !defined SCNiFAST64 || @PRI_MACROS_BROKEN@ # undef SCNiFAST64 # define SCNiFAST64 SCNi64 # endif # endif # ifdef UINT64_MAX # if !defined SCNoFAST64 || @PRI_MACROS_BROKEN@ # undef SCNoFAST64 # define SCNoFAST64 SCNo64 # endif # if !defined SCNuFAST64 || @PRI_MACROS_BROKEN@ # undef SCNuFAST64 # define SCNuFAST64 SCNu64 # endif # if !defined SCNxFAST64 || @PRI_MACROS_BROKEN@ # undef SCNxFAST64 # define SCNxFAST64 SCNx64 # endif # endif # if !defined SCNdMAX || @PRI_MACROS_BROKEN@ # undef SCNdMAX # if @INT32_MAX_LT_INTMAX_MAX@ # define SCNdMAX SCNd64 # else # define SCNdMAX "ld" # endif # endif # if !defined SCNiMAX || @PRI_MACROS_BROKEN@ # undef SCNiMAX # if @INT32_MAX_LT_INTMAX_MAX@ # define SCNiMAX SCNi64 # else # define SCNiMAX "li" # endif # endif # if !defined SCNoMAX || @PRI_MACROS_BROKEN@ # undef SCNoMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define SCNoMAX SCNo64 # else # define SCNoMAX "lo" # endif # endif # if !defined SCNuMAX || @PRI_MACROS_BROKEN@ # undef SCNuMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define SCNuMAX SCNu64 # else # define SCNuMAX "lu" # endif # endif # if !defined SCNxMAX || @PRI_MACROS_BROKEN@ # undef SCNxMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define SCNxMAX SCNx64 # else # define SCNxMAX "lx" # endif # endif # if !defined SCNdPTR || @PRI_MACROS_BROKEN@ # undef SCNdPTR # ifdef INTPTR_MAX # define SCNdPTR @PRIPTR_PREFIX@ "d" # endif # endif # if !defined SCNiPTR || @PRI_MACROS_BROKEN@ # undef SCNiPTR # ifdef INTPTR_MAX # define SCNiPTR @PRIPTR_PREFIX@ "i" # endif # endif # if !defined SCNoPTR || @PRI_MACROS_BROKEN@ # undef SCNoPTR # ifdef UINTPTR_MAX # define SCNoPTR @PRIPTR_PREFIX@ "o" # endif # endif # if !defined SCNuPTR || @PRI_MACROS_BROKEN@ # undef SCNuPTR # ifdef UINTPTR_MAX # define SCNuPTR @PRIPTR_PREFIX@ "u" # endif # endif # if !defined SCNxPTR || @PRI_MACROS_BROKEN@ # undef SCNxPTR # ifdef UINTPTR_MAX # define SCNxPTR @PRIPTR_PREFIX@ "x" # endif # endif #endif /* 7.8.2 Functions for greatest-width integer types */ #ifdef __cplusplus extern "C" { #endif #if @GNULIB_IMAXABS@ # if !@HAVE_DECL_IMAXABS@ extern intmax_t imaxabs (intmax_t); # endif #elif defined GNULIB_POSIXCHECK # undef imaxabs # if HAVE_RAW_DECL_IMAXABS _GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - " "use gnulib module imaxabs for portability"); # endif #endif #if @GNULIB_IMAXDIV@ # if !@HAVE_DECL_IMAXDIV@ # if !GNULIB_defined_imaxdiv_t typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t; # define GNULIB_defined_imaxdiv_t 1 # endif extern imaxdiv_t imaxdiv (intmax_t, intmax_t); # endif #elif defined GNULIB_POSIXCHECK # undef imaxdiv # if HAVE_RAW_DECL_IMAXDIV _GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - " "use gnulib module imaxdiv for portability"); # endif #endif #if @GNULIB_STRTOIMAX@ # if !@HAVE_DECL_STRTOIMAX@ # undef strtoimax extern intmax_t strtoimax (const char *, char **, int) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef strtoimax # if HAVE_RAW_DECL_STRTOIMAX _GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - " "use gnulib module strtoimax for portability"); # endif #endif #if @GNULIB_STRTOUMAX@ # if !@HAVE_DECL_STRTOUMAX@ # undef strtoumax extern uintmax_t strtoumax (const char *, char **, int) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef strtoumax # if HAVE_RAW_DECL_STRTOUMAX _GL_WARN_ON_USE (strtoumax, "strtoumax is unportable - " "use gnulib module strtoumax for portability"); # endif #endif /* Don't bother defining or declaring wcstoimax and wcstoumax, since wide-character functions like this are hardly ever useful. */ #ifdef __cplusplus } #endif #endif /* !defined INTTYPES_H && !defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H */ gv-3.7.4/lib/getopt1.c0000664000076400007640000001055511735103745011405 00000000000000/* getopt_long and getopt_long_only entry points for GNU getopt. Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef _LIBC # include #else # include # include "getopt.h" #endif #include "getopt_int.h" #include /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ #include #endif #ifndef NULL #define NULL 0 #endif int getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, const struct option *long_options, int *opt_index) { return _getopt_internal (argc, (char **) argv, options, long_options, opt_index, 0, 0); } int _getopt_long_r (int argc, char **argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, 0, d, 0); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option instead. */ int getopt_long_only (int argc, char *__getopt_argv_const *argv, const char *options, const struct option *long_options, int *opt_index) { return _getopt_internal (argc, (char **) argv, options, long_options, opt_index, 1, 0); } int _getopt_long_only_r (int argc, char **argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, 1, d, 0); } #ifdef TEST #include int main (int argc, char **argv) { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; int option_index = 0; static const struct option long_options[] = { {"add", 1, 0, 0}, {"append", 0, 0, 0}, {"delete", 1, 0, 0}, {"verbose", 0, 0, 0}, {"create", 0, 0, 0}, {"file", 1, 0, 0}, {0, 0, 0, 0} }; c = getopt_long (argc, argv, "abc:d:0123456789", long_options, &option_index); if (c == -1) break; switch (c) { case 0: printf ("option %s", long_options[option_index].name); if (optarg) printf (" with arg %s", optarg); printf ("\n"); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case 'd': printf ("option d with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ gv-3.7.4/lib/readlink.c0000664000076400007640000000446611735103745011617 00000000000000/* Stub for readlink(). Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include /* Specification. */ #include #include #include #include #if !HAVE_READLINK /* readlink() substitute for systems that don't have a readlink() function, such as DJGPP 2.03 and mingw32. */ ssize_t readlink (const char *name, char *buf _GL_UNUSED, size_t bufsize _GL_UNUSED) { struct stat statbuf; /* In general we should use lstat() here, not stat(). But on platforms without symbolic links, lstat() - if it exists - would be equivalent to stat(), therefore we can use stat(). This saves us a configure check. */ if (stat (name, &statbuf) >= 0) errno = EINVAL; return -1; } #else /* HAVE_READLINK */ # undef readlink /* readlink() wrapper that uses correct types, for systems like cygwin 1.5.x where readlink returns int, and which rejects trailing slash, for Solaris 9. */ ssize_t rpl_readlink (const char *name, char *buf, size_t bufsize) { # if READLINK_TRAILING_SLASH_BUG size_t len = strlen (name); if (len && name[len - 1] == '/') { /* Even if name without the slash is a symlink to a directory, both lstat() and stat() must resolve the trailing slash to the directory rather than the symlink. We can therefore safely use stat() to distinguish between EINVAL and ENOTDIR/ENOENT, avoiding extra overhead of rpl_lstat(). */ struct stat st; if (stat (name, &st) == 0) errno = EINVAL; return -1; } # endif /* READLINK_TRAILING_SLASH_BUG */ return readlink (name, buf, bufsize); } #endif /* HAVE_READLINK */ gv-3.7.4/lib/tempname.c0000664000076400007640000002200411735103745011620 00000000000000/* tempname.c - generate the name of a temporary file. Copyright (C) 1991-2003, 2005-2007, 2009-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Extracted from glibc sysdeps/posix/tempname.c. See also tmpdir.c. */ #if !_LIBC # include # include "tempname.h" #endif #include #include #include #ifndef __set_errno # define __set_errno(Val) errno = (Val) #endif #include #ifndef P_tmpdir # define P_tmpdir "/tmp" #endif #ifndef TMP_MAX # define TMP_MAX 238328 #endif #ifndef __GT_FILE # define __GT_FILE 0 # define __GT_DIR 1 # define __GT_NOCREATE 2 #endif #if !_LIBC && (GT_FILE != __GT_FILE || GT_DIR != __GT_DIR \ || GT_NOCREATE != __GT_NOCREATE) # error report this to bug-gnulib@gnu.org #endif #include #include #include #include #include #include #include #include #if _LIBC # define struct_stat64 struct stat64 #else # define struct_stat64 struct stat # define __gen_tempname gen_tempname # define __getpid getpid # define __gettimeofday gettimeofday # define __mkdir mkdir # define __open open # define __open64 open # define __lxstat64(version, file, buf) lstat (file, buf) # define __xstat64(version, file, buf) stat (file, buf) #endif #if ! (HAVE___SECURE_GETENV || _LIBC) # define __secure_getenv getenv #endif #ifdef _LIBC # include # if HP_TIMING_AVAIL # define RANDOM_BITS(Var) \ if (__builtin_expect (value == UINT64_C (0), 0)) \ { \ /* If this is the first time this function is used initialize \ the variable we accumulate the value in to some somewhat \ random value. If we'd not do this programs at startup time \ might have a reduced set of possible names, at least on slow \ machines. */ \ struct timeval tv; \ __gettimeofday (&tv, NULL); \ value = ((uint64_t) tv.tv_usec << 16) ^ tv.tv_sec; \ } \ HP_TIMING_NOW (Var) # endif #endif /* Use the widest available unsigned type if uint64_t is not available. The algorithm below extracts a number less than 62**6 (approximately 2**35.725) from uint64_t, so ancient hosts where uintmax_t is only 32 bits lose about 3.725 bits of randomness, which is better than not having mkstemp at all. */ #if !defined UINT64_MAX && !defined uint64_t # define uint64_t uintmax_t #endif #if _LIBC /* Return nonzero if DIR is an existent directory. */ static int direxists (const char *dir) { struct_stat64 buf; return __xstat64 (_STAT_VER, dir, &buf) == 0 && S_ISDIR (buf.st_mode); } /* Path search algorithm, for tmpnam, tmpfile, etc. If DIR is non-null and exists, uses it; otherwise uses the first of $TMPDIR, P_tmpdir, /tmp that exists. Copies into TMPL a template suitable for use with mk[s]temp. Will fail (-1) if DIR is non-null and doesn't exist, none of the searched dirs exists, or there's not enough space in TMPL. */ int __path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx, int try_tmpdir) { const char *d; size_t dlen, plen; if (!pfx || !pfx[0]) { pfx = "file"; plen = 4; } else { plen = strlen (pfx); if (plen > 5) plen = 5; } if (try_tmpdir) { d = __secure_getenv ("TMPDIR"); if (d != NULL && direxists (d)) dir = d; else if (dir != NULL && direxists (dir)) /* nothing */ ; else dir = NULL; } if (dir == NULL) { if (direxists (P_tmpdir)) dir = P_tmpdir; else if (strcmp (P_tmpdir, "/tmp") != 0 && direxists ("/tmp")) dir = "/tmp"; else { __set_errno (ENOENT); return -1; } } dlen = strlen (dir); while (dlen > 1 && dir[dlen - 1] == '/') dlen--; /* remove trailing slashes */ /* check we have room for "${dir}/${pfx}XXXXXX\0" */ if (tmpl_len < dlen + 1 + plen + 6 + 1) { __set_errno (EINVAL); return -1; } sprintf (tmpl, "%.*s/%.*sXXXXXX", (int) dlen, dir, (int) plen, pfx); return 0; } #endif /* _LIBC */ /* These are the characters used in temporary file names. */ static const char letters[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; /* Generate a temporary file name based on TMPL. TMPL must match the rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix). The name constructed does not exist at the time of the call to __gen_tempname. TMPL is overwritten with the result. KIND may be one of: __GT_NOCREATE: simply verify that the name does not exist at the time of the call. __GT_FILE: create the file using open(O_CREAT|O_EXCL) and return a read-write fd. The file is mode 0600. __GT_DIR: create a directory, which will be mode 0700. We use a clever algorithm to get hard-to-predict names. */ int __gen_tempname (char *tmpl, int suffixlen, int flags, int kind) { int len; char *XXXXXX; static uint64_t value; uint64_t random_time_bits; unsigned int count; int fd = -1; int save_errno = errno; struct_stat64 st; /* A lower bound on the number of temporary files to attempt to generate. The maximum total number of temporary file names that can exist for a given template is 62**6. It should never be necessary to try all these combinations. Instead if a reasonable number of names is tried (we define reasonable as 62**3) fail to give the system administrator the chance to remove the problems. */ #define ATTEMPTS_MIN (62 * 62 * 62) /* The number of times to attempt to generate a temporary file. To conform to POSIX, this must be no smaller than TMP_MAX. */ #if ATTEMPTS_MIN < TMP_MAX unsigned int attempts = TMP_MAX; #else unsigned int attempts = ATTEMPTS_MIN; #endif len = strlen (tmpl); if (len < 6 + suffixlen || memcmp (&tmpl[len - 6 - suffixlen], "XXXXXX", 6)) { __set_errno (EINVAL); return -1; } /* This is where the Xs start. */ XXXXXX = &tmpl[len - 6 - suffixlen]; /* Get some more or less random data. */ #ifdef RANDOM_BITS RANDOM_BITS (random_time_bits); #else { struct timeval tv; __gettimeofday (&tv, NULL); random_time_bits = ((uint64_t) tv.tv_usec << 16) ^ tv.tv_sec; } #endif value += random_time_bits ^ __getpid (); for (count = 0; count < attempts; value += 7777, ++count) { uint64_t v = value; /* Fill in the random bits. */ XXXXXX[0] = letters[v % 62]; v /= 62; XXXXXX[1] = letters[v % 62]; v /= 62; XXXXXX[2] = letters[v % 62]; v /= 62; XXXXXX[3] = letters[v % 62]; v /= 62; XXXXXX[4] = letters[v % 62]; v /= 62; XXXXXX[5] = letters[v % 62]; switch (kind) { case __GT_FILE: fd = __open (tmpl, (flags & ~O_ACCMODE) | O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); break; case __GT_DIR: fd = __mkdir (tmpl, S_IRUSR | S_IWUSR | S_IXUSR); break; case __GT_NOCREATE: /* This case is backward from the other three. __gen_tempname succeeds if __xstat fails because the name does not exist. Note the continue to bypass the common logic at the bottom of the loop. */ if (__lxstat64 (_STAT_VER, tmpl, &st) < 0) { if (errno == ENOENT) { __set_errno (save_errno); return 0; } else /* Give up now. */ return -1; } continue; default: assert (! "invalid KIND in __gen_tempname"); abort (); } if (fd >= 0) { __set_errno (save_errno); return fd; } else if (errno != EEXIST) return -1; } /* We got out of the loop because we ran out of combinations to try. */ __set_errno (EEXIST); return -1; } gv-3.7.4/lib/alloca.in.h0000664000076400007640000000355211735103745011666 00000000000000/* Memory allocation on the stack. Copyright (C) 1995, 1999, 2001-2004, 2006-2011 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H means there is a real alloca function. */ #ifndef _GL_ALLOCA_H #define _GL_ALLOCA_H /* alloca (N) returns a pointer to N bytes of memory allocated on the stack, which will last until the function returns. Use of alloca should be avoided: - inside arguments of function calls - undefined behaviour, - in inline functions - the allocation may actually last until the calling function returns, - for huge N (say, N >= 65536) - you never know how large (or small) the stack is, and when the stack cannot fulfill the memory allocation request, the program just crashes. */ #ifndef alloca # ifdef __GNUC__ # define alloca __builtin_alloca # elif defined _AIX # define alloca __alloca # elif defined _MSC_VER # include # define alloca _alloca # elif defined __DECC && defined __VMS # define alloca __ALLOCA # else # include # ifdef __cplusplus extern "C" # endif void *alloca (size_t); # endif #endif #endif /* _GL_ALLOCA_H */ gv-3.7.4/lib/lstat.c0000664000076400007640000000617211735103745011151 00000000000000/* Work around a bug of lstat on some systems Copyright (C) 1997-2006, 2008-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* written by Jim Meyering */ #include #if !HAVE_LSTAT /* On systems that lack symlinks, our replacement already defined lstat as stat, so there is nothing further to do other than avoid an empty file. */ typedef int dummy; #else /* HAVE_LSTAT */ /* Get the original definition of lstat. It might be defined as a macro. */ # define __need_system_sys_stat_h # include # include # undef __need_system_sys_stat_h static inline int orig_lstat (const char *filename, struct stat *buf) { return lstat (filename, buf); } /* Specification. */ # include # include # include /* lstat works differently on Linux and Solaris systems. POSIX (see `pathname resolution' in the glossary) requires that programs like `ls' take into consideration the fact that FILE has a trailing slash when FILE is a symbolic link. On Linux and Solaris 10 systems, the lstat function already has the desired semantics (in treating `lstat ("symlink/", sbuf)' just like `lstat ("symlink/.", sbuf)', but on Solaris 9 and earlier it does not. If FILE has a trailing slash and specifies a symbolic link, then use stat() to get more info on the referent of FILE. If the referent is a non-directory, then set errno to ENOTDIR and return -1. Otherwise, return stat's result. */ int rpl_lstat (const char *file, struct stat *sbuf) { size_t len; int lstat_result = orig_lstat (file, sbuf); if (lstat_result != 0) return lstat_result; /* This replacement file can blindly check against '/' rather than using the ISSLASH macro, because all platforms with '\\' either lack symlinks (mingw) or have working lstat (cygwin) and thus do not compile this file. 0 len should have already been filtered out above, with a failure return of ENOENT. */ len = strlen (file); if (file[len - 1] != '/' || S_ISDIR (sbuf->st_mode)) return 0; /* At this point, a trailing slash is only permitted on symlink-to-dir; but it should have found information on the directory, not the symlink. Call stat() to get info about the link's referent. Our replacement stat guarantees valid results, even if the symlink is not pointing to a directory. */ if (!S_ISLNK (sbuf->st_mode)) { errno = ENOTDIR; return -1; } return stat (file, sbuf); } #endif /* HAVE_LSTAT */ gv-3.7.4/lib/gettimeofday.c0000664000076400007640000000744111735103745012503 00000000000000/* Provide gettimeofday for systems that don't have it or for which it's broken. Copyright (C) 2001-2003, 2005-2007, 2009-2011 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* written by Jim Meyering */ #include /* Specification. */ #include #include #if HAVE_SYS_TIMEB_H # include #endif #if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME /* Work around the bug in some systems whereby gettimeofday clobbers the static buffer that localtime uses for its return value. The gettimeofday function from Mac OS X 10.0.4 (i.e., Darwin 1.3.7) has this problem. The tzset replacement is necessary for at least Solaris 2.5, 2.5.1, and 2.6. */ static struct tm tm_zero_buffer; static struct tm *localtime_buffer_addr = &tm_zero_buffer; # undef localtime extern struct tm *localtime (time_t const *); # undef gmtime extern struct tm *gmtime (time_t const *); /* This is a wrapper for localtime. It is used only on systems for which gettimeofday clobbers the static buffer used for localtime's result. On the first call, record the address of the static buffer that localtime uses for its result. */ struct tm * rpl_localtime (time_t const *timep) { struct tm *tm = localtime (timep); if (localtime_buffer_addr == &tm_zero_buffer) localtime_buffer_addr = tm; return tm; } /* Same as above, since gmtime and localtime use the same buffer. */ struct tm * rpl_gmtime (time_t const *timep) { struct tm *tm = gmtime (timep); if (localtime_buffer_addr == &tm_zero_buffer) localtime_buffer_addr = tm; return tm; } #endif /* GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME */ #if TZSET_CLOBBERS_LOCALTIME # undef tzset extern void tzset (void); /* This is a wrapper for tzset, for systems on which tzset may clobber the static buffer used for localtime's result. */ void rpl_tzset (void) { /* Save and restore the contents of the buffer used for localtime's result around the call to tzset. */ struct tm save = *localtime_buffer_addr; tzset (); *localtime_buffer_addr = save; } #endif /* This is a wrapper for gettimeofday. It is used only on systems that lack this function, or whose implementation of this function causes problems. */ int gettimeofday (struct timeval *restrict tv, void *restrict tz) { #undef gettimeofday #if HAVE_GETTIMEOFDAY # if GETTIMEOFDAY_CLOBBERS_LOCALTIME /* Save and restore the contents of the buffer used for localtime's result around the call to gettimeofday. */ struct tm save = *localtime_buffer_addr; # endif int result = gettimeofday (tv, (struct timezone *) tz); # if GETTIMEOFDAY_CLOBBERS_LOCALTIME *localtime_buffer_addr = save; # endif return result; #else # if HAVE__FTIME struct _timeb timebuf; _ftime (&timebuf); tv->tv_sec = timebuf.time; tv->tv_usec = timebuf.millitm * 1000; # else # if !defined OK_TO_USE_1S_CLOCK # error "Only 1-second nominal clock resolution found. Is that intended?" \ "If so, compile with the -DOK_TO_USE_1S_CLOCK option." # endif tv->tv_sec = time (NULL); tv->tv_usec = 0; # endif return 0; #endif } gv-3.7.4/lib/getopt.c0000664000076400007640000011450211735103745011321 00000000000000/* Getopt for GNU. NOTE: getopt is part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef _LIBC # include #endif #include "getopt.h" #include #include #include #include #ifdef _LIBC # include #else # include "gettext.h" # define _(msgid) gettext (msgid) #endif #if defined _LIBC && defined USE_IN_LIBIO # include #endif /* This version of `getopt' appears to the caller like standard Unix `getopt' but it behaves differently for the user, since it allows the user to intersperse the options with the other arguments. As `getopt_long' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. Using `getopt' or setting the environment variable POSIXLY_CORRECT disables permutation. Then the behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #include "getopt_int.h" /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* 1003.2 says this must be 1 before any call. */ int optind = 1; /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ int optopt = '?'; /* Keep a global copy of all internal members of getopt_data. */ static struct _getopt_data getopt_data; #if defined HAVE_DECL_GETENV && !HAVE_DECL_GETENV extern char *getenv (); #endif #ifdef _LIBC /* Stored original parameters. XXX This is no good solution. We should rather copy the args so that we can compare them later. But we must not use malloc(3). */ extern int __libc_argc; extern char **__libc_argv; /* Bash 2.0 gives us an environment variable containing flags indicating ARGV elements that should not be considered arguments. */ # ifdef USE_NONOPTION_FLAGS /* Defined in getopt_init.c */ extern char *__getopt_nonoption_flags; # endif # ifdef USE_NONOPTION_FLAGS # define SWAP_FLAGS(ch1, ch2) \ if (d->__nonoption_flags_len > 0) \ { \ char __tmp = __getopt_nonoption_flags[ch1]; \ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ __getopt_nonoption_flags[ch2] = __tmp; \ } # else # define SWAP_FLAGS(ch1, ch2) # endif #else /* !_LIBC */ # define SWAP_FLAGS(ch1, ch2) #endif /* _LIBC */ /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ static void exchange (char **argv, struct _getopt_data *d) { int bottom = d->__first_nonopt; int middle = d->__last_nonopt; int top = d->optind; char *tem; /* Exchange the shorter segment with the far end of the longer segment. That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ #if defined _LIBC && defined USE_NONOPTION_FLAGS /* First make sure the handling of the `__getopt_nonoption_flags' string can work normally. Our top argument must be in the range of the string. */ if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len) { /* We must extend the array. The user plays games with us and presents new arguments. */ char *new_str = malloc (top + 1); if (new_str == NULL) d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0; else { memset (__mempcpy (new_str, __getopt_nonoption_flags, d->__nonoption_flags_max_len), '\0', top + 1 - d->__nonoption_flags_max_len); d->__nonoption_flags_max_len = top + 1; __getopt_nonoption_flags = new_str; } } #endif while (top > middle && middle > bottom) { if (top - middle > middle - bottom) { /* Bottom segment is the short one. */ int len = middle - bottom; register int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); } /* Exclude the moved bottom segment from further swapping. */ top -= len; } else { /* Top segment is the short one. */ int len = top - middle; register int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; SWAP_FLAGS (bottom + i, middle + i); } /* Exclude the moved top segment from further swapping. */ bottom += len; } } /* Update records for the slots the non-options now occupy. */ d->__first_nonopt += (d->optind - d->__last_nonopt); d->__last_nonopt = d->optind; } /* Initialize the internal data when the first call is made. */ static const char * _getopt_initialize (int argc _GL_UNUSED, char **argv _GL_UNUSED, const char *optstring, struct _getopt_data *d, int posixly_correct) { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ d->__first_nonopt = d->__last_nonopt = d->optind; d->__nextchar = NULL; d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT"); /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { d->__ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { d->__ordering = REQUIRE_ORDER; ++optstring; } else if (d->__posixly_correct) d->__ordering = REQUIRE_ORDER; else d->__ordering = PERMUTE; #if defined _LIBC && defined USE_NONOPTION_FLAGS if (!d->__posixly_correct && argc == __libc_argc && argv == __libc_argv) { if (d->__nonoption_flags_max_len == 0) { if (__getopt_nonoption_flags == NULL || __getopt_nonoption_flags[0] == '\0') d->__nonoption_flags_max_len = -1; else { const char *orig_str = __getopt_nonoption_flags; int len = d->__nonoption_flags_max_len = strlen (orig_str); if (d->__nonoption_flags_max_len < argc) d->__nonoption_flags_max_len = argc; __getopt_nonoption_flags = (char *) malloc (d->__nonoption_flags_max_len); if (__getopt_nonoption_flags == NULL) d->__nonoption_flags_max_len = -1; else memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), '\0', d->__nonoption_flags_max_len - len); } } d->__nonoption_flags_len = d->__nonoption_flags_max_len; } else d->__nonoption_flags_len = 0; #endif return optstring; } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If `getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. If `getopt' finds another option character, it returns that character, updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, `getopt' returns -1. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set `opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in `optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in `optarg', otherwise `optarg' is set to zero. If OPTSTRING starts with `-' or `+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. Long-named options begin with `--' instead of `-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated from the option name by a `=', or else the in next ARGV-element. When `getopt' finds a long-named option, it returns 0 if that option's `flag' field is nonzero, the value of the option's `val' field if the `flag' field is zero. The elements of ARGV aren't really const, because we permute them. But we pretend they're const in the prototype to be compatible with other systems. LONGOPTS is a vector of `struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. It is only valid when a long-named option has been found by the most recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ int _getopt_internal_r (int argc, char **argv, const char *optstring, const struct option *longopts, int *longind, int long_only, struct _getopt_data *d, int posixly_correct) { int print_errors = d->opterr; if (argc < 1) return -1; d->optarg = NULL; if (d->optind == 0 || !d->__initialized) { if (d->optind == 0) d->optind = 1; /* Don't scan ARGV[0], the program name. */ optstring = _getopt_initialize (argc, argv, optstring, d, posixly_correct); d->__initialized = 1; } else if (optstring[0] == '-' || optstring[0] == '+') optstring++; if (optstring[0] == ':') print_errors = 0; /* Test whether ARGV[optind] points to a non-option argument. Either it does not have option syntax, or there is an environment flag from the shell indicating it is not an option. The later information is only used when the used in the GNU libc. */ #if defined _LIBC && defined USE_NONOPTION_FLAGS # define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \ || (d->optind < d->__nonoption_flags_len \ && __getopt_nonoption_flags[d->optind] == '1')) #else # define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0') #endif if (d->__nextchar == NULL || *d->__nextchar == '\0') { /* Advance to the next ARGV-element. */ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been moved back by the user (who may also have changed the arguments). */ if (d->__last_nonopt > d->optind) d->__last_nonopt = d->optind; if (d->__first_nonopt > d->optind) d->__first_nonopt = d->optind; if (d->__ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (d->__first_nonopt != d->__last_nonopt && d->__last_nonopt != d->optind) exchange ((char **) argv, d); else if (d->__last_nonopt != d->optind) d->__first_nonopt = d->optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (d->optind < argc && NONOPTION_P) d->optind++; d->__last_nonopt = d->optind; } /* The special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (d->optind != argc && !strcmp (argv[d->optind], "--")) { d->optind++; if (d->__first_nonopt != d->__last_nonopt && d->__last_nonopt != d->optind) exchange ((char **) argv, d); else if (d->__first_nonopt == d->__last_nonopt) d->__first_nonopt = d->optind; d->__last_nonopt = argc; d->optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (d->optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (d->__first_nonopt != d->__last_nonopt) d->optind = d->__first_nonopt; return -1; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if (NONOPTION_P) { if (d->__ordering == REQUIRE_ORDER) return -1; d->optarg = argv[d->optind++]; return 1; } /* We have found another option-ARGV-element. Skip the initial punctuation. */ d->__nextchar = (argv[d->optind] + 1 + (longopts != NULL && argv[d->optind][1] == '-')); } /* Decode the current option-ARGV-element. */ /* Check whether the ARGV-element is a long option. If long_only and the ARGV-element has the form "-f", where f is a valid short option, don't consider it an abbreviated form of a long option that starts with f. Otherwise there would be no way to give the -f short option. On the other hand, if there's a long option "fubar" and the ARGV-element is "-fu", do consider that an abbreviation of the long option, just like "--fu", and not "-f" with arg "u". This distinction seems to be the most useful approach. */ if (longopts != NULL && (argv[d->optind][1] == '-' || (long_only && (argv[d->optind][2] || !strchr (optstring, argv[d->optind][1]))))) { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = -1; int option_index; for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar)) { if ((unsigned int) (nameend - d->__nextchar) == (unsigned int) strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("%s: option '%s' is ambiguous\n"), argv[0], argv[d->optind]) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option '%s' is ambiguous\n"), argv[0], argv[d->optind]); #endif } d->__nextchar += strlen (d->__nextchar); d->optind++; d->optopt = 0; return '?'; } if (pfound != NULL) { option_index = indfound; d->optind++; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) d->optarg = nameend + 1; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; int n; #endif if (argv[d->optind - 1][1] == '-') { /* --option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("\ %s: option '--%s' doesn't allow an argument\n"), argv[0], pfound->name); #else fprintf (stderr, _("\ %s: option '--%s' doesn't allow an argument\n"), argv[0], pfound->name); #endif } else { /* +option or -option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("\ %s: option '%c%s' doesn't allow an argument\n"), argv[0], argv[d->optind - 1][0], pfound->name); #else fprintf (stderr, _("\ %s: option '%c%s' doesn't allow an argument\n"), argv[0], argv[d->optind - 1][0], pfound->name); #endif } #if defined _LIBC && defined USE_IN_LIBIO if (n >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #endif } d->__nextchar += strlen (d->__nextchar); d->optopt = pfound->val; return '?'; } } else if (pfound->has_arg == 1) { if (d->optind < argc) d->optarg = argv[d->optind++]; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option '--%s' requires an argument\n"), argv[0], pfound->name) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option '--%s' requires an argument\n"), argv[0], pfound->name); #endif } d->__nextchar += strlen (d->__nextchar); d->optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } d->__nextchar += strlen (d->__nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[d->optind][1] == '-' || strchr (optstring, *d->__nextchar) == NULL) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; int n; #endif if (argv[d->optind][1] == '-') { /* --option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("%s: unrecognized option '--%s'\n"), argv[0], d->__nextchar); #else fprintf (stderr, _("%s: unrecognized option '--%s'\n"), argv[0], d->__nextchar); #endif } else { /* +option or -option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("%s: unrecognized option '%c%s'\n"), argv[0], argv[d->optind][0], d->__nextchar); #else fprintf (stderr, _("%s: unrecognized option '%c%s'\n"), argv[0], argv[d->optind][0], d->__nextchar); #endif } #if defined _LIBC && defined USE_IN_LIBIO if (n >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #endif } d->__nextchar = (char *) ""; d->optind++; d->optopt = 0; return '?'; } } /* Look at and handle the next short option-character. */ { char c = *d->__nextchar++; const char *temp = strchr (optstring, c); /* Increment `optind' when we start to process its last character. */ if (*d->__nextchar == '\0') ++d->optind; if (temp == NULL || c == ':' || c == ';') { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; int n; #endif #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"), argv[0], c); #else fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c); #endif #if defined _LIBC && defined USE_IN_LIBIO if (n >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #endif } d->optopt = c; return '?'; } /* Convenience. Treat POSIX -W foo same as long option --foo */ if (temp[0] == 'W' && temp[1] == ';') { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = 0; int option_index; /* This is an option that requires an argument. */ if (*d->__nextchar != '\0') { d->optarg = d->__nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ d->optind++; } else if (d->optind == argc) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("%s: option requires an argument -- '%c'\n"), argv[0], c) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option requires an argument -- '%c'\n"), argv[0], c); #endif } d->optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; return c; } else /* We already incremented `d->optind' once; increment it again when taking next ARGV-elt as argument. */ d->optarg = argv[d->optind++]; /* optarg is now the argument, see if it's in the table of longopts. */ for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar)) { if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"), argv[0], d->optarg) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"), argv[0], d->optarg); #endif } d->__nextchar += strlen (d->__nextchar); d->optind++; return '?'; } if (pfound != NULL) { option_index = indfound; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) d->optarg = nameend + 1; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option '-W %s' doesn't allow an argument\n"), argv[0], pfound->name) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("\ %s: option '-W %s' doesn't allow an argument\n"), argv[0], pfound->name); #endif } d->__nextchar += strlen (d->__nextchar); return '?'; } } else if (pfound->has_arg == 1) { if (d->optind < argc) d->optarg = argv[d->optind++]; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option '-W %s' requires an argument\n"), argv[0], pfound->name) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("\ %s: option '-W %s' requires an argument\n"), argv[0], pfound->name); #endif } d->__nextchar += strlen (d->__nextchar); return optstring[0] == ':' ? ':' : '?'; } } else d->optarg = NULL; d->__nextchar += strlen (d->__nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } d->__nextchar = NULL; return 'W'; /* Let the application handle it. */ } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*d->__nextchar != '\0') { d->optarg = d->__nextchar; d->optind++; } else d->optarg = NULL; d->__nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*d->__nextchar != '\0') { d->optarg = d->__nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ d->optind++; } else if (d->optind == argc) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option requires an argument -- '%c'\n"), argv[0], c) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option requires an argument -- '%c'\n"), argv[0], c); #endif } d->optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ d->optarg = argv[d->optind++]; d->__nextchar = NULL; } } return c; } } int _getopt_internal (int argc, char **argv, const char *optstring, const struct option *longopts, int *longind, int long_only, int posixly_correct) { int result; getopt_data.optind = optind; getopt_data.opterr = opterr; result = _getopt_internal_r (argc, argv, optstring, longopts, longind, long_only, &getopt_data, posixly_correct); optind = getopt_data.optind; optarg = getopt_data.optarg; optopt = getopt_data.optopt; return result; } /* glibc gets a LSB-compliant getopt. Standalone applications get a POSIX-compliant getopt. */ #if _LIBC enum { POSIXLY_CORRECT = 0 }; #else enum { POSIXLY_CORRECT = 1 }; #endif int getopt (int argc, char *const *argv, const char *optstring) { return _getopt_internal (argc, (char **) argv, optstring, (const struct option *) 0, (int *) 0, 0, POSIXLY_CORRECT); } #ifdef _LIBC int __posix_getopt (int argc, char *const *argv, const char *optstring) { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0, 1); } #endif #ifdef TEST /* Compile with -DTEST to make an executable for use in testing the above definition of `getopt'. */ int main (int argc, char **argv) { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; c = getopt (argc, argv, "abc:d:0123456789"); if (c == -1) break; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value '%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ gv-3.7.4/lib/unistd.in.h0000664000076400007640000013517011735103745011743 00000000000000/* Substitute for and wrapper around . Copyright (C) 2003-2011 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* Special invocation convention: - On mingw, several headers, including , include , but we need to ensure that both the system and are completely included before we replace gethostname. */ #if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \ && !defined _GL_WINSOCK2_H_WITNESS && defined _WINSOCK2_H /* is being indirectly included for the first time from ; avoid declaring any overrides. */ # if @HAVE_UNISTD_H@ # @INCLUDE_NEXT@ @NEXT_UNISTD_H@ # else # error unexpected; report this to bug-gnulib@gnu.org # endif # define _GL_WINSOCK2_H_WITNESS /* Normal invocation. */ #elif !defined _GL_UNISTD_H /* The include_next requires a split double-inclusion guard. */ #if @HAVE_UNISTD_H@ # @INCLUDE_NEXT@ @NEXT_UNISTD_H@ #endif /* Get all possible declarations of gethostname(). */ #if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \ && !defined _GL_INCLUDING_WINSOCK2_H # define _GL_INCLUDING_WINSOCK2_H # include # undef _GL_INCLUDING_WINSOCK2_H #endif #if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H #define _GL_UNISTD_H /* NetBSD 5.0 mis-defines NULL. Also get size_t. */ #include /* mingw doesn't define the SEEK_* or *_FILENO macros in . */ /* Cygwin 1.7.1 declares symlinkat in , not in . */ /* But avoid namespace pollution on glibc systems. */ #if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \ || ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \ && defined __CYGWIN__)) \ && ! defined __GLIBC__ # include #endif /* Cygwin 1.7.1 declares unlinkat in , not in . */ /* But avoid namespace pollution on glibc systems. */ #if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && defined __CYGWIN__ \ && ! defined __GLIBC__ # include #endif /* mingw fails to declare _exit in . */ /* mingw, BeOS, Haiku declare environ in , not in . */ /* Solaris declares getcwd not only in but also in . */ /* But avoid namespace pollution on glibc systems. */ #ifndef __GLIBC__ # include #endif /* mingw declares getcwd in , not in . */ #if ((@GNULIB_GETCWD@ || defined GNULIB_POSIXCHECK) \ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) # include #endif /* AIX and OSF/1 5.1 declare getdomainname in , not in . NonStop Kernel declares gethostname in , not in . */ /* But avoid namespace pollution on glibc systems. */ #if ((@GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__)) \ || (@GNULIB_GETHOSTNAME@ && defined __TANDEM)) \ && !defined __GLIBC__ # include #endif #if (@GNULIB_READ@ || @GNULIB_WRITE@ \ || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \ || @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK) /* Get ssize_t. */ # include #endif /* Get getopt(), optarg, optind, opterr, optopt. But avoid namespace pollution on glibc systems. */ #if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT # include #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ #if @GNULIB_GETHOSTNAME@ /* Get all possible declarations of gethostname(). */ # if @UNISTD_H_HAVE_WINSOCK2_H@ # if !defined _GL_SYS_SOCKET_H # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef socket # define socket socket_used_without_including_sys_socket_h # undef connect # define connect connect_used_without_including_sys_socket_h # undef accept # define accept accept_used_without_including_sys_socket_h # undef bind # define bind bind_used_without_including_sys_socket_h # undef getpeername # define getpeername getpeername_used_without_including_sys_socket_h # undef getsockname # define getsockname getsockname_used_without_including_sys_socket_h # undef getsockopt # define getsockopt getsockopt_used_without_including_sys_socket_h # undef listen # define listen listen_used_without_including_sys_socket_h # undef recv # define recv recv_used_without_including_sys_socket_h # undef send # define send send_used_without_including_sys_socket_h # undef recvfrom # define recvfrom recvfrom_used_without_including_sys_socket_h # undef sendto # define sendto sendto_used_without_including_sys_socket_h # undef setsockopt # define setsockopt setsockopt_used_without_including_sys_socket_h # undef shutdown # define shutdown shutdown_used_without_including_sys_socket_h # else _GL_WARN_ON_USE (socket, "socket() used without including "); _GL_WARN_ON_USE (connect, "connect() used without including "); _GL_WARN_ON_USE (accept, "accept() used without including "); _GL_WARN_ON_USE (bind, "bind() used without including "); _GL_WARN_ON_USE (getpeername, "getpeername() used without including "); _GL_WARN_ON_USE (getsockname, "getsockname() used without including "); _GL_WARN_ON_USE (getsockopt, "getsockopt() used without including "); _GL_WARN_ON_USE (listen, "listen() used without including "); _GL_WARN_ON_USE (recv, "recv() used without including "); _GL_WARN_ON_USE (send, "send() used without including "); _GL_WARN_ON_USE (recvfrom, "recvfrom() used without including "); _GL_WARN_ON_USE (sendto, "sendto() used without including "); _GL_WARN_ON_USE (setsockopt, "setsockopt() used without including "); _GL_WARN_ON_USE (shutdown, "shutdown() used without including "); # endif # endif # if !defined _GL_SYS_SELECT_H # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef select # define select select_used_without_including_sys_select_h # else _GL_WARN_ON_USE (select, "select() used without including "); # endif # endif # endif #endif /* OS/2 EMX lacks these macros. */ #ifndef STDIN_FILENO # define STDIN_FILENO 0 #endif #ifndef STDOUT_FILENO # define STDOUT_FILENO 1 #endif #ifndef STDERR_FILENO # define STDERR_FILENO 2 #endif /* Ensure *_OK macros exist. */ #ifndef F_OK # define F_OK 0 # define X_OK 1 # define W_OK 2 # define R_OK 4 #endif /* Declare overridden functions. */ #if defined GNULIB_POSIXCHECK /* The access() function is a security risk. */ _GL_WARN_ON_USE (access, "the access function is a security risk - " "use the gnulib module faccessat instead"); #endif #if @GNULIB_CHOWN@ /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE to GID (if GID is not -1). Follow symbolic links. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ # if @REPLACE_CHOWN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef chown # define chown rpl_chown # endif _GL_FUNCDECL_RPL (chown, int, (const char *file, uid_t uid, gid_t gid) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (chown, int, (const char *file, uid_t uid, gid_t gid)); # else # if !@HAVE_CHOWN@ _GL_FUNCDECL_SYS (chown, int, (const char *file, uid_t uid, gid_t gid) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (chown, int, (const char *file, uid_t uid, gid_t gid)); # endif _GL_CXXALIASWARN (chown); #elif defined GNULIB_POSIXCHECK # undef chown # if HAVE_RAW_DECL_CHOWN _GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and " "doesn't treat a uid or gid of -1 on some systems - " "use gnulib module chown for portability"); # endif #endif #if @GNULIB_CLOSE@ # if @REPLACE_CLOSE@ /* Automatically included by modules that need a replacement for close. */ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef close # define close rpl_close # endif _GL_FUNCDECL_RPL (close, int, (int fd)); _GL_CXXALIAS_RPL (close, int, (int fd)); # else _GL_CXXALIAS_SYS (close, int, (int fd)); # endif _GL_CXXALIASWARN (close); #elif @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ # undef close # define close close_used_without_requesting_gnulib_module_close #elif defined GNULIB_POSIXCHECK # undef close /* Assume close is always declared. */ _GL_WARN_ON_USE (close, "close does not portably work on sockets - " "use gnulib module close for portability"); #endif #if @REPLACE_DUP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dup rpl_dup # endif _GL_FUNCDECL_RPL (dup, int, (int oldfd)); _GL_CXXALIAS_RPL (dup, int, (int oldfd)); #else _GL_CXXALIAS_SYS (dup, int, (int oldfd)); #endif _GL_CXXALIASWARN (dup); #if @GNULIB_DUP2@ /* Copy the file descriptor OLDFD into file descriptor NEWFD. Do nothing if NEWFD = OLDFD, otherwise close NEWFD first if it is open. Return newfd if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ # if @REPLACE_DUP2@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dup2 rpl_dup2 # endif _GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd)); _GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); # else # if !@HAVE_DUP2@ _GL_FUNCDECL_SYS (dup2, int, (int oldfd, int newfd)); # endif _GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); # endif _GL_CXXALIASWARN (dup2); #elif defined GNULIB_POSIXCHECK # undef dup2 # if HAVE_RAW_DECL_DUP2 _GL_WARN_ON_USE (dup2, "dup2 is unportable - " "use gnulib module dup2 for portability"); # endif #endif #if @GNULIB_DUP3@ /* Copy the file descriptor OLDFD into file descriptor NEWFD, with the specified flags. The flags are a bitmask, possibly including O_CLOEXEC (defined in ) and O_TEXT, O_BINARY (defined in "binary-io.h"). Close NEWFD first if it is open. Return newfd if successful, otherwise -1 and errno set. See the Linux man page at . */ # if @HAVE_DUP3@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dup3 rpl_dup3 # endif _GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags)); _GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags)); # else _GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags)); _GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags)); # endif _GL_CXXALIASWARN (dup3); #elif defined GNULIB_POSIXCHECK # undef dup3 # if HAVE_RAW_DECL_DUP3 _GL_WARN_ON_USE (dup3, "dup3 is unportable - " "use gnulib module dup3 for portability"); # endif #endif #if @GNULIB_ENVIRON@ # if !@HAVE_DECL_ENVIRON@ /* Set of environment variables and values. An array of strings of the form "VARIABLE=VALUE", terminated with a NULL. */ # if defined __APPLE__ && defined __MACH__ # include # define environ (*_NSGetEnviron ()) # else # ifdef __cplusplus extern "C" { # endif extern char **environ; # ifdef __cplusplus } # endif # endif # endif #elif defined GNULIB_POSIXCHECK # if HAVE_RAW_DECL_ENVIRON static inline char *** rpl_environ (void) { return &environ; } _GL_WARN_ON_USE (rpl_environ, "environ is unportable - " "use gnulib module environ for portability"); # undef environ # define environ (*rpl_environ ()) # endif #endif #if @GNULIB_EUIDACCESS@ /* Like access(), except that it uses the effective user id and group id of the current process. */ # if !@HAVE_EUIDACCESS@ _GL_FUNCDECL_SYS (euidaccess, int, (const char *filename, int mode) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (euidaccess, int, (const char *filename, int mode)); _GL_CXXALIASWARN (euidaccess); # if defined GNULIB_POSIXCHECK /* Like access(), this function is a security risk. */ _GL_WARN_ON_USE (euidaccess, "the euidaccess function is a security risk - " "use the gnulib module faccessat instead"); # endif #elif defined GNULIB_POSIXCHECK # undef euidaccess # if HAVE_RAW_DECL_EUIDACCESS _GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - " "use gnulib module euidaccess for portability"); # endif #endif #if @GNULIB_FACCESSAT@ # if !@HAVE_FACCESSAT@ _GL_FUNCDECL_SYS (faccessat, int, (int fd, char const *file, int mode, int flag) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (faccessat, int, (int fd, char const *file, int mode, int flag)); _GL_CXXALIASWARN (faccessat); #elif defined GNULIB_POSIXCHECK # undef faccessat # if HAVE_RAW_DECL_FACCESSAT _GL_WARN_ON_USE (faccessat, "faccessat is not portable - " "use gnulib module faccessat for portability"); # endif #endif #if @GNULIB_FCHDIR@ /* Change the process' current working directory to the directory on which the given file descriptor is open. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ # if ! @HAVE_FCHDIR@ _GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); /* Gnulib internal hooks needed to maintain the fchdir metadata. */ _GL_EXTERN_C int _gl_register_fd (int fd, const char *filename) _GL_ARG_NONNULL ((2)); _GL_EXTERN_C void _gl_unregister_fd (int fd); _GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd); _GL_EXTERN_C const char *_gl_directory_name (int fd); # else # if !@HAVE_DECL_FCHDIR@ _GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); # endif # endif _GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/)); _GL_CXXALIASWARN (fchdir); #elif defined GNULIB_POSIXCHECK # undef fchdir # if HAVE_RAW_DECL_FCHDIR _GL_WARN_ON_USE (fchdir, "fchdir is unportable - " "use gnulib module fchdir for portability"); # endif #endif #if @GNULIB_FCHOWNAT@ # if @REPLACE_FCHOWNAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fchownat # define fchownat rpl_fchownat # endif _GL_FUNCDECL_RPL (fchownat, int, (int fd, char const *file, uid_t owner, gid_t group, int flag) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (fchownat, int, (int fd, char const *file, uid_t owner, gid_t group, int flag)); # else # if !@HAVE_FCHOWNAT@ _GL_FUNCDECL_SYS (fchownat, int, (int fd, char const *file, uid_t owner, gid_t group, int flag) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (fchownat, int, (int fd, char const *file, uid_t owner, gid_t group, int flag)); # endif _GL_CXXALIASWARN (fchownat); #elif defined GNULIB_POSIXCHECK # undef fchownat # if HAVE_RAW_DECL_FCHOWNAT _GL_WARN_ON_USE (fchownat, "fchownat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @GNULIB_FSYNC@ /* Synchronize changes to a file. Return 0 if successful, otherwise -1 and errno set. See POSIX:2001 specification . */ # if !@HAVE_FSYNC@ _GL_FUNCDECL_SYS (fsync, int, (int fd)); # endif _GL_CXXALIAS_SYS (fsync, int, (int fd)); _GL_CXXALIASWARN (fsync); #elif defined GNULIB_POSIXCHECK # undef fsync # if HAVE_RAW_DECL_FSYNC _GL_WARN_ON_USE (fsync, "fsync is unportable - " "use gnulib module fsync for portability"); # endif #endif #if @GNULIB_FTRUNCATE@ /* Change the size of the file to which FD is opened to become equal to LENGTH. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ # if !@HAVE_FTRUNCATE@ _GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length)); # endif _GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length)); _GL_CXXALIASWARN (ftruncate); #elif defined GNULIB_POSIXCHECK # undef ftruncate # if HAVE_RAW_DECL_FTRUNCATE _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " "use gnulib module ftruncate for portability"); # endif #endif #if @GNULIB_GETCWD@ /* Get the name of the current working directory, and put it in SIZE bytes of BUF. Return BUF if successful, or NULL if the directory couldn't be determined or SIZE was too small. See the POSIX:2001 specification . Additionally, the gnulib module 'getcwd' guarantees the following GNU extension: If BUF is NULL, an array is allocated with 'malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case it is as big as necessary. */ # if @REPLACE_GETCWD@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define getcwd rpl_getcwd # endif _GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size)); _GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size)); # else /* Need to cast, because on mingw, the second parameter is int size. */ _GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); # endif _GL_CXXALIASWARN (getcwd); #elif defined GNULIB_POSIXCHECK # undef getcwd # if HAVE_RAW_DECL_GETCWD _GL_WARN_ON_USE (getcwd, "getcwd is unportable - " "use gnulib module getcwd for portability"); # endif #endif #if @GNULIB_GETDOMAINNAME@ /* Return the NIS domain name of the machine. WARNING! The NIS domain name is unrelated to the fully qualified host name of the machine. It is also unrelated to email addresses. WARNING! The NIS domain name is usually the empty string or "(none)" when not using NIS. Put up to LEN bytes of the NIS domain name into NAME. Null terminate it if the name is shorter than LEN. If the NIS domain name is longer than LEN, set errno = EINVAL and return -1. Return 0 if successful, otherwise set errno and return -1. */ # if @REPLACE_GETDOMAINNAME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getdomainname # define getdomainname rpl_getdomainname # endif _GL_FUNCDECL_RPL (getdomainname, int, (char *name, size_t len) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (getdomainname, int, (char *name, size_t len)); # else # if !@HAVE_DECL_GETDOMAINNAME@ _GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len)); # endif _GL_CXXALIASWARN (getdomainname); #elif defined GNULIB_POSIXCHECK # undef getdomainname # if HAVE_RAW_DECL_GETDOMAINNAME _GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - " "use gnulib module getdomainname for portability"); # endif #endif #if @GNULIB_GETDTABLESIZE@ /* Return the maximum number of file descriptors in the current process. In POSIX, this is same as sysconf (_SC_OPEN_MAX). */ # if !@HAVE_GETDTABLESIZE@ _GL_FUNCDECL_SYS (getdtablesize, int, (void)); # endif _GL_CXXALIAS_SYS (getdtablesize, int, (void)); _GL_CXXALIASWARN (getdtablesize); #elif defined GNULIB_POSIXCHECK # undef getdtablesize # if HAVE_RAW_DECL_GETDTABLESIZE _GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - " "use gnulib module getdtablesize for portability"); # endif #endif #if @GNULIB_GETGROUPS@ /* Return the supplemental groups that the current process belongs to. It is unspecified whether the effective group id is in the list. If N is 0, return the group count; otherwise, N describes how many entries are available in GROUPS. Return -1 and set errno if N is not 0 and not large enough. Fails with ENOSYS on some systems. */ # if @REPLACE_GETGROUPS@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getgroups # define getgroups rpl_getgroups # endif _GL_FUNCDECL_RPL (getgroups, int, (int n, gid_t *groups)); _GL_CXXALIAS_RPL (getgroups, int, (int n, gid_t *groups)); # else # if !@HAVE_GETGROUPS@ _GL_FUNCDECL_SYS (getgroups, int, (int n, gid_t *groups)); # endif _GL_CXXALIAS_SYS (getgroups, int, (int n, gid_t *groups)); # endif _GL_CXXALIASWARN (getgroups); #elif defined GNULIB_POSIXCHECK # undef getgroups # if HAVE_RAW_DECL_GETGROUPS _GL_WARN_ON_USE (getgroups, "getgroups is unportable - " "use gnulib module getgroups for portability"); # endif #endif #if @GNULIB_GETHOSTNAME@ /* Return the standard host name of the machine. WARNING! The host name may or may not be fully qualified. Put up to LEN bytes of the host name into NAME. Null terminate it if the name is shorter than LEN. If the host name is longer than LEN, set errno = EINVAL and return -1. Return 0 if successful, otherwise set errno and return -1. */ # if @UNISTD_H_HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gethostname # define gethostname rpl_gethostname # endif _GL_FUNCDECL_RPL (gethostname, int, (char *name, size_t len) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len)); # else # if !@HAVE_GETHOSTNAME@ _GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len) _GL_ARG_NONNULL ((1))); # endif /* Need to cast, because on Solaris 10 and OSF/1 5.1 systems, the second parameter is int len. */ _GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len)); # endif _GL_CXXALIASWARN (gethostname); #elif @UNISTD_H_HAVE_WINSOCK2_H@ # undef gethostname # define gethostname gethostname_used_without_requesting_gnulib_module_gethostname #elif defined GNULIB_POSIXCHECK # undef gethostname # if HAVE_RAW_DECL_GETHOSTNAME _GL_WARN_ON_USE (gethostname, "gethostname is unportable - " "use gnulib module gethostname for portability"); # endif #endif #if @GNULIB_GETLOGIN@ /* Returns the user's login name, or NULL if it cannot be found. Upon error, returns NULL with errno set. See . Most programs don't need to use this function, because the information is available through environment variables: ${LOGNAME-$USER} on Unix platforms, $USERNAME on native Windows platforms. */ # if !@HAVE_GETLOGIN@ _GL_FUNCDECL_SYS (getlogin, char *, (void)); # endif _GL_CXXALIAS_SYS (getlogin, char *, (void)); _GL_CXXALIASWARN (getlogin); #elif defined GNULIB_POSIXCHECK # undef getlogin # if HAVE_RAW_DECL_GETLOGIN _GL_WARN_ON_USE (getlogin, "getlogin is unportable - " "use gnulib module getlogin for portability"); # endif #endif #if @GNULIB_GETLOGIN_R@ /* Copies the user's login name to NAME. The array pointed to by NAME has room for SIZE bytes. Returns 0 if successful. Upon error, an error number is returned, or -1 in the case that the login name cannot be found but no specific error is provided (this case is hopefully rare but is left open by the POSIX spec). See . Most programs don't need to use this function, because the information is available through environment variables: ${LOGNAME-$USER} on Unix platforms, $USERNAME on native Windows platforms. */ # if @REPLACE_GETLOGIN_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define getlogin_r rpl_getlogin_r # endif _GL_FUNCDECL_RPL (getlogin_r, int, (char *name, size_t size) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (getlogin_r, int, (char *name, size_t size)); # else # if !@HAVE_DECL_GETLOGIN_R@ _GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size) _GL_ARG_NONNULL ((1))); # endif /* Need to cast, because on Solaris 10 systems, the second argument is int size. */ _GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size)); # endif _GL_CXXALIASWARN (getlogin_r); #elif defined GNULIB_POSIXCHECK # undef getlogin_r # if HAVE_RAW_DECL_GETLOGIN_R _GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - " "use gnulib module getlogin_r for portability"); # endif #endif #if @GNULIB_GETPAGESIZE@ # if @REPLACE_GETPAGESIZE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define getpagesize rpl_getpagesize # endif _GL_FUNCDECL_RPL (getpagesize, int, (void)); _GL_CXXALIAS_RPL (getpagesize, int, (void)); # else # if !@HAVE_GETPAGESIZE@ # if !defined getpagesize /* This is for POSIX systems. */ # if !defined _gl_getpagesize && defined _SC_PAGESIZE # if ! (defined __VMS && __VMS_VER < 70000000) # define _gl_getpagesize() sysconf (_SC_PAGESIZE) # endif # endif /* This is for older VMS. */ # if !defined _gl_getpagesize && defined __VMS # ifdef __ALPHA # define _gl_getpagesize() 8192 # else # define _gl_getpagesize() 512 # endif # endif /* This is for BeOS. */ # if !defined _gl_getpagesize && @HAVE_OS_H@ # include # if defined B_PAGE_SIZE # define _gl_getpagesize() B_PAGE_SIZE # endif # endif /* This is for AmigaOS4.0. */ # if !defined _gl_getpagesize && defined __amigaos4__ # define _gl_getpagesize() 2048 # endif /* This is for older Unix systems. */ # if !defined _gl_getpagesize && @HAVE_SYS_PARAM_H@ # include # ifdef EXEC_PAGESIZE # define _gl_getpagesize() EXEC_PAGESIZE # else # ifdef NBPG # ifndef CLSIZE # define CLSIZE 1 # endif # define _gl_getpagesize() (NBPG * CLSIZE) # else # ifdef NBPC # define _gl_getpagesize() NBPC # endif # endif # endif # endif # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define getpagesize() _gl_getpagesize () # else # if !GNULIB_defined_getpagesize_function static inline int getpagesize () { return _gl_getpagesize (); } # define GNULIB_defined_getpagesize_function 1 # endif # endif # endif # endif /* Need to cast, because on Cygwin 1.5.x systems, the return type is size_t. */ _GL_CXXALIAS_SYS_CAST (getpagesize, int, (void)); # endif # if @HAVE_DECL_GETPAGESIZE@ _GL_CXXALIASWARN (getpagesize); # endif #elif defined GNULIB_POSIXCHECK # undef getpagesize # if HAVE_RAW_DECL_GETPAGESIZE _GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " "use gnulib module getpagesize for portability"); # endif #endif #if @GNULIB_GETUSERSHELL@ /* Return the next valid login shell on the system, or NULL when the end of the list has been reached. */ # if !@HAVE_DECL_GETUSERSHELL@ _GL_FUNCDECL_SYS (getusershell, char *, (void)); # endif _GL_CXXALIAS_SYS (getusershell, char *, (void)); _GL_CXXALIASWARN (getusershell); #elif defined GNULIB_POSIXCHECK # undef getusershell # if HAVE_RAW_DECL_GETUSERSHELL _GL_WARN_ON_USE (getusershell, "getusershell is unportable - " "use gnulib module getusershell for portability"); # endif #endif #if @GNULIB_GETUSERSHELL@ /* Rewind to pointer that is advanced at each getusershell() call. */ # if !@HAVE_DECL_GETUSERSHELL@ _GL_FUNCDECL_SYS (setusershell, void, (void)); # endif _GL_CXXALIAS_SYS (setusershell, void, (void)); _GL_CXXALIASWARN (setusershell); #elif defined GNULIB_POSIXCHECK # undef setusershell # if HAVE_RAW_DECL_SETUSERSHELL _GL_WARN_ON_USE (setusershell, "setusershell is unportable - " "use gnulib module getusershell for portability"); # endif #endif #if @GNULIB_GETUSERSHELL@ /* Free the pointer that is advanced at each getusershell() call and associated resources. */ # if !@HAVE_DECL_GETUSERSHELL@ _GL_FUNCDECL_SYS (endusershell, void, (void)); # endif _GL_CXXALIAS_SYS (endusershell, void, (void)); _GL_CXXALIASWARN (endusershell); #elif defined GNULIB_POSIXCHECK # undef endusershell # if HAVE_RAW_DECL_ENDUSERSHELL _GL_WARN_ON_USE (endusershell, "endusershell is unportable - " "use gnulib module getusershell for portability"); # endif #endif #if @GNULIB_LCHOWN@ /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE to GID (if GID is not -1). Do not follow symbolic links. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ # if @REPLACE_LCHOWN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef lchown # define lchown rpl_lchown # endif _GL_FUNCDECL_RPL (lchown, int, (char const *file, uid_t owner, gid_t group) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (lchown, int, (char const *file, uid_t owner, gid_t group)); # else # if !@HAVE_LCHOWN@ _GL_FUNCDECL_SYS (lchown, int, (char const *file, uid_t owner, gid_t group) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (lchown, int, (char const *file, uid_t owner, gid_t group)); # endif _GL_CXXALIASWARN (lchown); #elif defined GNULIB_POSIXCHECK # undef lchown # if HAVE_RAW_DECL_LCHOWN _GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - " "use gnulib module lchown for portability"); # endif #endif #if @GNULIB_LINK@ /* Create a new hard link for an existing file. Return 0 if successful, otherwise -1 and errno set. See POSIX:2001 specification . */ # if @REPLACE_LINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define link rpl_link # endif _GL_FUNCDECL_RPL (link, int, (const char *path1, const char *path2) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (link, int, (const char *path1, const char *path2)); # else # if !@HAVE_LINK@ _GL_FUNCDECL_SYS (link, int, (const char *path1, const char *path2) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (link, int, (const char *path1, const char *path2)); # endif _GL_CXXALIASWARN (link); #elif defined GNULIB_POSIXCHECK # undef link # if HAVE_RAW_DECL_LINK _GL_WARN_ON_USE (link, "link is unportable - " "use gnulib module link for portability"); # endif #endif #if @GNULIB_LINKAT@ /* Create a new hard link for an existing file, relative to two directories. FLAG controls whether symlinks are followed. Return 0 if successful, otherwise -1 and errno set. */ # if @REPLACE_LINKAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef linkat # define linkat rpl_linkat # endif _GL_FUNCDECL_RPL (linkat, int, (int fd1, const char *path1, int fd2, const char *path2, int flag) _GL_ARG_NONNULL ((2, 4))); _GL_CXXALIAS_RPL (linkat, int, (int fd1, const char *path1, int fd2, const char *path2, int flag)); # else # if !@HAVE_LINKAT@ _GL_FUNCDECL_SYS (linkat, int, (int fd1, const char *path1, int fd2, const char *path2, int flag) _GL_ARG_NONNULL ((2, 4))); # endif _GL_CXXALIAS_SYS (linkat, int, (int fd1, const char *path1, int fd2, const char *path2, int flag)); # endif _GL_CXXALIASWARN (linkat); #elif defined GNULIB_POSIXCHECK # undef linkat # if HAVE_RAW_DECL_LINKAT _GL_WARN_ON_USE (linkat, "linkat is unportable - " "use gnulib module linkat for portability"); # endif #endif #if @GNULIB_LSEEK@ /* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END. Return the new offset if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ # if @REPLACE_LSEEK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define lseek rpl_lseek # endif _GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence)); _GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence)); # else _GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); # endif _GL_CXXALIASWARN (lseek); #elif defined GNULIB_POSIXCHECK # undef lseek # if HAVE_RAW_DECL_LSEEK _GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some " "systems - use gnulib module lseek for portability"); # endif #endif #if @GNULIB_PIPE@ /* Create a pipe, defaulting to O_BINARY mode. Store the read-end as fd[0] and the write-end as fd[1]. Return 0 upon success, or -1 with errno set upon failure. */ # if !@HAVE_PIPE@ _GL_FUNCDECL_SYS (pipe, int, (int fd[2]) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (pipe, int, (int fd[2])); _GL_CXXALIASWARN (pipe); #elif defined GNULIB_POSIXCHECK # undef pipe # if HAVE_RAW_DECL_PIPE _GL_WARN_ON_USE (pipe, "pipe is unportable - " "use gnulib module pipe-posix for portability"); # endif #endif #if @GNULIB_PIPE2@ /* Create a pipe, applying the given flags when opening the read-end of the pipe and the write-end of the pipe. The flags are a bitmask, possibly including O_CLOEXEC (defined in ) and O_TEXT, O_BINARY (defined in "binary-io.h"). Store the read-end as fd[0] and the write-end as fd[1]. Return 0 upon success, or -1 with errno set upon failure. See also the Linux man page at . */ # if @HAVE_PIPE2@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define pipe2 rpl_pipe2 # endif _GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags)); # else _GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags)); # endif _GL_CXXALIASWARN (pipe2); #elif defined GNULIB_POSIXCHECK # undef pipe2 # if HAVE_RAW_DECL_PIPE2 _GL_WARN_ON_USE (pipe2, "pipe2 is unportable - " "use gnulib module pipe2 for portability"); # endif #endif #if @GNULIB_PREAD@ /* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET. Return the number of bytes placed into BUF if successful, otherwise set errno and return -1. 0 indicates EOF. See the POSIX:2001 specification . */ # if @REPLACE_PREAD@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define pread rpl_pread # endif _GL_FUNCDECL_RPL (pread, ssize_t, (int fd, void *buf, size_t bufsize, off_t offset) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (pread, ssize_t, (int fd, void *buf, size_t bufsize, off_t offset)); # else # if !@HAVE_PREAD@ _GL_FUNCDECL_SYS (pread, ssize_t, (int fd, void *buf, size_t bufsize, off_t offset) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (pread, ssize_t, (int fd, void *buf, size_t bufsize, off_t offset)); # endif _GL_CXXALIASWARN (pread); #elif defined GNULIB_POSIXCHECK # undef pread # if HAVE_RAW_DECL_PREAD _GL_WARN_ON_USE (pread, "pread is unportable - " "use gnulib module pread for portability"); # endif #endif #if @GNULIB_PWRITE@ /* Write at most BUFSIZE bytes from BUF into FD, starting at OFFSET. Return the number of bytes written if successful, otherwise set errno and return -1. 0 indicates nothing written. See the POSIX:2001 specification . */ # if @REPLACE_PWRITE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define pwrite rpl_pwrite # endif _GL_FUNCDECL_RPL (pwrite, ssize_t, (int fd, const void *buf, size_t bufsize, off_t offset) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (pwrite, ssize_t, (int fd, const void *buf, size_t bufsize, off_t offset)); # else # if !@HAVE_PWRITE@ _GL_FUNCDECL_SYS (pwrite, ssize_t, (int fd, const void *buf, size_t bufsize, off_t offset) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (pwrite, ssize_t, (int fd, const void *buf, size_t bufsize, off_t offset)); # endif _GL_CXXALIASWARN (pwrite); #elif defined GNULIB_POSIXCHECK # undef pwrite # if HAVE_RAW_DECL_PWRITE _GL_WARN_ON_USE (pwrite, "pwrite is unportable - " "use gnulib module pwrite for portability"); # endif #endif #if @GNULIB_READ@ /* Read up to COUNT bytes from file descriptor FD into the buffer starting at BUF. See the POSIX:2001 specification . */ # if @REPLACE_READ@ && @GNULIB_UNISTD_H_NONBLOCKING@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef read # define read rpl_read # endif _GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count)); # else /* Need to cast, because on mingw, the third parameter is unsigned int count and the return type is 'int'. */ _GL_CXXALIAS_SYS_CAST (read, ssize_t, (int fd, void *buf, size_t count)); # endif _GL_CXXALIASWARN (read); #endif #if @GNULIB_READLINK@ /* Read the contents of the symbolic link FILE and place the first BUFSIZE bytes of it into BUF. Return the number of bytes placed into BUF if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ # if @REPLACE_READLINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define readlink rpl_readlink # endif _GL_FUNCDECL_RPL (readlink, ssize_t, (const char *file, char *buf, size_t bufsize) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (readlink, ssize_t, (const char *file, char *buf, size_t bufsize)); # else # if !@HAVE_READLINK@ _GL_FUNCDECL_SYS (readlink, ssize_t, (const char *file, char *buf, size_t bufsize) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (readlink, ssize_t, (const char *file, char *buf, size_t bufsize)); # endif _GL_CXXALIASWARN (readlink); #elif defined GNULIB_POSIXCHECK # undef readlink # if HAVE_RAW_DECL_READLINK _GL_WARN_ON_USE (readlink, "readlink is unportable - " "use gnulib module readlink for portability"); # endif #endif #if @GNULIB_READLINKAT@ # if !@HAVE_READLINKAT@ _GL_FUNCDECL_SYS (readlinkat, ssize_t, (int fd, char const *file, char *buf, size_t len) _GL_ARG_NONNULL ((2, 3))); # endif _GL_CXXALIAS_SYS (readlinkat, ssize_t, (int fd, char const *file, char *buf, size_t len)); _GL_CXXALIASWARN (readlinkat); #elif defined GNULIB_POSIXCHECK # undef readlinkat # if HAVE_RAW_DECL_READLINKAT _GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - " "use gnulib module readlinkat for portability"); # endif #endif #if @GNULIB_RMDIR@ /* Remove the directory DIR. */ # if @REPLACE_RMDIR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define rmdir rpl_rmdir # endif _GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (rmdir, int, (char const *name)); # else _GL_CXXALIAS_SYS (rmdir, int, (char const *name)); # endif _GL_CXXALIASWARN (rmdir); #elif defined GNULIB_POSIXCHECK # undef rmdir # if HAVE_RAW_DECL_RMDIR _GL_WARN_ON_USE (rmdir, "rmdir is unportable - " "use gnulib module rmdir for portability"); # endif #endif #if @GNULIB_SLEEP@ /* Pause the execution of the current thread for N seconds. Returns the number of seconds left to sleep. See the POSIX:2001 specification . */ # if @REPLACE_SLEEP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef sleep # define sleep rpl_sleep # endif _GL_FUNCDECL_RPL (sleep, unsigned int, (unsigned int n)); _GL_CXXALIAS_RPL (sleep, unsigned int, (unsigned int n)); # else # if !@HAVE_SLEEP@ _GL_FUNCDECL_SYS (sleep, unsigned int, (unsigned int n)); # endif _GL_CXXALIAS_SYS (sleep, unsigned int, (unsigned int n)); # endif _GL_CXXALIASWARN (sleep); #elif defined GNULIB_POSIXCHECK # undef sleep # if HAVE_RAW_DECL_SLEEP _GL_WARN_ON_USE (sleep, "sleep is unportable - " "use gnulib module sleep for portability"); # endif #endif #if @GNULIB_SYMLINK@ # if @REPLACE_SYMLINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef symlink # define symlink rpl_symlink # endif _GL_FUNCDECL_RPL (symlink, int, (char const *contents, char const *file) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (symlink, int, (char const *contents, char const *file)); # else # if !@HAVE_SYMLINK@ _GL_FUNCDECL_SYS (symlink, int, (char const *contents, char const *file) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (symlink, int, (char const *contents, char const *file)); # endif _GL_CXXALIASWARN (symlink); #elif defined GNULIB_POSIXCHECK # undef symlink # if HAVE_RAW_DECL_SYMLINK _GL_WARN_ON_USE (symlink, "symlink is not portable - " "use gnulib module symlink for portability"); # endif #endif #if @GNULIB_SYMLINKAT@ # if !@HAVE_SYMLINKAT@ _GL_FUNCDECL_SYS (symlinkat, int, (char const *contents, int fd, char const *file) _GL_ARG_NONNULL ((1, 3))); # endif _GL_CXXALIAS_SYS (symlinkat, int, (char const *contents, int fd, char const *file)); _GL_CXXALIASWARN (symlinkat); #elif defined GNULIB_POSIXCHECK # undef symlinkat # if HAVE_RAW_DECL_SYMLINKAT _GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - " "use gnulib module symlinkat for portability"); # endif #endif #if @GNULIB_TTYNAME_R@ /* Store at most BUFLEN characters of the pathname of the terminal FD is open on in BUF. Return 0 on success, otherwise an error number. */ # if @REPLACE_TTYNAME_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ttyname_r # define ttyname_r rpl_ttyname_r # endif _GL_FUNCDECL_RPL (ttyname_r, int, (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (ttyname_r, int, (int fd, char *buf, size_t buflen)); # else # if !@HAVE_DECL_TTYNAME_R@ _GL_FUNCDECL_SYS (ttyname_r, int, (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (ttyname_r, int, (int fd, char *buf, size_t buflen)); # endif _GL_CXXALIASWARN (ttyname_r); #elif defined GNULIB_POSIXCHECK # undef ttyname_r # if HAVE_RAW_DECL_TTYNAME_R _GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - " "use gnulib module ttyname_r for portability"); # endif #endif #if @GNULIB_UNLINK@ # if @REPLACE_UNLINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef unlink # define unlink rpl_unlink # endif _GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (unlink, int, (char const *file)); # else _GL_CXXALIAS_SYS (unlink, int, (char const *file)); # endif _GL_CXXALIASWARN (unlink); #elif defined GNULIB_POSIXCHECK # undef unlink # if HAVE_RAW_DECL_UNLINK _GL_WARN_ON_USE (unlink, "unlink is not portable - " "use gnulib module unlink for portability"); # endif #endif #if @GNULIB_UNLINKAT@ # if @REPLACE_UNLINKAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef unlinkat # define unlinkat rpl_unlinkat # endif _GL_FUNCDECL_RPL (unlinkat, int, (int fd, char const *file, int flag) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (unlinkat, int, (int fd, char const *file, int flag)); # else # if !@HAVE_UNLINKAT@ _GL_FUNCDECL_SYS (unlinkat, int, (int fd, char const *file, int flag) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (unlinkat, int, (int fd, char const *file, int flag)); # endif _GL_CXXALIASWARN (unlinkat); #elif defined GNULIB_POSIXCHECK # undef unlinkat # if HAVE_RAW_DECL_UNLINKAT _GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @GNULIB_USLEEP@ /* Pause the execution of the current thread for N microseconds. Returns 0 on completion, or -1 on range error. See the POSIX:2001 specification . */ # if @REPLACE_USLEEP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef usleep # define usleep rpl_usleep # endif _GL_FUNCDECL_RPL (usleep, int, (useconds_t n)); _GL_CXXALIAS_RPL (usleep, int, (useconds_t n)); # else # if !@HAVE_USLEEP@ _GL_FUNCDECL_SYS (usleep, int, (useconds_t n)); # endif _GL_CXXALIAS_SYS (usleep, int, (useconds_t n)); # endif _GL_CXXALIASWARN (usleep); #elif defined GNULIB_POSIXCHECK # undef usleep # if HAVE_RAW_DECL_USLEEP _GL_WARN_ON_USE (usleep, "usleep is unportable - " "use gnulib module usleep for portability"); # endif #endif #if @GNULIB_WRITE@ /* Write up to COUNT bytes starting at BUF to file descriptor FD. See the POSIX:2001 specification . */ # if @REPLACE_WRITE@ && (@GNULIB_UNISTD_H_NONBLOCKING@ || @GNULIB_UNISTD_H_SIGPIPE@) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef write # define write rpl_write # endif _GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count)); # else /* Need to cast, because on mingw, the third parameter is unsigned int count and the return type is 'int'. */ _GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count)); # endif _GL_CXXALIASWARN (write); #endif #endif /* _GL_UNISTD_H */ #endif /* _GL_UNISTD_H */ gv-3.7.4/lib/stdbool.in.h0000664000076400007640000001166011735103745012100 00000000000000/* Copyright (C) 2001-2003, 2006-2011 Free Software Foundation, Inc. Written by Bruno Haible , 2001. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _GL_STDBOOL_H #define _GL_STDBOOL_H /* ISO C 99 for platforms that lack it. */ /* Usage suggestions: Programs that use should be aware of some limitations and standards compliance issues. Standards compliance: - must be #included before 'bool', 'false', 'true' can be used. - You cannot assume that sizeof (bool) == 1. - Programs should not undefine the macros bool, true, and false, as C99 lists that as an "obsolescent feature". Limitations of this substitute, when used in a C89 environment: - must be #included before the '_Bool' type can be used. - You cannot assume that _Bool is a typedef; it might be a macro. - Bit-fields of type 'bool' are not supported. Portable code should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'. - In C99, casts and automatic conversions to '_Bool' or 'bool' are performed in such a way that every nonzero value gets converted to 'true', and zero gets converted to 'false'. This doesn't work with this substitute. With this substitute, only the values 0 and 1 give the expected result when converted to _Bool' or 'bool'. - C99 allows the use of (_Bool)0.0 in constant expressions, but this substitute cannot always provide this property. Also, it is suggested that programs use 'bool' rather than '_Bool'; this isn't required, but 'bool' is more common. */ /* 7.16. Boolean type and values */ /* BeOS already #defines false 0, true 1. We use the same definitions below, but temporarily we have to #undef them. */ #if defined __BEOS__ && !defined __HAIKU__ # include /* defines bool but not _Bool */ # undef false # undef true #endif /* For the sake of symbolic names in gdb, we define true and false as enum constants, not only as macros. It is tempting to write typedef enum { false = 0, true = 1 } _Bool; so that gdb prints values of type 'bool' symbolically. But if we do this, values of type '_Bool' may promote to 'int' or 'unsigned int' (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int' (see ISO C 99 6.3.1.1.(2)). So we add a negative value to the enum; this ensures that '_Bool' promotes to 'int'. */ #if defined __cplusplus || (defined __BEOS__ && !defined __HAIKU__) /* A compiler known to have 'bool'. */ /* If the compiler already has both 'bool' and '_Bool', we can assume they are the same types. */ # if !@HAVE__BOOL@ typedef bool _Bool; # endif #else # if !defined __GNUC__ /* If @HAVE__BOOL@: Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when the built-in _Bool type is used. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html Similar bugs are likely with other compilers as well; this file wouldn't be used if was working. So we override the _Bool type. If !@HAVE__BOOL@: Need to define _Bool ourselves. As 'signed char' or as an enum type? Use of a typedef, with SunPRO C, leads to a stupid "warning: _Bool is a keyword in ISO C99". Use of an enum type, with IRIX cc, leads to a stupid "warning(1185): enumerated type mixed with another type". Even the existence of an enum type, without a typedef, "Invalid enumerator. (badenum)" with HP-UX cc on Tru64. The only benefit of the enum, debuggability, is not important with these compilers. So use 'signed char' and no enum. */ # define _Bool signed char # else /* With this compiler, trust the _Bool type if the compiler has it. */ # if !@HAVE__BOOL@ typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool; # endif # endif #endif #define bool _Bool /* The other macros must be usable in preprocessor directives. */ #define false 0 #define true 1 #define __bool_true_false_are_defined 1 #endif /* _GL_STDBOOL_H */ gv-3.7.4/lib/stdlib.in.h0000664000076400007640000006420311735103745011714 00000000000000/* A GNU-like . Copyright (C) 1995, 2001-2004, 2006-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined __need_malloc_and_calloc /* Special invocation convention inside glibc header files. */ #@INCLUDE_NEXT@ @NEXT_STDLIB_H@ #else /* Normal invocation convention. */ #ifndef _GL_STDLIB_H /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STDLIB_H@ #ifndef _GL_STDLIB_H #define _GL_STDLIB_H /* NetBSD 5.0 mis-defines NULL. */ #include /* MirBSD 10 defines WEXITSTATUS in , not in . */ #if @GNULIB_SYSTEM_POSIX@ && !defined WEXITSTATUS # include #endif /* Solaris declares getloadavg() in . */ #if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@ # include #endif #if @GNULIB_RANDOM_R@ /* OSF/1 5.1 declares 'struct random_data' in , which is included from if _REENTRANT is defined. Include it whenever we need 'struct random_data'. */ # if @HAVE_RANDOM_H@ # include # endif # if !@HAVE_STRUCT_RANDOM_DATA@ || !@HAVE_RANDOM_R@ # include # endif # if !@HAVE_STRUCT_RANDOM_DATA@ /* Define 'struct random_data'. But allow multiple gnulib generated replacements to coexist. */ # if !GNULIB_defined_struct_random_data struct random_data { int32_t *fptr; /* Front pointer. */ int32_t *rptr; /* Rear pointer. */ int32_t *state; /* Array of state values. */ int rand_type; /* Type of random number generator. */ int rand_deg; /* Degree of random number generator. */ int rand_sep; /* Distance between front and rear. */ int32_t *end_ptr; /* Pointer behind state table. */ }; # define GNULIB_defined_struct_random_data 1 # endif # endif #endif #if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) /* On MacOS X 10.3, only declares mkstemp. */ /* On MacOS X 10.5, only declares mkstemps. */ /* On Cygwin 1.7.1, only declares getsubopt. */ /* But avoid namespace pollution on glibc systems and native Windows. */ # include #endif #if 3 <= __GNUC__ || __GNUC__ == 2 && 8 <= __GNUC_MINOR__ # define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) #else # define _GL_ATTRIBUTE_NORETURN #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Some systems do not define EXIT_*, despite otherwise supporting C89. */ #ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 #endif /* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere with proper operation of xargs. */ #ifndef EXIT_FAILURE # define EXIT_FAILURE 1 #elif EXIT_FAILURE != 1 # undef EXIT_FAILURE # define EXIT_FAILURE 1 #endif #if @GNULIB__EXIT@ /* Terminate the current process with the given return code, without running the 'atexit' handlers. */ # if !@HAVE__EXIT@ _GL_FUNCDECL_SYS (_Exit, void, (int status) _GL_ATTRIBUTE_NORETURN); # endif _GL_CXXALIAS_SYS (_Exit, void, (int status)); _GL_CXXALIASWARN (_Exit); #elif defined GNULIB_POSIXCHECK # undef _Exit # if HAVE_RAW_DECL__EXIT _GL_WARN_ON_USE (_Exit, "_Exit is unportable - " "use gnulib module _Exit for portability"); # endif #endif #if @GNULIB_ATOLL@ /* Parse a signed decimal integer. Returns the value of the integer. Errors are not detected. */ # if !@HAVE_ATOLL@ _GL_FUNCDECL_SYS (atoll, long long, (const char *string) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (atoll, long long, (const char *string)); _GL_CXXALIASWARN (atoll); #elif defined GNULIB_POSIXCHECK # undef atoll # if HAVE_RAW_DECL_ATOLL _GL_WARN_ON_USE (atoll, "atoll is unportable - " "use gnulib module atoll for portability"); # endif #endif #if @GNULIB_CALLOC_POSIX@ # if @REPLACE_CALLOC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef calloc # define calloc rpl_calloc # endif _GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size)); _GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size)); # else _GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size)); # endif _GL_CXXALIASWARN (calloc); #elif defined GNULIB_POSIXCHECK # undef calloc /* Assume calloc is always declared. */ _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " "use gnulib module calloc-posix for portability"); #endif #if @GNULIB_CANONICALIZE_FILE_NAME@ # if @REPLACE_CANONICALIZE_FILE_NAME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define canonicalize_file_name rpl_canonicalize_file_name # endif _GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name)); # else # if !@HAVE_CANONICALIZE_FILE_NAME@ _GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); # endif _GL_CXXALIASWARN (canonicalize_file_name); #elif defined GNULIB_POSIXCHECK # undef canonicalize_file_name # if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME _GL_WARN_ON_USE (canonicalize_file_name, "canonicalize_file_name is unportable - " "use gnulib module canonicalize-lgpl for portability"); # endif #endif #if @GNULIB_GETLOADAVG@ /* Store max(NELEM,3) load average numbers in LOADAVG[]. The three numbers are the load average of the last 1 minute, the last 5 minutes, and the last 15 minutes, respectively. LOADAVG is an array of NELEM numbers. */ # if !@HAVE_DECL_GETLOADAVG@ _GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem)); _GL_CXXALIASWARN (getloadavg); #elif defined GNULIB_POSIXCHECK # undef getloadavg # if HAVE_RAW_DECL_GETLOADAVG _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " "use gnulib module getloadavg for portability"); # endif #endif #if @GNULIB_GETSUBOPT@ /* Assuming *OPTIONP is a comma separated list of elements of the form "token" or "token=value", getsubopt parses the first of these elements. If the first element refers to a "token" that is member of the given NULL-terminated array of tokens: - It replaces the comma with a NUL byte, updates *OPTIONP to point past the first option and the comma, sets *VALUEP to the value of the element (or NULL if it doesn't contain an "=" sign), - It returns the index of the "token" in the given array of tokens. Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined. For more details see the POSIX:2001 specification. http://www.opengroup.org/susv3xsh/getsubopt.html */ # if !@HAVE_GETSUBOPT@ _GL_FUNCDECL_SYS (getsubopt, int, (char **optionp, char *const *tokens, char **valuep) _GL_ARG_NONNULL ((1, 2, 3))); # endif _GL_CXXALIAS_SYS (getsubopt, int, (char **optionp, char *const *tokens, char **valuep)); _GL_CXXALIASWARN (getsubopt); #elif defined GNULIB_POSIXCHECK # undef getsubopt # if HAVE_RAW_DECL_GETSUBOPT _GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - " "use gnulib module getsubopt for portability"); # endif #endif #if @GNULIB_GRANTPT@ /* Change the ownership and access permission of the slave side of the pseudo-terminal whose master side is specified by FD. */ # if !@HAVE_GRANTPT@ _GL_FUNCDECL_SYS (grantpt, int, (int fd)); # endif _GL_CXXALIAS_SYS (grantpt, int, (int fd)); _GL_CXXALIASWARN (grantpt); #elif defined GNULIB_POSIXCHECK # undef grantpt # if HAVE_RAW_DECL_GRANTPT _GL_WARN_ON_USE (ptsname, "grantpt is not portable - " "use gnulib module grantpt for portability"); # endif #endif /* If _GL_USE_STDLIB_ALLOC is nonzero, the including module does not rely on GNU or POSIX semantics for malloc and realloc (for example, by never specifying a zero size), so it does not need malloc or realloc to be redefined. */ #if @GNULIB_MALLOC_POSIX@ # if @REPLACE_MALLOC@ # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ || _GL_USE_STDLIB_ALLOC) # undef malloc # define malloc rpl_malloc # endif _GL_FUNCDECL_RPL (malloc, void *, (size_t size)); _GL_CXXALIAS_RPL (malloc, void *, (size_t size)); # else _GL_CXXALIAS_SYS (malloc, void *, (size_t size)); # endif _GL_CXXALIASWARN (malloc); #elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC # undef malloc /* Assume malloc is always declared. */ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " "use gnulib module malloc-posix for portability"); #endif /* Convert a multibyte character to a wide character. */ #if @GNULIB_MBTOWC@ # if @REPLACE_MBTOWC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mbtowc # define mbtowc rpl_mbtowc # endif _GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); _GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); # else _GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); # endif _GL_CXXALIASWARN (mbtowc); #endif #if @GNULIB_MKDTEMP@ /* Create a unique temporary directory from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the directory name unique. Returns TEMPLATE, or a null pointer if it cannot get a unique name. The directory is created mode 700. */ # if !@HAVE_MKDTEMP@ _GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/)); _GL_CXXALIASWARN (mkdtemp); #elif defined GNULIB_POSIXCHECK # undef mkdtemp # if HAVE_RAW_DECL_MKDTEMP _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - " "use gnulib module mkdtemp for portability"); # endif #endif #if @GNULIB_MKOSTEMP@ /* Create a unique temporary file from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the file name unique. The flags are a bitmask, possibly including O_CLOEXEC (defined in ) and O_TEXT, O_BINARY (defined in "binary-io.h"). The file is then created, with the specified flags, ensuring it didn't exist before. The file is created read-write (mask at least 0600 & ~umask), but it may be world-readable and world-writable (mask 0666 & ~umask), depending on the implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ # if !@HAVE_MKOSTEMP@ _GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)); _GL_CXXALIASWARN (mkostemp); #elif defined GNULIB_POSIXCHECK # undef mkostemp # if HAVE_RAW_DECL_MKOSTEMP _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - " "use gnulib module mkostemp for portability"); # endif #endif #if @GNULIB_MKOSTEMPS@ /* Create a unique temporary file from TEMPLATE. The last six characters of TEMPLATE before a suffix of length SUFFIXLEN must be "XXXXXX"; they are replaced with a string that makes the file name unique. The flags are a bitmask, possibly including O_CLOEXEC (defined in ) and O_TEXT, O_BINARY (defined in "binary-io.h"). The file is then created, with the specified flags, ensuring it didn't exist before. The file is created read-write (mask at least 0600 & ~umask), but it may be world-readable and world-writable (mask 0666 & ~umask), depending on the implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ # if !@HAVE_MKOSTEMPS@ _GL_FUNCDECL_SYS (mkostemps, int, (char * /*template*/, int /*suffixlen*/, int /*flags*/) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkostemps, int, (char * /*template*/, int /*suffixlen*/, int /*flags*/)); _GL_CXXALIASWARN (mkostemps); #elif defined GNULIB_POSIXCHECK # undef mkostemps # if HAVE_RAW_DECL_MKOSTEMPS _GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - " "use gnulib module mkostemps for portability"); # endif #endif #if @GNULIB_MKSTEMP@ /* Create a unique temporary file from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the file name unique. The file is then created, ensuring it didn't exist before. The file is created read-write (mask at least 0600 & ~umask), but it may be world-readable and world-writable (mask 0666 & ~umask), depending on the implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ # if @REPLACE_MKSTEMP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mkstemp rpl_mkstemp # endif _GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/)); # else # if ! @HAVE_MKSTEMP@ _GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/)); # endif _GL_CXXALIASWARN (mkstemp); #elif defined GNULIB_POSIXCHECK # undef mkstemp # if HAVE_RAW_DECL_MKSTEMP _GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - " "use gnulib module mkstemp for portability"); # endif #endif #if @GNULIB_MKSTEMPS@ /* Create a unique temporary file from TEMPLATE. The last six characters of TEMPLATE prior to a suffix of length SUFFIXLEN must be "XXXXXX"; they are replaced with a string that makes the file name unique. The file is then created, ensuring it didn't exist before. The file is created read-write (mask at least 0600 & ~umask), but it may be world-readable and world-writable (mask 0666 & ~umask), depending on the implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ # if !@HAVE_MKSTEMPS@ _GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)); _GL_CXXALIASWARN (mkstemps); #elif defined GNULIB_POSIXCHECK # undef mkstemps # if HAVE_RAW_DECL_MKSTEMPS _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " "use gnulib module mkstemps for portability"); # endif #endif #if @GNULIB_PTSNAME@ /* Return the pathname of the pseudo-terminal slave associated with the master FD is open on, or NULL on errors. */ # if !@HAVE_PTSNAME@ _GL_FUNCDECL_SYS (ptsname, char *, (int fd)); # endif _GL_CXXALIAS_SYS (ptsname, char *, (int fd)); _GL_CXXALIASWARN (ptsname); #elif defined GNULIB_POSIXCHECK # undef ptsname # if HAVE_RAW_DECL_PTSNAME _GL_WARN_ON_USE (ptsname, "ptsname is not portable - " "use gnulib module ptsname for portability"); # endif #endif #if @GNULIB_PUTENV@ # if @REPLACE_PUTENV@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef putenv # define putenv rpl_putenv # endif _GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (putenv, int, (char *string)); # else _GL_CXXALIAS_SYS (putenv, int, (char *string)); # endif _GL_CXXALIASWARN (putenv); #endif #if @GNULIB_RANDOM_R@ # if !@HAVE_RANDOM_R@ # ifndef RAND_MAX # define RAND_MAX 2147483647 # endif # endif #endif #if @GNULIB_RANDOM_R@ # if !@HAVE_RANDOM_R@ _GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result)); _GL_CXXALIASWARN (random_r); #elif defined GNULIB_POSIXCHECK # undef random_r # if HAVE_RAW_DECL_RANDOM_R _GL_WARN_ON_USE (random_r, "random_r is unportable - " "use gnulib module random_r for portability"); # endif #endif #if @GNULIB_RANDOM_R@ # if !@HAVE_RANDOM_R@ _GL_FUNCDECL_SYS (srandom_r, int, (unsigned int seed, struct random_data *rand_state) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (srandom_r, int, (unsigned int seed, struct random_data *rand_state)); _GL_CXXALIASWARN (srandom_r); #elif defined GNULIB_POSIXCHECK # undef srandom_r # if HAVE_RAW_DECL_SRANDOM_R _GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - " "use gnulib module random_r for portability"); # endif #endif #if @GNULIB_RANDOM_R@ # if !@HAVE_RANDOM_R@ _GL_FUNCDECL_SYS (initstate_r, int, (unsigned int seed, char *buf, size_t buf_size, struct random_data *rand_state) _GL_ARG_NONNULL ((2, 4))); # endif _GL_CXXALIAS_SYS (initstate_r, int, (unsigned int seed, char *buf, size_t buf_size, struct random_data *rand_state)); _GL_CXXALIASWARN (initstate_r); #elif defined GNULIB_POSIXCHECK # undef initstate_r # if HAVE_RAW_DECL_INITSTATE_R _GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - " "use gnulib module random_r for portability"); # endif #endif #if @GNULIB_RANDOM_R@ # if !@HAVE_RANDOM_R@ _GL_FUNCDECL_SYS (setstate_r, int, (char *arg_state, struct random_data *rand_state) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (setstate_r, int, (char *arg_state, struct random_data *rand_state)); _GL_CXXALIASWARN (setstate_r); #elif defined GNULIB_POSIXCHECK # undef setstate_r # if HAVE_RAW_DECL_SETSTATE_R _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " "use gnulib module random_r for portability"); # endif #endif #if @GNULIB_REALLOC_POSIX@ # if @REPLACE_REALLOC@ # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ || _GL_USE_STDLIB_ALLOC) # undef realloc # define realloc rpl_realloc # endif _GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size)); _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size)); # else _GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size)); # endif _GL_CXXALIASWARN (realloc); #elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC # undef realloc /* Assume realloc is always declared. */ _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " "use gnulib module realloc-posix for portability"); #endif #if @GNULIB_REALPATH@ # if @REPLACE_REALPATH@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define realpath rpl_realpath # endif _GL_FUNCDECL_RPL (realpath, char *, (const char *name, char *resolved) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (realpath, char *, (const char *name, char *resolved)); # else # if !@HAVE_REALPATH@ _GL_FUNCDECL_SYS (realpath, char *, (const char *name, char *resolved) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (realpath, char *, (const char *name, char *resolved)); # endif _GL_CXXALIASWARN (realpath); #elif defined GNULIB_POSIXCHECK # undef realpath # if HAVE_RAW_DECL_REALPATH _GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module " "canonicalize or canonicalize-lgpl for portability"); # endif #endif #if @GNULIB_RPMATCH@ /* Test a user response to a question. Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */ # if !@HAVE_RPMATCH@ _GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (rpmatch, int, (const char *response)); _GL_CXXALIASWARN (rpmatch); #elif defined GNULIB_POSIXCHECK # undef rpmatch # if HAVE_RAW_DECL_RPMATCH _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - " "use gnulib module rpmatch for portability"); # endif #endif #if @GNULIB_SETENV@ /* Set NAME to VALUE in the environment. If REPLACE is nonzero, overwrite an existing value. */ # if @REPLACE_SETENV@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef setenv # define setenv rpl_setenv # endif _GL_FUNCDECL_RPL (setenv, int, (const char *name, const char *value, int replace) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (setenv, int, (const char *name, const char *value, int replace)); # else # if !@HAVE_DECL_SETENV@ _GL_FUNCDECL_SYS (setenv, int, (const char *name, const char *value, int replace) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (setenv, int, (const char *name, const char *value, int replace)); # endif # if !(@REPLACE_SETENV@ && !@HAVE_DECL_SETENV@) _GL_CXXALIASWARN (setenv); # endif #elif defined GNULIB_POSIXCHECK # undef setenv # if HAVE_RAW_DECL_SETENV _GL_WARN_ON_USE (setenv, "setenv is unportable - " "use gnulib module setenv for portability"); # endif #endif #if @GNULIB_STRTOD@ /* Parse a double from STRING, updating ENDP if appropriate. */ # if @REPLACE_STRTOD@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define strtod rpl_strtod # endif _GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp)); # else # if !@HAVE_STRTOD@ _GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp)); # endif _GL_CXXALIASWARN (strtod); #elif defined GNULIB_POSIXCHECK # undef strtod # if HAVE_RAW_DECL_STRTOD _GL_WARN_ON_USE (strtod, "strtod is unportable - " "use gnulib module strtod for portability"); # endif #endif #if @GNULIB_STRTOLL@ /* Parse a signed integer whose textual representation starts at STRING. The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, it may be decimal or octal (with prefix "0") or hexadecimal (with prefix "0x"). If ENDPTR is not NULL, the address of the first byte after the integer is stored in *ENDPTR. Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set to ERANGE. */ # if !@HAVE_STRTOLL@ _GL_FUNCDECL_SYS (strtoll, long long, (const char *string, char **endptr, int base) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strtoll, long long, (const char *string, char **endptr, int base)); _GL_CXXALIASWARN (strtoll); #elif defined GNULIB_POSIXCHECK # undef strtoll # if HAVE_RAW_DECL_STRTOLL _GL_WARN_ON_USE (strtoll, "strtoll is unportable - " "use gnulib module strtoll for portability"); # endif #endif #if @GNULIB_STRTOULL@ /* Parse an unsigned integer whose textual representation starts at STRING. The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, it may be decimal or octal (with prefix "0") or hexadecimal (with prefix "0x"). If ENDPTR is not NULL, the address of the first byte after the integer is stored in *ENDPTR. Upon overflow, the return value is ULLONG_MAX, and errno is set to ERANGE. */ # if !@HAVE_STRTOULL@ _GL_FUNCDECL_SYS (strtoull, unsigned long long, (const char *string, char **endptr, int base) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strtoull, unsigned long long, (const char *string, char **endptr, int base)); _GL_CXXALIASWARN (strtoull); #elif defined GNULIB_POSIXCHECK # undef strtoull # if HAVE_RAW_DECL_STRTOULL _GL_WARN_ON_USE (strtoull, "strtoull is unportable - " "use gnulib module strtoull for portability"); # endif #endif #if @GNULIB_UNLOCKPT@ /* Unlock the slave side of the pseudo-terminal whose master side is specified by FD, so that it can be opened. */ # if !@HAVE_UNLOCKPT@ _GL_FUNCDECL_SYS (unlockpt, int, (int fd)); # endif _GL_CXXALIAS_SYS (unlockpt, int, (int fd)); _GL_CXXALIASWARN (unlockpt); #elif defined GNULIB_POSIXCHECK # undef unlockpt # if HAVE_RAW_DECL_UNLOCKPT _GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - " "use gnulib module unlockpt for portability"); # endif #endif #if @GNULIB_UNSETENV@ /* Remove the variable NAME from the environment. */ # if @REPLACE_UNSETENV@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef unsetenv # define unsetenv rpl_unsetenv # endif _GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (unsetenv, int, (const char *name)); # else # if !@HAVE_DECL_UNSETENV@ _GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (unsetenv, int, (const char *name)); # endif # if !(@REPLACE_UNSETENV@ && !@HAVE_DECL_UNSETENV@) _GL_CXXALIASWARN (unsetenv); # endif #elif defined GNULIB_POSIXCHECK # undef unsetenv # if HAVE_RAW_DECL_UNSETENV _GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - " "use gnulib module unsetenv for portability"); # endif #endif /* Convert a wide character to a multibyte character. */ #if @GNULIB_WCTOMB@ # if @REPLACE_WCTOMB@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wctomb # define wctomb rpl_wctomb # endif _GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc)); _GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc)); # else _GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc)); # endif _GL_CXXALIASWARN (wctomb); #endif #endif /* _GL_STDLIB_H */ #endif /* _GL_STDLIB_H */ #endif gv-3.7.4/lib/canonicalize-lgpl.c0000664000076400007640000002430411735103745013412 00000000000000/* Return the canonical absolute name of a given file. Copyright (C) 1996-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef _LIBC # define _GL_USE_STDLIB_ALLOC 1 # include #endif #if !HAVE_CANONICALIZE_FILE_NAME || !FUNC_REALPATH_WORKS || defined _LIBC /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc optimizes away the name == NULL test below. */ #define _GL_ARG_NONNULL(params) /* Specification. */ #include #include #include #include #include #if HAVE_SYS_PARAM_H || defined _LIBC # include #endif #include #include #include #ifdef _LIBC # include #else # define SHLIB_COMPAT(lib, introduced, obsoleted) 0 # define versioned_symbol(lib, local, symbol, version) extern int dummy # define compat_symbol(lib, local, symbol, version) # define weak_alias(local, symbol) # define __canonicalize_file_name canonicalize_file_name # define __realpath realpath # include "pathmax.h" # include "malloca.h" # if HAVE_GETCWD # if IN_RELOCWRAPPER /* When building the relocatable program wrapper, use the system's getcwd function, not the gnulib override, otherwise we would get a link error. */ # undef getcwd # endif # ifdef VMS /* We want the directory in Unix syntax, not in VMS syntax. */ # define __getcwd(buf, max) getcwd (buf, max, 0) # else # define __getcwd getcwd # endif # else # define __getcwd(buf, max) getwd (buf) # endif # define __readlink readlink # define __set_errno(e) errno = (e) # ifndef MAXSYMLINKS # ifdef SYMLOOP_MAX # define MAXSYMLINKS SYMLOOP_MAX # else # define MAXSYMLINKS 20 # endif # endif #endif #ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT # define DOUBLE_SLASH_IS_DISTINCT_ROOT 0 #endif #if !FUNC_REALPATH_WORKS || defined _LIBC /* Return the canonical absolute name of file NAME. A canonical name does not contain any `.', `..' components nor any repeated path separators ('/') or symlinks. All path components must exist. If RESOLVED is null, the result is malloc'd; otherwise, if the canonical name is PATH_MAX chars or more, returns null with `errno' set to ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars, returns the name in RESOLVED. If the name cannot be resolved and RESOLVED is non-NULL, it contains the path of the first component that cannot be resolved. If the path can be resolved, RESOLVED holds the same value as the value returned. */ char * __realpath (const char *name, char *resolved) { char *rpath, *dest, *extra_buf = NULL; const char *start, *end, *rpath_limit; long int path_max; int num_links = 0; if (name == NULL) { /* As per Single Unix Specification V2 we must return an error if either parameter is a null pointer. We extend this to allow the RESOLVED parameter to be NULL in case the we are expected to allocate the room for the return value. */ __set_errno (EINVAL); return NULL; } if (name[0] == '\0') { /* As per Single Unix Specification V2 we must return an error if the name argument points to an empty string. */ __set_errno (ENOENT); return NULL; } #ifdef PATH_MAX path_max = PATH_MAX; #else path_max = pathconf (name, _PC_PATH_MAX); if (path_max <= 0) path_max = 1024; #endif if (resolved == NULL) { rpath = malloc (path_max); if (rpath == NULL) { /* It's easier to set errno to ENOMEM than to rely on the 'malloc-posix' gnulib module. */ errno = ENOMEM; return NULL; } } else rpath = resolved; rpath_limit = rpath + path_max; if (name[0] != '/') { if (!__getcwd (rpath, path_max)) { rpath[0] = '\0'; goto error; } dest = strchr (rpath, '\0'); } else { rpath[0] = '/'; dest = rpath + 1; if (DOUBLE_SLASH_IS_DISTINCT_ROOT && name[1] == '/') *dest++ = '/'; } for (start = end = name; *start; start = end) { #ifdef _LIBC struct stat64 st; #else struct stat st; #endif int n; /* Skip sequence of multiple path-separators. */ while (*start == '/') ++start; /* Find end of path component. */ for (end = start; *end && *end != '/'; ++end) /* Nothing. */; if (end - start == 0) break; else if (end - start == 1 && start[0] == '.') /* nothing */; else if (end - start == 2 && start[0] == '.' && start[1] == '.') { /* Back up to previous component, ignore if at root already. */ if (dest > rpath + 1) while ((--dest)[-1] != '/'); if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1 && *dest == '/') dest++; } else { size_t new_size; if (dest[-1] != '/') *dest++ = '/'; if (dest + (end - start) >= rpath_limit) { ptrdiff_t dest_offset = dest - rpath; char *new_rpath; if (resolved) { __set_errno (ENAMETOOLONG); if (dest > rpath + 1) dest--; *dest = '\0'; goto error; } new_size = rpath_limit - rpath; if (end - start + 1 > path_max) new_size += end - start + 1; else new_size += path_max; new_rpath = (char *) realloc (rpath, new_size); if (new_rpath == NULL) { /* It's easier to set errno to ENOMEM than to rely on the 'realloc-posix' gnulib module. */ errno = ENOMEM; goto error; } rpath = new_rpath; rpath_limit = rpath + new_size; dest = rpath + dest_offset; } #ifdef _LIBC dest = __mempcpy (dest, start, end - start); #else memcpy (dest, start, end - start); dest += end - start; #endif *dest = '\0'; #ifdef _LIBC if (__lxstat64 (_STAT_VER, rpath, &st) < 0) #else if (lstat (rpath, &st) < 0) #endif goto error; if (S_ISLNK (st.st_mode)) { char *buf; size_t len; if (++num_links > MAXSYMLINKS) { __set_errno (ELOOP); goto error; } buf = malloca (path_max); if (!buf) { errno = ENOMEM; goto error; } n = __readlink (rpath, buf, path_max - 1); if (n < 0) { int saved_errno = errno; freea (buf); errno = saved_errno; goto error; } buf[n] = '\0'; if (!extra_buf) { extra_buf = malloca (path_max); if (!extra_buf) { freea (buf); errno = ENOMEM; goto error; } } len = strlen (end); if ((long int) (n + len) >= path_max) { freea (buf); __set_errno (ENAMETOOLONG); goto error; } /* Careful here, end may be a pointer into extra_buf... */ memmove (&extra_buf[n], end, len + 1); name = end = memcpy (extra_buf, buf, n); if (buf[0] == '/') { dest = rpath + 1; /* It's an absolute symlink */ if (DOUBLE_SLASH_IS_DISTINCT_ROOT && buf[1] == '/') *dest++ = '/'; } else { /* Back up to previous component, ignore if at root already: */ if (dest > rpath + 1) while ((--dest)[-1] != '/'); if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1 && *dest == '/') dest++; } } else if (!S_ISDIR (st.st_mode) && *end != '\0') { __set_errno (ENOTDIR); goto error; } } } if (dest > rpath + 1 && dest[-1] == '/') --dest; if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1 && *dest == '/') dest++; *dest = '\0'; if (extra_buf) freea (extra_buf); return rpath; error: { int saved_errno = errno; if (extra_buf) freea (extra_buf); if (resolved == NULL) free (rpath); errno = saved_errno; } return NULL; } versioned_symbol (libc, __realpath, realpath, GLIBC_2_3); #endif /* !FUNC_REALPATH_WORKS || defined _LIBC */ #if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3) char * attribute_compat_text_section __old_realpath (const char *name, char *resolved) { if (resolved == NULL) { __set_errno (EINVAL); return NULL; } return __realpath (name, resolved); } compat_symbol (libc, __old_realpath, realpath, GLIBC_2_0); #endif char * __canonicalize_file_name (const char *name) { return __realpath (name, NULL); } weak_alias (__canonicalize_file_name, canonicalize_file_name) #else /* This declaration is solely to ensure that after preprocessing this file is never empty. */ typedef int dummy; #endif gv-3.7.4/lib/stddef.in.h0000664000076400007640000000521711735103745011704 00000000000000/* A substitute for POSIX 2008 , for platforms that have issues. Copyright (C) 2009-2011 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Eric Blake. */ /* * POSIX 2008 for platforms that have issues. * */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined __need_wchar_t || defined __need_size_t \ || defined __need_ptrdiff_t || defined __need_NULL \ || defined __need_wint_t /* Special invocation convention inside gcc header files. In particular, gcc provides a version of that blindly redefines NULL even when __need_wint_t was defined, even though wint_t is not normally provided by . Hence, we must remember if special invocation has ever been used to obtain wint_t, in which case we need to clean up NULL yet again. */ # if !(defined _GL_STDDEF_H && defined _GL_STDDEF_WINT_T) # ifdef __need_wint_t # undef _GL_STDDEF_H # define _GL_STDDEF_WINT_T # endif # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ # endif #else /* Normal invocation convention. */ # ifndef _GL_STDDEF_H /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ # ifndef _GL_STDDEF_H # define _GL_STDDEF_H /* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ #if @REPLACE_NULL@ # undef NULL # ifdef __cplusplus /* ISO C++ says that the macro NULL must expand to an integer constant expression, hence '((void *) 0)' is not allowed in C++. */ # if __GNUG__ >= 3 /* GNU C++ has a __null macro that behaves like an integer ('int' or 'long') but has the same size as a pointer. Use that, to avoid warnings. */ # define NULL __null # else # define NULL 0L # endif # else # define NULL ((void *) 0) # endif #endif /* Some platforms lack wchar_t. */ #if !@HAVE_WCHAR_T@ # define wchar_t int #endif # endif /* _GL_STDDEF_H */ # endif /* _GL_STDDEF_H */ #endif /* __need_XXX */ gv-3.7.4/lib/getopt_int.h0000664000076400007640000001174211735103745012202 00000000000000/* Internal declarations for getopt. Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef _GETOPT_INT_H #define _GETOPT_INT_H 1 #include extern int _getopt_internal (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only, int __posixly_correct); /* Reentrant versions which can handle parsing multiple argument vectors at the same time. */ /* Describe how to deal with options that follow non-option ARGV-elements. If the caller did not specify anything, the default is REQUIRE_ORDER if the environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment variable POSIXLY_CORRECT, or using `+' as the first character of the list of option characters, or by calling getopt. PERMUTE is the default. We permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. Using `-' as the first character of the list of option characters selects this mode of operation. The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause `getopt' to return -1 with `optind' != ARGC. */ enum __ord { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER }; /* Data type for reentrant functions. */ struct _getopt_data { /* These have exactly the same meaning as the corresponding global variables, except that they are used for the reentrant versions of getopt. */ int optind; int opterr; int optopt; char *optarg; /* Internal members. */ /* True if the internal members have been initialized. */ int __initialized; /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ char *__nextchar; /* See __ord above. */ enum __ord __ordering; /* If the POSIXLY_CORRECT environment variable is set or getopt was called. */ int __posixly_correct; /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. `first_nonopt' is the index in ARGV of the first of them; `last_nonopt' is the index after the last of them. */ int __first_nonopt; int __last_nonopt; #if defined _LIBC && defined USE_NONOPTION_FLAGS int __nonoption_flags_max_len; int __nonoption_flags_len; #endif }; /* The initializer is necessary to set OPTIND and OPTERR to their default values and to clear the initialization flag. */ #define _GETOPT_DATA_INITIALIZER { 1, 1 } extern int _getopt_internal_r (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only, struct _getopt_data *__data, int __posixly_correct); extern int _getopt_long_r (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, struct _getopt_data *__data); extern int _getopt_long_only_r (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, struct _getopt_data *__data); #endif /* getopt_int.h */ gv-3.7.4/lib/time.in.h0000664000076400007640000002157511735103745011376 00000000000000/* A more-standard . Copyright (C) 2007-2011 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* Don't get in the way of glibc when it includes time.h merely to declare a few standard symbols, rather than to declare all the symbols. Also, Solaris 8 eventually includes itself recursively; if that is happening, just include the system without adding our own declarations. */ #if (defined __need_time_t || defined __need_clock_t \ || defined __need_timespec \ || defined _GL_TIME_H) # @INCLUDE_NEXT@ @NEXT_TIME_H@ #else # define _GL_TIME_H # @INCLUDE_NEXT@ @NEXT_TIME_H@ /* NetBSD 5.0 mis-defines NULL. */ # include /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3). Or they define it with the wrong member names or define it in (e.g., FreeBSD circa 1997). Stock Mingw does not define it, but the pthreads-win32 library defines it in . */ # if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@ # if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ # include # elif @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ # include /* The pthreads-win32 also defines a couple of broken macros. */ # undef asctime_r # undef ctime_r # undef gmtime_r # undef localtime_r # undef rand_r # undef strtok_r # else # ifdef __cplusplus extern "C" { # endif # if !GNULIB_defined_struct_timespec # undef timespec # define timespec rpl_timespec struct timespec { time_t tv_sec; long int tv_nsec; }; # define GNULIB_defined_struct_timespec 1 # endif # ifdef __cplusplus } # endif # endif # endif # if !GNULIB_defined_struct_time_t_must_be_integral /* Per http://austingroupbugs.net/view.php?id=327, POSIX requires time_t to be an integer type, even though C99 permits floating point. We don't know of any implementation that uses floating point, and it is much easier to write code that doesn't have to worry about that corner case, so we force the issue. */ struct __time_t_must_be_integral { unsigned int __floating_time_t_unsupported : (time_t) 1; }; # define GNULIB_defined_struct_time_t_must_be_integral 1 # endif /* Sleep for at least RQTP seconds unless interrupted, If interrupted, return -1 and store the remaining time into RMTP. See . */ # if @GNULIB_NANOSLEEP@ # if @REPLACE_NANOSLEEP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define nanosleep rpl_nanosleep # endif _GL_FUNCDECL_RPL (nanosleep, int, (struct timespec const *__rqtp, struct timespec *__rmtp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (nanosleep, int, (struct timespec const *__rqtp, struct timespec *__rmtp)); # else # if ! @HAVE_NANOSLEEP@ _GL_FUNCDECL_SYS (nanosleep, int, (struct timespec const *__rqtp, struct timespec *__rmtp) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (nanosleep, int, (struct timespec const *__rqtp, struct timespec *__rmtp)); # endif _GL_CXXALIASWARN (nanosleep); # endif /* Return the 'time_t' representation of TP and normalize TP. */ # if @GNULIB_MKTIME@ # if @REPLACE_MKTIME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mktime rpl_mktime # endif _GL_FUNCDECL_RPL (mktime, time_t, (struct tm *__tp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mktime, time_t, (struct tm *__tp)); # else _GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp)); # endif _GL_CXXALIASWARN (mktime); # endif /* Convert TIMER to RESULT, assuming local time and UTC respectively. See and . */ # if @GNULIB_TIME_R@ # if @REPLACE_LOCALTIME_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef localtime_r # define localtime_r rpl_localtime_r # endif _GL_FUNCDECL_RPL (localtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (localtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result)); # else # if ! @HAVE_DECL_LOCALTIME_R@ _GL_FUNCDECL_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result)); # endif # if @HAVE_DECL_LOCALTIME_R@ _GL_CXXALIASWARN (localtime_r); # endif # if @REPLACE_LOCALTIME_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gmtime_r # define gmtime_r rpl_gmtime_r # endif _GL_FUNCDECL_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result)); # else # if ! @HAVE_DECL_LOCALTIME_R@ _GL_FUNCDECL_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result)); # endif # if @HAVE_DECL_LOCALTIME_R@ _GL_CXXALIASWARN (gmtime_r); # endif # endif /* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store the resulting broken-down time into TM. See . */ # if @GNULIB_STRPTIME@ # if ! @HAVE_STRPTIME@ _GL_FUNCDECL_SYS (strptime, char *, (char const *restrict __buf, char const *restrict __format, struct tm *restrict __tm) _GL_ARG_NONNULL ((1, 2, 3))); # endif _GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf, char const *restrict __format, struct tm *restrict __tm)); _GL_CXXALIASWARN (strptime); # endif /* Convert TM to a time_t value, assuming UTC. */ # if @GNULIB_TIMEGM@ # if @REPLACE_TIMEGM@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef timegm # define timegm rpl_timegm # endif _GL_FUNCDECL_RPL (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (timegm, time_t, (struct tm *__tm)); # else # if ! @HAVE_TIMEGM@ _GL_FUNCDECL_SYS (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm)); # endif _GL_CXXALIASWARN (timegm); # endif /* Encourage applications to avoid unsafe functions that can overrun buffers when given outlandish struct tm values. Portable applications should use strftime (or even sprintf) instead. */ # if defined GNULIB_POSIXCHECK # undef asctime _GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif # if defined GNULIB_POSIXCHECK # undef asctime_r _GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif # if defined GNULIB_POSIXCHECK # undef ctime _GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif # if defined GNULIB_POSIXCHECK # undef ctime_r _GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif #endif gv-3.7.4/lib/mkdtemp.c0000664000076400007640000000245711735103745011465 00000000000000/* Copyright (C) 1999, 2001-2003, 2006-2007, 2009-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Extracted from misc/mkdtemp.c. */ #include /* Specification. */ #include #include "tempname.h" /* Generate a unique temporary directory from XTEMPLATE. The last six characters of XTEMPLATE must be "XXXXXX"; they are replaced with a string that makes the filename unique. The directory is created, mode 700, and its name is returned. (This function comes from OpenBSD.) */ char * mkdtemp (char *xtemplate) { if (gen_tempname (xtemplate, 0, 0, GT_DIR)) return NULL; else return xtemplate; } gv-3.7.4/lib/malloca.h0000664000076400007640000001116011735103745011430 00000000000000/* Safe automatic memory allocation. Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _MALLOCA_H #define _MALLOCA_H #include #include #include #ifdef __cplusplus extern "C" { #endif /* safe_alloca(N) is equivalent to alloca(N) when it is safe to call alloca(N); otherwise it returns NULL. It either returns N bytes of memory allocated on the stack, that lasts until the function returns, or NULL. Use of safe_alloca should be avoided: - inside arguments of function calls - undefined behaviour, - in inline functions - the allocation may actually last until the calling function returns. */ #if HAVE_ALLOCA /* The OS usually guarantees only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely allocate anything larger than 4096 bytes. Also care for the possibility of a few compiler-allocated temporary stack slots. This must be a macro, not an inline function. */ # define safe_alloca(N) ((N) < 4032 ? alloca (N) : NULL) #else # define safe_alloca(N) ((void) (N), NULL) #endif /* malloca(N) is a safe variant of alloca(N). It allocates N bytes of memory allocated on the stack, that must be freed using freea() before the function returns. Upon failure, it returns NULL. */ #if HAVE_ALLOCA # define malloca(N) \ ((N) < 4032 - sa_increment \ ? (void *) ((char *) alloca ((N) + sa_increment) + sa_increment) \ : mmalloca (N)) #else # define malloca(N) \ mmalloca (N) #endif extern void * mmalloca (size_t n); /* Free a block of memory allocated through malloca(). */ #if HAVE_ALLOCA extern void freea (void *p); #else # define freea free #endif /* nmalloca(N,S) is an overflow-safe variant of malloca (N * S). It allocates an array of N objects, each with S bytes of memory, on the stack. S must be positive and N must be nonnegative. The array must be freed using freea() before the function returns. */ #if 1 /* Cf. the definition of xalloc_oversized. */ # define nmalloca(n, s) \ ((n) > (size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) \ ? NULL \ : malloca ((n) * (s))) #else extern void * nmalloca (size_t n, size_t s); #endif #ifdef __cplusplus } #endif /* ------------------- Auxiliary, non-public definitions ------------------- */ /* Determine the alignment of a type at compile time. */ #if defined __GNUC__ # define sa_alignof __alignof__ #elif defined __cplusplus template struct sa_alignof_helper { char __slot1; type __slot2; }; # define sa_alignof(type) offsetof (sa_alignof_helper, __slot2) #elif defined __hpux /* Work around a HP-UX 10.20 cc bug with enums constants defined as offsetof values. */ # define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8) #elif defined _AIX /* Work around an AIX 3.2.5 xlc bug with enums constants defined as offsetof values. */ # define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8) #else # define sa_alignof(type) offsetof (struct { char __slot1; type __slot2; }, __slot2) #endif enum { /* The desired alignment of memory allocations is the maximum alignment among all elementary types. */ sa_alignment_long = sa_alignof (long), sa_alignment_double = sa_alignof (double), #if HAVE_LONG_LONG_INT sa_alignment_longlong = sa_alignof (long long), #endif sa_alignment_longdouble = sa_alignof (long double), sa_alignment_max = ((sa_alignment_long - 1) | (sa_alignment_double - 1) #if HAVE_LONG_LONG_INT | (sa_alignment_longlong - 1) #endif | (sa_alignment_longdouble - 1) ) + 1, /* The increment that guarantees room for a magic word must be >= sizeof (int) and a multiple of sa_alignment_max. */ sa_increment = ((sizeof (int) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max }; #endif /* _MALLOCA_H */ gv-3.7.4/lib/Makefile.am0000664000076400007640000010105611735103745011707 00000000000000## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. # Copyright (C) 2002-2011 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --no-libtool --macro-prefix=gl canonicalize-lgpl getopt-gnu inttypes mkdtemp mkstemp signal AUTOMAKE_OPTIONS = 1.5 gnits SUBDIRS = noinst_HEADERS = noinst_LIBRARIES = noinst_LTLIBRARIES = EXTRA_DIST = BUILT_SOURCES = SUFFIXES = MOSTLYCLEANFILES = core *.stackdump MOSTLYCLEANDIRS = CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = AM_CPPFLAGS = AM_CFLAGS = noinst_LIBRARIES += libgnu.a libgnu_a_SOURCES = libgnu_a_LIBADD = $(gl_LIBOBJS) libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) EXTRA_libgnu_a_SOURCES = ## begin gnulib module alloca-opt BUILT_SOURCES += $(ALLOCA_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. if GL_GENERATE_ALLOCA_H alloca.h: alloca.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/alloca.in.h; \ } > $@-t && \ mv -f $@-t $@ else alloca.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += alloca.h alloca.h-t EXTRA_DIST += alloca.in.h ## end gnulib module alloca-opt ## begin gnulib module arg-nonnull # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. BUILT_SOURCES += arg-nonnull.h # The arg-nonnull.h that gets inserted into generated .h files is the same as # build-aux/arg-nonnull.h, except that it has the copyright header cut off. arg-nonnull.h: $(top_srcdir)/./arg-nonnull.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/GL_ARG_NONNULL/,$$p' \ < $(top_srcdir)/./arg-nonnull.h \ > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t ARG_NONNULL_H=arg-nonnull.h EXTRA_DIST += $(top_srcdir)/./arg-nonnull.h ## end gnulib module arg-nonnull ## begin gnulib module c++defs # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. BUILT_SOURCES += c++defs.h # The c++defs.h that gets inserted into generated .h files is the same as # build-aux/c++defs.h, except that it has the copyright header cut off. c++defs.h: $(top_srcdir)/./c++defs.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/_GL_CXXDEFS/,$$p' \ < $(top_srcdir)/./c++defs.h \ > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += c++defs.h c++defs.h-t CXXDEFS_H=c++defs.h EXTRA_DIST += $(top_srcdir)/./c++defs.h ## end gnulib module c++defs ## begin gnulib module canonicalize-lgpl EXTRA_DIST += canonicalize-lgpl.c EXTRA_libgnu_a_SOURCES += canonicalize-lgpl.c ## end gnulib module canonicalize-lgpl ## begin gnulib module dosname EXTRA_DIST += dosname.h ## end gnulib module dosname ## begin gnulib module errno BUILT_SOURCES += $(ERRNO_H) # We need the following in order to create when the system # doesn't have one that is POSIX compliant. if GL_GENERATE_ERRNO_H errno.h: errno.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ < $(srcdir)/errno.in.h; \ } > $@-t && \ mv $@-t $@ else errno.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += errno.h errno.h-t EXTRA_DIST += errno.in.h ## end gnulib module errno ## begin gnulib module getopt-posix BUILT_SOURCES += $(GETOPT_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ < $(srcdir)/getopt.in.h; \ } > $@-t && \ mv -f $@-t $@ MOSTLYCLEANFILES += getopt.h getopt.h-t EXTRA_DIST += getopt.c getopt.in.h getopt1.c getopt_int.h EXTRA_libgnu_a_SOURCES += getopt.c getopt1.c ## end gnulib module getopt-posix ## begin gnulib module gettext-h libgnu_a_SOURCES += gettext.h ## end gnulib module gettext-h ## begin gnulib module gettimeofday EXTRA_DIST += gettimeofday.c EXTRA_libgnu_a_SOURCES += gettimeofday.c ## end gnulib module gettimeofday ## begin gnulib module inttypes-incomplete BUILT_SOURCES += inttypes.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. inttypes.h: inttypes.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \ -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \ -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \ -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \ -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \ -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \ -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \ -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \ -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \ -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \ -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \ -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \ -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/inttypes.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += inttypes.h inttypes.h-t EXTRA_DIST += inttypes.in.h ## end gnulib module inttypes-incomplete ## begin gnulib module lstat EXTRA_DIST += lstat.c EXTRA_libgnu_a_SOURCES += lstat.c ## end gnulib module lstat ## begin gnulib module malloca libgnu_a_SOURCES += malloca.c EXTRA_DIST += malloca.h malloca.valgrind ## end gnulib module malloca ## begin gnulib module mkdtemp EXTRA_DIST += mkdtemp.c EXTRA_libgnu_a_SOURCES += mkdtemp.c ## end gnulib module mkdtemp ## begin gnulib module mkstemp EXTRA_DIST += mkstemp.c EXTRA_libgnu_a_SOURCES += mkstemp.c ## end gnulib module mkstemp ## begin gnulib module pathmax EXTRA_DIST += pathmax.h ## end gnulib module pathmax ## begin gnulib module readlink EXTRA_DIST += readlink.c EXTRA_libgnu_a_SOURCES += readlink.c ## end gnulib module readlink ## begin gnulib module signal BUILT_SOURCES += signal.h # We need the following in order to create when the system # doesn't have a complete one. signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \ -e 's|@''GNULIB_SIGNAL_H_SIGPIPE''@|$(GNULIB_SIGNAL_H_SIGPIPE)|g' \ -e 's|@''GNULIB_SIGPROCMASK''@|$(GNULIB_SIGPROCMASK)|g' \ -e 's|@''GNULIB_SIGACTION''@|$(GNULIB_SIGACTION)|g' \ -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \ -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \ -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \ -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \ -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \ -e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \ -e 's|@''HAVE_SIGHANDLER_T''@|$(HAVE_SIGHANDLER_T)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/signal.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += signal.h signal.h-t EXTRA_DIST += signal.in.h ## end gnulib module signal ## begin gnulib module stat EXTRA_DIST += stat.c EXTRA_libgnu_a_SOURCES += stat.c ## end gnulib module stat ## begin gnulib module stdbool BUILT_SOURCES += $(STDBOOL_H) # We need the following in order to create when the system # doesn't have one that works. if GL_GENERATE_STDBOOL_H stdbool.h: stdbool.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ } > $@-t && \ mv $@-t $@ else stdbool.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += stdbool.h stdbool.h-t EXTRA_DIST += stdbool.in.h ## end gnulib module stdbool ## begin gnulib module stddef BUILT_SOURCES += $(STDDEF_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. if GL_GENERATE_STDDEF_H stddef.h: stddef.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ < $(srcdir)/stddef.in.h; \ } > $@-t && \ mv $@-t $@ else stddef.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += stddef.h stddef.h-t EXTRA_DIST += stddef.in.h ## end gnulib module stddef ## begin gnulib module stdint BUILT_SOURCES += $(STDINT_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. if GL_GENERATE_STDINT_H stdint.h: stdint.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ < $(srcdir)/stdint.in.h; \ } > $@-t && \ mv $@-t $@ else stdint.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += stdint.h stdint.h-t EXTRA_DIST += stdint.in.h ## end gnulib module stdint ## begin gnulib module stdlib BUILT_SOURCES += stdlib.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ -e 's|@''GNULIB__EXIT''@|$(GNULIB__EXIT)|g' \ -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \ -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \ -e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \ -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \ -e 's|@''GNULIB_GRANTPT''@|$(GNULIB_GRANTPT)|g' \ -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \ -e 's|@''GNULIB_MBTOWC''@|$(GNULIB_MBTOWC)|g' \ -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \ -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \ -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \ -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \ -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \ -e 's|@''GNULIB_PTSNAME''@|$(GNULIB_PTSNAME)|g' \ -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \ -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \ -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \ -e 's|@''GNULIB_REALPATH''@|$(GNULIB_REALPATH)|g' \ -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \ -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \ -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \ -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \ -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \ -e 's|@''GNULIB_SYSTEM_POSIX''@|$(GNULIB_SYSTEM_POSIX)|g' \ -e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \ -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \ -e 's|@''GNULIB_WCTOMB''@|$(GNULIB_WCTOMB)|g' \ < $(srcdir)/stdlib.in.h | \ sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += stdlib.h stdlib.h-t EXTRA_DIST += stdlib.in.h ## end gnulib module stdlib ## begin gnulib module sys_stat BUILT_SOURCES += sys/stat.h # We need the following in order to create when the system # has one that is incomplete. sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ -e 's|@''GNULIB_FCHMODAT''@|$(GNULIB_FCHMODAT)|g' \ -e 's|@''GNULIB_FSTATAT''@|$(GNULIB_FSTATAT)|g' \ -e 's|@''GNULIB_FUTIMENS''@|$(GNULIB_FUTIMENS)|g' \ -e 's|@''GNULIB_LCHMOD''@|$(GNULIB_LCHMOD)|g' \ -e 's|@''GNULIB_LSTAT''@|$(GNULIB_LSTAT)|g' \ -e 's|@''GNULIB_MKDIRAT''@|$(GNULIB_MKDIRAT)|g' \ -e 's|@''GNULIB_MKFIFO''@|$(GNULIB_MKFIFO)|g' \ -e 's|@''GNULIB_MKFIFOAT''@|$(GNULIB_MKFIFOAT)|g' \ -e 's|@''GNULIB_MKNOD''@|$(GNULIB_MKNOD)|g' \ -e 's|@''GNULIB_MKNODAT''@|$(GNULIB_MKNODAT)|g' \ -e 's|@''GNULIB_STAT''@|$(GNULIB_STAT)|g' \ -e 's|@''GNULIB_UTIMENSAT''@|$(GNULIB_UTIMENSAT)|g' \ -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \ -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \ -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \ -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \ -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \ -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \ -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \ -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \ -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \ -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \ -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \ -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \ -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \ -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \ -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \ -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_stat.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t MOSTLYCLEANDIRS += sys EXTRA_DIST += sys_stat.in.h ## end gnulib module sys_stat ## begin gnulib module sys_time BUILT_SOURCES += sys/time.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \ -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_time.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += sys/time.h sys/time.h-t EXTRA_DIST += sys_time.in.h ## end gnulib module sys_time ## begin gnulib module tempname EXTRA_DIST += tempname.c tempname.h EXTRA_libgnu_a_SOURCES += tempname.c ## end gnulib module tempname ## begin gnulib module time BUILT_SOURCES += time.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ -e 's|@''GNULIB_MKTIME''@|$(GNULIB_MKTIME)|g' \ -e 's|@''GNULIB_NANOSLEEP''@|$(GNULIB_NANOSLEEP)|g' \ -e 's|@''GNULIB_STRPTIME''@|$(GNULIB_STRPTIME)|g' \ -e 's|@''GNULIB_TIMEGM''@|$(GNULIB_TIMEGM)|g' \ -e 's|@''GNULIB_TIME_R''@|$(GNULIB_TIME_R)|g' \ -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \ -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/time.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += time.h time.h-t EXTRA_DIST += time.in.h ## end gnulib module time ## begin gnulib module unistd BUILT_SOURCES += unistd.h # We need the following in order to create an empty placeholder for # when the system doesn't have one. unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \ -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \ -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \ -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \ -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \ -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \ -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \ -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \ -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \ -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \ -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \ -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \ -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \ -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \ -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \ -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \ -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \ -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \ -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \ -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \ -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \ -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \ -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \ -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \ -e 's|@''GNULIB_PIPE''@|$(GNULIB_PIPE)|g' \ -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \ -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \ -e 's|@''GNULIB_PWRITE''@|$(GNULIB_PWRITE)|g' \ -e 's|@''GNULIB_READ''@|$(GNULIB_READ)|g' \ -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \ -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \ -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \ -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \ -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \ -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \ -e 's|@''GNULIB_TTYNAME_R''@|$(GNULIB_TTYNAME_R)|g' \ -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \ -e 's|@''GNULIB_UNISTD_H_NONBLOCKING''@|$(GNULIB_UNISTD_H_NONBLOCKING)|g' \ -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \ -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \ -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \ -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \ -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \ < $(srcdir)/unistd.in.h | \ sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \ -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \ -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \ -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \ -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \ -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \ -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \ -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \ -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ | \ sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \ -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \ -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \ -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \ -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \ -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += unistd.h unistd.h-t EXTRA_DIST += unistd.in.h ## end gnulib module unistd ## begin gnulib module verify libgnu_a_SOURCES += verify.h ## end gnulib module verify ## begin gnulib module warn-on-use BUILT_SOURCES += warn-on-use.h # The warn-on-use.h that gets inserted into generated .h files is the same as # build-aux/warn-on-use.h, except that it has the copyright header cut off. warn-on-use.h: $(top_srcdir)/./warn-on-use.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/^.ifndef/,$$p' \ < $(top_srcdir)/./warn-on-use.h \ > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t WARN_ON_USE_H=warn-on-use.h EXTRA_DIST += $(top_srcdir)/./warn-on-use.h ## end gnulib module warn-on-use mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ if test -n "$$dir" && test -d $$dir; then \ echo "rmdir $$dir"; rmdir $$dir; \ fi; \ done; \ : gv-3.7.4/lib/malloca.c0000664000076400007640000001175611735103745011436 00000000000000/* Safe automatic memory allocation. Copyright (C) 2003, 2006-2007, 2009-2011 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #define _GL_USE_STDLIB_ALLOC 1 #include /* Specification. */ #include "malloca.h" #include "verify.h" /* The speed critical point in this file is freea() applied to an alloca() result: it must be fast, to match the speed of alloca(). The speed of mmalloca() and freea() in the other case are not critical, because they are only invoked for big memory sizes. */ #if HAVE_ALLOCA /* Store the mmalloca() results in a hash table. This is needed to reliably distinguish a mmalloca() result and an alloca() result. Although it is possible that the same pointer is returned by alloca() and by mmalloca() at different times in the same application, it does not lead to a bug in freea(), because: - Before a pointer returned by alloca() can point into malloc()ed memory, the function must return, and once this has happened the programmer must not call freea() on it anyway. - Before a pointer returned by mmalloca() can point into the stack, it must be freed. The only function that can free it is freea(), and when freea() frees it, it also removes it from the hash table. */ #define MAGIC_NUMBER 0x1415fb4a #define MAGIC_SIZE sizeof (int) /* This is how the header info would look like without any alignment considerations. */ struct preliminary_header { void *next; char room[MAGIC_SIZE]; }; /* But the header's size must be a multiple of sa_alignment_max. */ #define HEADER_SIZE \ (((sizeof (struct preliminary_header) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max) struct header { void *next; char room[HEADER_SIZE - sizeof (struct preliminary_header) + MAGIC_SIZE]; }; verify (HEADER_SIZE == sizeof (struct header)); /* We make the hash table quite big, so that during lookups the probability of empty hash buckets is quite high. There is no need to make the hash table resizable, because when the hash table gets filled so much that the lookup becomes slow, it means that the application has memory leaks. */ #define HASH_TABLE_SIZE 257 static void * mmalloca_results[HASH_TABLE_SIZE]; #endif void * mmalloca (size_t n) { #if HAVE_ALLOCA /* Allocate one more word, that serves as an indicator for malloc()ed memory, so that freea() of an alloca() result is fast. */ size_t nplus = n + HEADER_SIZE; if (nplus >= n) { char *p = (char *) malloc (nplus); if (p != NULL) { size_t slot; p += HEADER_SIZE; /* Put a magic number into the indicator word. */ ((int *) p)[-1] = MAGIC_NUMBER; /* Enter p into the hash table. */ slot = (unsigned long) p % HASH_TABLE_SIZE; ((struct header *) (p - HEADER_SIZE))->next = mmalloca_results[slot]; mmalloca_results[slot] = p; return p; } } /* Out of memory. */ return NULL; #else # if !MALLOC_0_IS_NONNULL if (n == 0) n = 1; # endif return malloc (n); #endif } #if HAVE_ALLOCA void freea (void *p) { /* mmalloca() may have returned NULL. */ if (p != NULL) { /* Attempt to quickly distinguish the mmalloca() result - which has a magic indicator word - and the alloca() result - which has an uninitialized indicator word. It is for this test that sa_increment additional bytes are allocated in the alloca() case. */ if (((int *) p)[-1] == MAGIC_NUMBER) { /* Looks like a mmalloca() result. To see whether it really is one, perform a lookup in the hash table. */ size_t slot = (unsigned long) p % HASH_TABLE_SIZE; void **chain = &mmalloca_results[slot]; for (; *chain != NULL;) { if (*chain == p) { /* Found it. Remove it from the hash table and free it. */ char *p_begin = (char *) p - HEADER_SIZE; *chain = ((struct header *) p_begin)->next; free (p_begin); return; } chain = &((struct header *) ((char *) *chain - HEADER_SIZE))->next; } } /* At this point, we know it was not a mmalloca() result. */ } } #endif gv-3.7.4/lib/getopt.in.h0000664000076400007640000002141411735103745011732 00000000000000/* Declarations for getopt. Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef _GL_GETOPT_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. We must also inform the replacement unistd.h to not recursively use ; our definitions will be present soon enough. */ #if @HAVE_GETOPT_H@ # define _GL_SYSTEM_GETOPT # @INCLUDE_NEXT@ @NEXT_GETOPT_H@ # undef _GL_SYSTEM_GETOPT #endif #ifndef _GL_GETOPT_H #ifndef __need_getopt # define _GL_GETOPT_H 1 #endif /* Standalone applications should #define __GETOPT_PREFIX to an identifier that prefixes the external functions and variables defined in this header. When this happens, include the headers that might declare getopt so that they will not cause confusion if included after this file (if the system had , we have already included it). Then systematically rename identifiers so that they do not collide with the system functions and variables. Renaming avoids problems with some compilers and linkers. */ #if defined __GETOPT_PREFIX && !defined __need_getopt # if !@HAVE_GETOPT_H@ # include # include # include # endif # undef __need_getopt # undef getopt # undef getopt_long # undef getopt_long_only # undef optarg # undef opterr # undef optind # undef optopt # undef option # define __GETOPT_CONCAT(x, y) x ## y # define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) # define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) # define getopt __GETOPT_ID (getopt) # define getopt_long __GETOPT_ID (getopt_long) # define getopt_long_only __GETOPT_ID (getopt_long_only) # define optarg __GETOPT_ID (optarg) # define opterr __GETOPT_ID (opterr) # define optind __GETOPT_ID (optind) # define optopt __GETOPT_ID (optopt) # define option __GETOPT_ID (option) # define _getopt_internal __GETOPT_ID (getopt_internal) #endif /* Standalone applications get correct prototypes for getopt_long and getopt_long_only; they declare "char **argv". libc uses prototypes with "char *const *argv" that are incorrect because getopt_long and getopt_long_only can permute argv; this is required for backward compatibility (e.g., for LSB 2.0.1). This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt', but it caused redefinition warnings if both unistd.h and getopt.h were included, since unistd.h includes getopt.h having previously defined __need_getopt. The only place where __getopt_argv_const is used is in definitions of getopt_long and getopt_long_only below, but these are visible only if __need_getopt is not defined, so it is quite safe to rewrite the conditional as follows: */ #if !defined __need_getopt # if defined __GETOPT_PREFIX # define __getopt_argv_const /* empty */ # else # define __getopt_argv_const const # endif #endif /* If __GNU_LIBRARY__ is not already defined, either we are being used standalone, or this is the first header included in the source file. If we are being used with glibc, we need to include , but that does not exist if we are standalone. So: if __GNU_LIBRARY__ is not defined, include , which will pull in for us if it's from glibc. (Why ctype.h? It's guaranteed to exist and it doesn't flood the namespace with stuff the way some other headers do.) */ #if !defined __GNU_LIBRARY__ # include #endif #ifndef __THROW # ifndef __GNUC_PREREQ # define __GNUC_PREREQ(maj, min) (0) # endif # if defined __cplusplus && __GNUC_PREREQ (2,8) # define __THROW throw () # else # define __THROW # endif #endif /* The definition of _GL_ARG_NONNULL is copied here. */ #ifdef __cplusplus extern "C" { #endif /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; #ifndef __need_getopt /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of `struct option' terminated by an element containing a name which is zero. The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an `int' to a compiled-in constant, such as set a value from `optarg', set the option's `flag' field to zero and its `val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero `flag' field, `getopt' returns the contents of the `val' field. */ # if !GNULIB_defined_struct_option struct option { const char *name; /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; # define GNULIB_defined_struct_option 1 # endif /* Names for the values of the `has_arg' field of `struct option'. */ # define no_argument 0 # define required_argument 1 # define optional_argument 2 #endif /* need getopt */ /* Get definitions and prototypes for functions to process the arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. Return the option character from OPTS just read. Return -1 when there are no more options. For unrecognized options, or options missing arguments, `optopt' is set to the option letter, and '?' is returned. The OPTS string is a list of characters which are recognized option letters, optionally followed by colons, specifying that that letter takes an argument, to be placed in `optarg'. If a letter in OPTS is followed by two colons, its argument is optional. This behavior is specific to the GNU `getopt'. The argument `--' causes premature termination of argument scanning, explicitly telling `getopt' that there are no more options. If OPTS begins with `-', then non-option arguments are treated as arguments to the option '\1'. This behavior is specific to the GNU `getopt'. If OPTS begins with `+', or POSIXLY_CORRECT is set in the environment, then do not permute arguments. */ extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) __THROW _GL_ARG_NONNULL ((2, 3)); #ifndef __need_getopt extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW _GL_ARG_NONNULL ((2, 3)); extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW _GL_ARG_NONNULL ((2, 3)); #endif #ifdef __cplusplus } #endif /* Make sure we later can get all the definitions and declarations. */ #undef __need_getopt #endif /* getopt.h */ #endif /* getopt.h */ gv-3.7.4/lib/gettext.h0000664000076400007640000002341411735103745011511 00000000000000/* Convenience header for conditional use of GNU . Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2011 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 /* NLS can be disabled through the configure --disable-nls option. */ #if ENABLE_NLS /* Get declarations of GNU message catalog functions. */ # include /* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by the gettext() and ngettext() macros. This is an alternative to calling textdomain(), and is useful for libraries. */ # ifdef DEFAULT_TEXT_DOMAIN # undef gettext # define gettext(Msgid) \ dgettext (DEFAULT_TEXT_DOMAIN, Msgid) # undef ngettext # define ngettext(Msgid1, Msgid2, N) \ dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) # endif #else /* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. We don't include as well because people using "gettext.h" will not include , and also including would fail on SunOS 4, whereas is OK. */ #if defined(__sun) # include #endif /* Many header files from the libstdc++ coming with g++ 3.3 or newer include , which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. */ #if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) # include # if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H # include # endif #endif /* Disabled NLS. The casts to 'const char *' serve the purpose of producing warnings for invalid uses of the value returned from these functions. On pre-ANSI systems without 'const', the config.h file is supposed to contain "#define const". */ # undef gettext # define gettext(Msgid) ((const char *) (Msgid)) # undef dgettext # define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) # undef dcgettext # define dcgettext(Domainname, Msgid, Category) \ ((void) (Category), dgettext (Domainname, Msgid)) # undef ngettext # define ngettext(Msgid1, Msgid2, N) \ ((N) == 1 \ ? ((void) (Msgid2), (const char *) (Msgid1)) \ : ((void) (Msgid1), (const char *) (Msgid2))) # undef dngettext # define dngettext(Domainname, Msgid1, Msgid2, N) \ ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) # undef dcngettext # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ ((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N)) # undef textdomain # define textdomain(Domainname) ((const char *) (Domainname)) # undef bindtextdomain # define bindtextdomain(Domainname, Dirname) \ ((void) (Domainname), (const char *) (Dirname)) # undef bind_textdomain_codeset # define bind_textdomain_codeset(Domainname, Codeset) \ ((void) (Domainname), (const char *) (Codeset)) #endif /* Prefer gnulib's setlocale override over libintl's setlocale override. */ #ifdef GNULIB_defined_setlocale # undef setlocale # define setlocale rpl_setlocale #endif /* A pseudo function call that serves as a marker for the automated extraction of messages, but does not call gettext(). The run-time translation is done at a different place in the code. The argument, String, should be a literal string. Concatenated strings and other string expressions won't work. The macro's expansion is not parenthesized, so that it is suitable as initializer for static 'char[]' or 'const char[]' variables. */ #define gettext_noop(String) String /* The separator between msgctxt and msgid in a .mo file. */ #define GETTEXT_CONTEXT_GLUE "\004" /* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be short and rarely need to change. The letter 'p' stands for 'particular' or 'special'. */ #ifdef DEFAULT_TEXT_DOMAIN # define pgettext(Msgctxt, Msgid) \ pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #else # define pgettext(Msgctxt, Msgid) \ pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #endif #define dpgettext(Domainname, Msgctxt, Msgid) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) #ifdef DEFAULT_TEXT_DOMAIN # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #else # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #endif #define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * pgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, int category) { const char *translation = dcgettext (domain, msg_ctxt_id, category); if (translation == msg_ctxt_id) return msgid; else return translation; } #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * npgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { const char *translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); if (translation == msg_ctxt_id || translation == msgid_plural) return (n == 1 ? msgid : msgid_plural); else return translation; } /* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID can be arbitrary expressions. But for string literals these macros are less efficient than those above. */ #include #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \ /* || __STDC_VERSION__ >= 199901L */ ) #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS #include #endif #define pgettext_expr(Msgctxt, Msgid) \ dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) #define dpgettext_expr(Domainname, Msgctxt, Msgid) \ dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcgettext (domain, msg_ctxt_id, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (translation != msg_ctxt_id) return translation; } return msgid; } #define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcnpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (!(translation == msg_ctxt_id || translation == msgid_plural)) return translation; } return (n == 1 ? msgid : msgid_plural); } #endif /* _LIBGETTEXT_H */ gv-3.7.4/doc/0000775000076400007640000000000012121323370007713 500000000000000gv-3.7.4/doc/mdate-sh0000775000076400007640000001255311735103745011305 00000000000000#!/bin/sh # Get modification time of a file or directory and pretty-print it. scriptversion=2005-06-29.22 # Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005 Free Software # Foundation, Inc. # written by Ulrich Drepper , June 1995 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU 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 General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . case $1 in '') echo "$0: No file. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: mdate-sh [--help] [--version] FILE Pretty-print the modification time of FILE. Report bugs to . EOF exit $? ;; -v | --v*) echo "mdate-sh $scriptversion" exit $? ;; esac # Prevent date giving response in another language. LANG=C export LANG LC_ALL=C export LC_ALL LC_TIME=C export LC_TIME # GNU ls changes its time format in response to the TIME_STYLE # variable. Since we cannot assume `unset' works, revert this # variable to its documented default. if test "${TIME_STYLE+set}" = set; then TIME_STYLE=posix-long-iso export TIME_STYLE fi save_arg1=$1 # Find out how to get the extended ls output of a file or directory. if ls -L /dev/null 1>/dev/null 2>&1; then ls_command='ls -L -l -d' else ls_command='ls -l -d' fi # A `ls -l' line looks as follows on OS/2. # drwxrwx--- 0 Aug 11 2001 foo # This differs from Unix, which adds ownership information. # drwxrwx--- 2 root root 4096 Aug 11 2001 foo # # To find the date, we split the line on spaces and iterate on words # until we find a month. This cannot work with files whose owner is a # user named `Jan', or `Feb', etc. However, it's unlikely that `/' # will be owned by a user whose name is a month. So we first look at # the extended ls output of the root directory to decide how many # words should be skipped to get the date. # On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below. set x`ls -l -d /` # Find which argument is the month. month= command= until test $month do shift # Add another shift to the command. command="$command shift;" case $1 in Jan) month=January; nummonth=1;; Feb) month=February; nummonth=2;; Mar) month=March; nummonth=3;; Apr) month=April; nummonth=4;; May) month=May; nummonth=5;; Jun) month=June; nummonth=6;; Jul) month=July; nummonth=7;; Aug) month=August; nummonth=8;; Sep) month=September; nummonth=9;; Oct) month=October; nummonth=10;; Nov) month=November; nummonth=11;; Dec) month=December; nummonth=12;; esac done # Get the extended ls output of the file or directory. set dummy x`eval "$ls_command \"\$save_arg1\""` # Remove all preceding arguments eval $command # Because of the dummy argument above, month is in $2. # # On a POSIX system, we should have # # $# = 5 # $1 = file size # $2 = month # $3 = day # $4 = year or time # $5 = filename # # On Darwin 7.7.0 and 7.6.0, we have # # $# = 4 # $1 = day # $2 = month # $3 = year or time # $4 = filename # Get the month. case $2 in Jan) month=January; nummonth=1;; Feb) month=February; nummonth=2;; Mar) month=March; nummonth=3;; Apr) month=April; nummonth=4;; May) month=May; nummonth=5;; Jun) month=June; nummonth=6;; Jul) month=July; nummonth=7;; Aug) month=August; nummonth=8;; Sep) month=September; nummonth=9;; Oct) month=October; nummonth=10;; Nov) month=November; nummonth=11;; Dec) month=December; nummonth=12;; esac case $3 in ???*) day=$1;; *) day=$3; shift;; esac # Here we have to deal with the problem that the ls output gives either # the time of day or the year. case $3 in *:*) set `date`; eval year=\$$# case $2 in Jan) nummonthtod=1;; Feb) nummonthtod=2;; Mar) nummonthtod=3;; Apr) nummonthtod=4;; May) nummonthtod=5;; Jun) nummonthtod=6;; Jul) nummonthtod=7;; Aug) nummonthtod=8;; Sep) nummonthtod=9;; Oct) nummonthtod=10;; Nov) nummonthtod=11;; Dec) nummonthtod=12;; esac # For the first six month of the year the time notation can also # be used for files modified in the last year. if (expr $nummonth \> $nummonthtod) > /dev/null; then year=`expr $year - 1` fi;; *) year=$3;; esac # The result. echo $day $month $year # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: gv-3.7.4/doc/version.texi0000664000076400007640000000013712121323370012214 00000000000000@set UPDATED 29 March 2012 @set UPDATED-MONTH March 2012 @set EDITION 3.7.4 @set VERSION 3.7.4 gv-3.7.4/doc/texinfo.tex0000644000076400007640000110035112121323352012030 00000000000000% texinfo.tex -- TeX macros to handle Texinfo files. % % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % \def\texinfoversion{2009-08-14.15} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, % 2007, 2008, 2009 Free Software Foundation, Inc. % % This texinfo.tex file is free software: you can redistribute it and/or % modify it under the terms of the GNU General Public License as % published by the Free Software Foundation, either version 3 of the % License, or (at your option) any later version. % % This texinfo.tex file 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 % General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program. If not, see . % % As a special exception, when this file is read by TeX when processing % a Texinfo source document, you may use the result without % restriction. (This has been our intent since Texinfo was invented.) % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: % http://www.gnu.org/software/texinfo/ (the Texinfo home page), or % ftp://tug.org/tex/texinfo.tex % (and all CTAN mirrors, see http://www.ctan.org). % The texinfo.tex in any given distribution could well be out % of date, so if that's what you're using, please check. % % Send bug reports to bug-texinfo@gnu.org. Please include including a % complete document in each bug report with which we can reproduce the % problem. Patches are, of course, greatly appreciated. % % To process a Texinfo manual with TeX, it's most reliable to use the % texi2dvi shell script that comes with the distribution. For a simple % manual foo.texi, however, you can get away with this: % tex foo.texi % texindex foo.?? % tex foo.texi % tex foo.texi % dvips foo.dvi -o # or whatever; this makes foo.ps. % The extra TeX runs get the cross-reference information correct. % Sometimes one run after texindex suffices, and sometimes you need more % than two; texi2dvi does it as many times as necessary. % % It is possible to adapt texinfo.tex for other languages, to some % extent. You can get the existing language-specific files from the % full Texinfo distribution. % % The GNU Texinfo home page is http://www.gnu.org/software/texinfo. \message{Loading texinfo [version \texinfoversion]:} % If in a .fmt file, print the version number % and turn on active characters that we couldn't do earlier because % they might have appeared in the input file name. \everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} \chardef\other=12 % We never want plain's \outer definition of \+ in Texinfo. % For @tex, we can use \tabalign. \let\+ = \relax % Save some plain tex macros whose names we will redefine. \let\ptexb=\b \let\ptexbullet=\bullet \let\ptexc=\c \let\ptexcomma=\, \let\ptexdot=\. \let\ptexdots=\dots \let\ptexend=\end \let\ptexequiv=\equiv \let\ptexexclam=\! \let\ptexfootnote=\footnote \let\ptexgtr=> \let\ptexhat=^ \let\ptexi=\i \let\ptexindent=\indent \let\ptexinsert=\insert \let\ptexlbrace=\{ \let\ptexless=< \let\ptexnewwrite\newwrite \let\ptexnoindent=\noindent \let\ptexplus=+ \let\ptexrbrace=\} \let\ptexslash=\/ \let\ptexstar=\* \let\ptext=\t \let\ptextop=\top {\catcode`\'=\active \global\let\ptexquoteright'}% Math-mode def from plain.tex. \let\ptexraggedright=\raggedright % If this character appears in an error message or help string, it % starts a new line in the output. \newlinechar = `^^J % Use TeX 3.0's \inputlineno to get the line number, for better error % messages, but if we're using an old version of TeX, don't do anything. % \ifx\inputlineno\thisisundefined \let\linenumber = \empty % Pre-3.0. \else \def\linenumber{l.\the\inputlineno:\space} \fi % Set up fixed words for English if not already set. \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi \ifx\putwordin\undefined \gdef\putwordin{in}\fi \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi \ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi \ifx\putwordof\undefined \gdef\putwordof{of}\fi \ifx\putwordon\undefined \gdef\putwordon{on}\fi \ifx\putwordpage\undefined \gdef\putwordpage{page}\fi \ifx\putwordsection\undefined \gdef\putwordsection{section}\fi \ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi \ifx\putwordsee\undefined \gdef\putwordsee{see}\fi \ifx\putwordSee\undefined \gdef\putwordSee{See}\fi \ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi % \ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi \ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi \ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi \ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi \ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi \ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi \ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi \ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi \ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi \ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi \ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi % \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi % Since the category of space is not known, we have to be careful. \chardef\spacecat = 10 \def\spaceisspace{\catcode`\ =\spacecat} % sometimes characters are active, so we need control sequences. \chardef\colonChar = `\: \chardef\commaChar = `\, \chardef\dashChar = `\- \chardef\dotChar = `\. \chardef\exclamChar= `\! \chardef\lquoteChar= `\` \chardef\questChar = `\? \chardef\rquoteChar= `\' \chardef\semiChar = `\; \chardef\underChar = `\_ % Ignore a token. % \def\gobble#1{} % The following is used inside several \edef's. \def\makecsname#1{\expandafter\noexpand\csname#1\endcsname} % Hyphenation fixes. \hyphenation{ Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script ap-pen-dix bit-map bit-maps data-base data-bases eshell fall-ing half-way long-est man-u-script man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces spell-ing spell-ings stand-alone strong-est time-stamp time-stamps which-ever white-space wide-spread wrap-around } % Margin to add to right of even pages, to left of odd pages. \newdimen\bindingoffset \newdimen\normaloffset \newdimen\pagewidth \newdimen\pageheight % For a final copy, take out the rectangles % that mark overfull boxes (in case you have decided % that the text looks ok even though it passes the margin). % \def\finalout{\overfullrule=0pt} % @| inserts a changebar to the left of the current line. It should % surround any changed text. This approach does *not* work if the % change spans more than two lines of output. To handle that, we would % have adopt a much more difficult approach (putting marks into the main % vertical list for the beginning and end of each change). % \def\|{% % \vadjust can only be used in horizontal mode. \leavevmode % % Append this vertical mode material after the current line in the output. \vadjust{% % We want to insert a rule with the height and depth of the current % leading; that is exactly what \strutbox is supposed to record. \vskip-\baselineskip % % \vadjust-items are inserted at the left edge of the type. So % the \llap here moves out into the left-hand margin. \llap{% % % For a thicker or thinner bar, change the `1pt'. \vrule height\baselineskip width1pt % % This is the space between the bar and the text. \hskip 12pt }% }% } % Sometimes it is convenient to have everything in the transcript file % and nothing on the terminal. We don't just call \tracingall here, % since that produces some useless output on the terminal. We also make % some effort to order the tracing commands to reduce output in the log % file; cf. trace.sty in LaTeX. % \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% \def\loggingall{% \tracingstats2 \tracingpages1 \tracinglostchars2 % 2 gives us more in etex \tracingparagraphs1 \tracingoutput1 \tracingmacros2 \tracingrestores1 \showboxbreadth\maxdimen \showboxdepth\maxdimen \ifx\eTeXversion\undefined\else % etex gives us more logging \tracingscantokens1 \tracingifs1 \tracinggroups1 \tracingnesting2 \tracingassigns1 \fi \tracingcommands3 % 3 gives us more in etex \errorcontextlines16 }% % add check for \lastpenalty to plain's definitions. If the last thing % we did was a \nobreak, we don't want to insert more space. % \def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount \removelastskip\penalty-50\smallskip\fi\fi} \def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount \removelastskip\penalty-100\medskip\fi\fi} \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount \removelastskip\penalty-200\bigskip\fi\fi} % For @cropmarks command. % Do @cropmarks to get crop marks. % \newif\ifcropmarks \let\cropmarks = \cropmarkstrue % % Dimensions to add cropmarks at corners. % Added by P. A. MacKay, 12 Nov. 1986 % \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines \newdimen\cornerlong \cornerlong=1pc \newdimen\cornerthick \cornerthick=.3pt \newdimen\topandbottommargin \topandbottommargin=.75in % Output a mark which sets \thischapter, \thissection and \thiscolor. % We dump everything together because we only have one kind of mark. % This works because we only use \botmark / \topmark, not \firstmark. % % A mark contains a subexpression of the \ifcase ... \fi construct. % \get*marks macros below extract the needed part using \ifcase. % % Another complication is to let the user choose whether \thischapter % (\thissection) refers to the chapter (section) in effect at the top % of a page, or that at the bottom of a page. The solution is % described on page 260 of The TeXbook. It involves outputting two % marks for the sectioning macros, one before the section break, and % one after. I won't pretend I can describe this better than DEK... \def\domark{% \toks0=\expandafter{\lastchapterdefs}% \toks2=\expandafter{\lastsectiondefs}% \toks4=\expandafter{\prevchapterdefs}% \toks6=\expandafter{\prevsectiondefs}% \toks8=\expandafter{\lastcolordefs}% \mark{% \the\toks0 \the\toks2 \noexpand\or \the\toks4 \the\toks6 \noexpand\else \the\toks8 }% } % \topmark doesn't work for the very first chapter (after the title % page or the contents), so we use \firstmark there -- this gets us % the mark with the chapter defs, unless the user sneaks in, e.g., % @setcolor (or @url, or @link, etc.) between @contents and the very % first @chapter. \def\gettopheadingmarks{% \ifcase0\topmark\fi \ifx\thischapter\empty \ifcase0\firstmark\fi \fi } \def\getbottomheadingmarks{\ifcase1\botmark\fi} \def\getcolormarks{\ifcase2\topmark\fi} % Avoid "undefined control sequence" errors. \def\lastchapterdefs{} \def\lastsectiondefs{} \def\prevchapterdefs{} \def\prevsectiondefs{} \def\lastcolordefs{} % Main output routine. \chardef\PAGE = 255 \output = {\onepageout{\pagecontents\PAGE}} \newbox\headlinebox \newbox\footlinebox % \onepageout takes a vbox as an argument. Note that \pagecontents % does insertions, but you have to call it yourself. \def\onepageout#1{% \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi % \ifodd\pageno \advance\hoffset by \bindingoffset \else \advance\hoffset by -\bindingoffset\fi % % Do this outside of the \shipout so @code etc. will be expanded in % the headline as they should be, not taken literally (outputting ''code). \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% % {% % Have to do this stuff outside the \shipout because we want it to % take effect in \write's, yet the group defined by the \vbox ends % before the \shipout runs. % \indexdummies % don't expand commands in the output. \normalturnoffactive % \ in index entries must not stay \, e.g., if % the page break happens to be in the middle of an example. % We don't want .vr (or whatever) entries like this: % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} % "\acronym" won't work when it's read back in; % it needs to be % {\code {{\tt \backslashcurfont }acronym} \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi % \ifcropmarks \vbox to \outervsize\bgroup \hsize = \outerhsize \vskip-\topandbottommargin \vtop to0pt{% \line{\ewtop\hfil\ewtop}% \nointerlineskip \line{% \vbox{\moveleft\cornerthick\nstop}% \hfill \vbox{\moveright\cornerthick\nstop}% }% \vss}% \vskip\topandbottommargin \line\bgroup \hfil % center the page within the outer (page) hsize. \ifodd\pageno\hskip\bindingoffset\fi \vbox\bgroup \fi % \unvbox\headlinebox \pagebody{#1}% \ifdim\ht\footlinebox > 0pt % Only leave this space if the footline is nonempty. % (We lessened \vsize for it in \oddfootingyyy.) % The \baselineskip=24pt in plain's \makefootline has no effect. \vskip 24pt \unvbox\footlinebox \fi % \ifcropmarks \egroup % end of \vbox\bgroup \hfil\egroup % end of (centering) \line\bgroup \vskip\topandbottommargin plus1fill minus1fill \boxmaxdepth = \cornerthick \vbox to0pt{\vss \line{% \vbox{\moveleft\cornerthick\nsbot}% \hfill \vbox{\moveright\cornerthick\nsbot}% }% \nointerlineskip \line{\ewbot\hfil\ewbot}% }% \egroup % \vbox from first cropmarks clause \fi }% end of \shipout\vbox }% end of group with \indexdummies \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } \newinsert\margin \dimen\margin=\maxdimen \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} {\catcode`\@ =11 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi % marginal hacks, juha@viisa.uucp (Juha Takala) \ifvoid\margin\else % marginal info is present \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi \dimen@=\dp#1\relax \unvbox#1\relax \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi \ifr@ggedbottom \kern-\dimen@ \vfil \fi} } % Here are the rules for the cropmarks. Note that they are % offset so that the space between them is truly \outerhsize or \outervsize % (P. A. MacKay, 12 November, 1986) % \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} \def\nstop{\vbox {\hrule height\cornerthick depth\cornerlong width\cornerthick}} \def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} \def\nsbot{\vbox {\hrule height\cornerlong depth\cornerthick width\cornerthick}} % Parse an argument, then pass it to #1. The argument is the rest of % the input line (except we remove a trailing comment). #1 should be a % macro which expects an ordinary undelimited TeX argument. % \def\parsearg{\parseargusing{}} \def\parseargusing#1#2{% \def\argtorun{#2}% \begingroup \obeylines \spaceisspace #1% \parseargline\empty% Insert the \empty token, see \finishparsearg below. } {\obeylines % \gdef\parseargline#1^^M{% \endgroup % End of the group started in \parsearg. \argremovecomment #1\comment\ArgTerm% }% } % First remove any @comment, then any @c comment. \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} \def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} % Each occurrence of `\^^M' or `\^^M' is replaced by a single space. % % \argremovec might leave us with trailing space, e.g., % @end itemize @c foo % This space token undergoes the same procedure and is eventually removed % by \finishparsearg. % \def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} \def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} \def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% \def\temp{#3}% \ifx\temp\empty % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: \let\temp\finishparsearg \else \let\temp\argcheckspaces \fi % Put the space token in: \temp#1 #3\ArgTerm } % If a _delimited_ argument is enclosed in braces, they get stripped; so % to get _exactly_ the rest of the line, we had to prevent such situation. % We prepended an \empty token at the very beginning and we expand it now, % just before passing the control to \argtorun. % (Similarly, we have to think about #3 of \argcheckspacesY above: it is % either the null string, or it ends with \^^M---thus there is no danger % that a pair of braces would be stripped. % % But first, we have to remove the trailing space token. % \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} % \parseargdef\foo{...} % is roughly equivalent to % \def\foo{\parsearg\Xfoo} % \def\Xfoo#1{...} % % Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my % favourite TeX trick. --kasal, 16nov03 \def\parseargdef#1{% \expandafter \doparseargdef \csname\string#1\endcsname #1% } \def\doparseargdef#1#2{% \def#2{\parsearg#1}% \def#1##1% } % Several utility definitions with active space: { \obeyspaces \gdef\obeyedspace{ } % Make each space character in the input produce a normal interword % space in the output. Don't allow a line break at this space, as this % is used only in environments like @example, where each line of input % should produce a line of output anyway. % \gdef\sepspaces{\obeyspaces\let =\tie} % If an index command is used in an @example environment, any spaces % therein should become regular spaces in the raw index file, not the % expansion of \tie (\leavevmode \penalty \@M \ ). \gdef\unsepspaces{\let =\space} } \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} % Define the framework for environments in texinfo.tex. It's used like this: % % \envdef\foo{...} % \def\Efoo{...} % % It's the responsibility of \envdef to insert \begingroup before the % actual body; @end closes the group after calling \Efoo. \envdef also % defines \thisenv, so the current environment is known; @end checks % whether the environment name matches. The \checkenv macro can also be % used to check whether the current environment is the one expected. % % Non-false conditionals (@iftex, @ifset) don't fit into this, so they % are not treated as environments; they don't open a group. (The % implementation of @end takes care not to call \endgroup in this % special case.) % At run-time, environments start with this: \def\startenvironment#1{\begingroup\def\thisenv{#1}} % initialize \let\thisenv\empty % ... but they get defined via ``\envdef\foo{...}'': \long\def\envdef#1#2{\def#1{\startenvironment#1#2}} \def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}} % Check whether we're in the right environment: \def\checkenv#1{% \def\temp{#1}% \ifx\thisenv\temp \else \badenverr \fi } % Environment mismatch, #1 expected: \def\badenverr{% \errhelp = \EMsimple \errmessage{This command can appear only \inenvironment\temp, not \inenvironment\thisenv}% } \def\inenvironment#1{% \ifx#1\empty out of any environment% \else in environment \expandafter\string#1% \fi } % @end foo executes the definition of \Efoo. % But first, it executes a specialized version of \checkenv % \parseargdef\end{% \if 1\csname iscond.#1\endcsname \else % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03 \expandafter\checkenv\csname#1\endcsname \csname E#1\endcsname \endgroup \fi } \newhelp\EMsimple{Press RETURN to continue.} %% Simple single-character @ commands % @@ prints an @ % Kludge this until the fonts are right (grr). \def\@{{\tt\char64}} % This is turned off because it was never documented % and you can use @w{...} around a quote to suppress ligatures. %% Define @` and @' to be the same as ` and ' %% but suppressing ligatures. %\def\`{{`}} %\def\'{{'}} % Used to generate quoted braces. \def\mylbrace {{\tt\char123}} \def\myrbrace {{\tt\char125}} \let\{=\mylbrace \let\}=\myrbrace \begingroup % Definitions to produce \{ and \} commands for indices, % and @{ and @} for the aux/toc files. \catcode`\{ = \other \catcode`\} = \other \catcode`\[ = 1 \catcode`\] = 2 \catcode`\! = 0 \catcode`\\ = \other !gdef!lbracecmd[\{]% !gdef!rbracecmd[\}]% !gdef!lbraceatcmd[@{]% !gdef!rbraceatcmd[@}]% !endgroup % @comma{} to avoid , parsing problems. \let\comma = , % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent % Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. \let\, = \c \let\dotaccent = \. \def\ringaccent#1{{\accent23 #1}} \let\tieaccent = \t \let\ubaraccent = \b \let\udotaccent = \d % Other special characters: @questiondown @exclamdown @ordf @ordm % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. \def\questiondown{?`} \def\exclamdown{!`} \def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} \def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} % Dotless i and dotless j, used for accents. \def\imacro{i} \def\jmacro{j} \def\dotless#1{% \def\temp{#1}% \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi \else \errmessage{@dotless can be used only with i or j}% \fi\fi } % The \TeX{} logo, as in plain, but resetting the spacing so that a % period following counts as ending a sentence. (Idea found in latex.) % \edef\TeX{\TeX \spacefactor=1000 } % @LaTeX{} logo. Not quite the same results as the definition in % latex.ltx, since we use a different font for the raised A; it's most % convenient for us to use an explicitly smaller font, rather than using % the \scriptstyle font (since we don't reset \scriptstyle and % \scriptscriptstyle). % \def\LaTeX{% L\kern-.36em {\setbox0=\hbox{T}% \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}% \kern-.15em \TeX } % Be sure we're in horizontal mode when doing a tie, since we make space % equivalent to this in @example-like environments. Otherwise, a space % at the beginning of a line will start with \penalty -- and % since \penalty is valid in vertical mode, we'd end up putting the % penalty on the vertical list instead of in the new paragraph. {\catcode`@ = 11 % Avoid using \@M directly, because that causes trouble % if the definition is written into an index file. \global\let\tiepenalty = \@M \gdef\tie{\leavevmode\penalty\tiepenalty\ } } % @: forces normal size whitespace following. \def\:{\spacefactor=1000 } % @* forces a line break. \def\*{\hfil\break\hbox{}\ignorespaces} % @/ allows a line break. \let\/=\allowbreak % @. is an end-of-sentence period. \def\.{.\spacefactor=\endofsentencespacefactor\space} % @! is an end-of-sentence bang. \def\!{!\spacefactor=\endofsentencespacefactor\space} % @? is an end-of-sentence query. \def\?{?\spacefactor=\endofsentencespacefactor\space} % @frenchspacing on|off says whether to put extra space after punctuation. % \def\onword{on} \def\offword{off} % \parseargdef\frenchspacing{% \def\temp{#1}% \ifx\temp\onword \plainfrenchspacing \else\ifx\temp\offword \plainnonfrenchspacing \else \errhelp = \EMsimple \errmessage{Unknown @frenchspacing option `\temp', must be on/off}% \fi\fi } % @w prevents a word break. Without the \leavevmode, @w at the % beginning of a paragraph, when TeX is still in vertical mode, would % produce a whole line of output instead of starting the paragraph. \def\w#1{\leavevmode\hbox{#1}} % @group ... @end group forces ... to be all on one page, by enclosing % it in a TeX vbox. We use \vtop instead of \vbox to construct the box % to keep its height that of a normal line. According to the rules for % \topskip (p.114 of the TeXbook), the glue inserted is % max (\topskip - \ht (first item), 0). If that height is large, % therefore, no glue is inserted, and the space between the headline and % the text is small, which looks bad. % % Another complication is that the group might be very large. This can % cause the glue on the previous page to be unduly stretched, because it % does not have much material. In this case, it's better to add an % explicit \vfill so that the extra space is at the bottom. The % threshold for doing this is if the group is more than \vfilllimit % percent of a page (\vfilllimit can be changed inside of @tex). % \newbox\groupbox \def\vfilllimit{0.7} % \envdef\group{% \ifnum\catcode`\^^M=\active \else \errhelp = \groupinvalidhelp \errmessage{@group invalid in context where filling is enabled}% \fi \startsavinginserts % \setbox\groupbox = \vtop\bgroup % Do @comment since we are called inside an environment such as % @example, where each end-of-line in the input causes an % end-of-line in the output. We don't want the end-of-line after % the `@group' to put extra space in the output. Since @group % should appear on a line by itself (according to the Texinfo % manual), we don't worry about eating any user text. \comment } % % The \vtop produces a box with normal height and large depth; thus, TeX puts % \baselineskip glue before it, and (when the next line of text is done) % \lineskip glue after it. Thus, space below is not quite equal to space % above. But it's pretty close. \def\Egroup{% % To get correct interline space between the last line of the group % and the first line afterwards, we have to propagate \prevdepth. \endgraf % Not \par, as it may have been set to \lisppar. \global\dimen1 = \prevdepth \egroup % End the \vtop. % \dimen0 is the vertical size of the group's box. \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox % \dimen2 is how much space is left on the page (more or less). \dimen2 = \pageheight \advance\dimen2 by -\pagetotal % if the group doesn't fit on the current page, and it's a big big % group, force a page break. \ifdim \dimen0 > \dimen2 \ifdim \pagetotal < \vfilllimit\pageheight \page \fi \fi \box\groupbox \prevdepth = \dimen1 \checkinserts } % % TeX puts in an \escapechar (i.e., `@') at the beginning of the help % message, so this ends up printing `@group can only ...'. % \newhelp\groupinvalidhelp{% group can only be used in environments such as @example,^^J% where each line of input produces a line of output.} % @need space-in-mils % forces a page break if there is not space-in-mils remaining. \newdimen\mil \mil=0.001in % Old definition--didn't work. %\parseargdef\need{\par % %% This method tries to make TeX break the page naturally %% if the depth of the box does not fit. %{\baselineskip=0pt% %\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak %\prevdepth=-1000pt %}} \parseargdef\need{% % Ensure vertical mode, so we don't make a big box in the middle of a % paragraph. \par % % If the @need value is less than one line space, it's useless. \dimen0 = #1\mil \dimen2 = \ht\strutbox \advance\dimen2 by \dp\strutbox \ifdim\dimen0 > \dimen2 % % Do a \strut just to make the height of this box be normal, so the % normal leading is inserted relative to the preceding line. % And a page break here is fine. \vtop to #1\mil{\strut\vfil}% % % TeX does not even consider page breaks if a penalty added to the % main vertical list is 10000 or more. But in order to see if the % empty box we just added fits on the page, we must make it consider % page breaks. On the other hand, we don't want to actually break the % page after the empty box. So we use a penalty of 9999. % % There is an extremely small chance that TeX will actually break the % page at this \penalty, if there are no other feasible breakpoints in % sight. (If the user is using lots of big @group commands, which % almost-but-not-quite fill up a page, TeX will have a hard time doing % good page breaking, for example.) However, I could not construct an % example where a page broke at this \penalty; if it happens in a real % document, then we can reconsider our strategy. \penalty9999 % % Back up by the size of the box, whether we did a page break or not. \kern -#1\mil % % Do not allow a page break right after this kern. \nobreak \fi } % @br forces paragraph break (and is undocumented). \let\br = \par % @page forces the start of a new page. % \def\page{\par\vfill\supereject} % @exdent text.... % outputs text on separate line in roman font, starting at standard page margin % This records the amount of indent in the innermost environment. % That's how much \exdent should take out. \newskip\exdentamount % This defn is used inside fill environments such as @defun. \parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break} % This defn is used inside nofill environments such as @example. \parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount \leftline{\hskip\leftskip{\rm#1}}}} % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current % paragraph. For more general purposes, use the \margin insertion % class. WHICH is `l' or `r'. % \newskip\inmarginspacing \inmarginspacing=1cm \def\strutdepth{\dp\strutbox} % \def\doinmargin#1#2{\strut\vadjust{% \nobreak \kern-\strutdepth \vtop to \strutdepth{% \baselineskip=\strutdepth \vss % if you have multiple lines of stuff to put here, you'll need to % make the vbox yourself of the appropriate size. \ifx#1l% \llap{\ignorespaces #2\hskip\inmarginspacing}% \else \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% \fi \null }% }} \def\inleftmargin{\doinmargin l} \def\inrightmargin{\doinmargin r} % % @inmargin{TEXT [, RIGHT-TEXT]} % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; % else use TEXT for both). % \def\inmargin#1{\parseinmargin #1,,\finish} \def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \def\lefttext{#1}% have both texts \def\righttext{#2}% \else \def\lefttext{#1}% have only one text \def\righttext{#1}% \fi % \ifodd\pageno \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin \else \def\temp{\inleftmargin\lefttext}% \fi \temp } % @include FILE -- \input text of FILE. % \def\include{\parseargusing\filenamecatcodes\includezzz} \def\includezzz#1{% \pushthisfilestack \def\thisfile{#1}% {% \makevalueexpandable % we want to expand any @value in FILE. \turnoffactive % and allow special characters in the expansion \indexnofonts % Allow `@@' and other weird things in file names. \edef\temp{\noexpand\input #1 }% % % This trickery is to read FILE outside of a group, in case it makes % definitions, etc. \expandafter }\temp \popthisfilestack } \def\filenamecatcodes{% \catcode`\\=\other \catcode`~=\other \catcode`^=\other \catcode`_=\other \catcode`|=\other \catcode`<=\other \catcode`>=\other \catcode`+=\other \catcode`-=\other \catcode`\`=\other \catcode`\'=\other } \def\pushthisfilestack{% \expandafter\pushthisfilestackX\popthisfilestack\StackTerm } \def\pushthisfilestackX{% \expandafter\pushthisfilestackY\thisfile\StackTerm } \def\pushthisfilestackY #1\StackTerm #2\StackTerm {% \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}% } \def\popthisfilestack{\errthisfilestackempty} \def\errthisfilestackempty{\errmessage{Internal error: the stack of filenames is empty.}} \def\thisfile{} % @center line % outputs that line, centered. % \parseargdef\center{% \ifhmode \let\next\centerH \else \let\next\centerV \fi \next{\hfil \ignorespaces#1\unskip \hfil}% } \def\centerH#1{% {% \hfil\break \advance\hsize by -\leftskip \advance\hsize by -\rightskip \line{#1}% \break }% } \def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}} % @sp n outputs n lines of vertical space \parseargdef\sp{\vskip #1\baselineskip} % @comment ...line which is ignored... % @c is the same as @comment % @ignore ... @end ignore is another way to write a comment \def\comment{\begingroup \catcode`\^^M=\other% \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% \commentxxx} {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} \let\c=\comment % @paragraphindent NCHARS % We'll use ems for NCHARS, close enough. % NCHARS can also be the word `asis' or `none'. % We cannot feasibly implement @paragraphindent asis, though. % \def\asisword{asis} % no translation, these are keywords \def\noneword{none} % \parseargdef\paragraphindent{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \defaultparindent = 0pt \else \defaultparindent = #1em \fi \fi \parindent = \defaultparindent } % @exampleindent NCHARS % We'll use ems for NCHARS like @paragraphindent. % It seems @exampleindent asis isn't necessary, but % I preserve it to make it similar to @paragraphindent. \parseargdef\exampleindent{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \lispnarrowing = 0pt \else \lispnarrowing = #1em \fi \fi } % @firstparagraphindent WORD % If WORD is `none', then suppress indentation of the first paragraph % after a section heading. If WORD is `insert', then do indent at such % paragraphs. % % The paragraph indentation is suppressed or not by calling % \suppressfirstparagraphindent, which the sectioning commands do. % We switch the definition of this back and forth according to WORD. % By default, we suppress indentation. % \def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} \def\insertword{insert} % \parseargdef\firstparagraphindent{% \def\temp{#1}% \ifx\temp\noneword \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent \else\ifx\temp\insertword \let\suppressfirstparagraphindent = \relax \else \errhelp = \EMsimple \errmessage{Unknown @firstparagraphindent option `\temp'}% \fi\fi } % Here is how we actually suppress indentation. Redefine \everypar to % \kern backwards by \parindent, and then reset itself to empty. % % We also make \indent itself not actually do anything until the next % paragraph. % \gdef\dosuppressfirstparagraphindent{% \gdef\indent{% \restorefirstparagraphindent \indent }% \gdef\noindent{% \restorefirstparagraphindent \noindent }% \global\everypar = {% \kern -\parindent \restorefirstparagraphindent }% } \gdef\restorefirstparagraphindent{% \global \let \indent = \ptexindent \global \let \noindent = \ptexnoindent \global \everypar = {}% } % @asis just yields its argument. Used with @table, for example. % \def\asis#1{#1} % @math outputs its argument in math mode. % % One complication: _ usually means subscripts, but it could also mean % an actual _ character, as in @math{@var{some_variable} + 1}. So make % _ active, and distinguish by seeing if the current family is \slfam, % which is what @var uses. { \catcode`\_ = \active \gdef\mathunderscore{% \catcode`\_=\active \def_{\ifnum\fam=\slfam \_\else\sb\fi}% } } % Another complication: we want \\ (and @\) to output a \ character. % FYI, plain.tex uses \\ as a temporary control sequence (why?), but % this is not advertised and we don't care. Texinfo does not % otherwise define @\. % % The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} % \def\math{% \tex \mathunderscore \let\\ = \mathbackslash \mathactive % make the texinfo accent commands work in math mode \let\"=\ddot \let\'=\acute \let\==\bar \let\^=\hat \let\`=\grave \let\u=\breve \let\v=\check \let\~=\tilde \let\dotaccent=\dot $\finishmath } \def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. % Some active characters (such as <) are spaced differently in math. % We have to reset their definitions in case the @math was an argument % to a command which sets the catcodes (such as @item or @section). % { \catcode`^ = \active \catcode`< = \active \catcode`> = \active \catcode`+ = \active \catcode`' = \active \gdef\mathactive{% \let^ = \ptexhat \let< = \ptexless \let> = \ptexgtr \let+ = \ptexplus \let' = \ptexquoteright } } % Some math mode symbols. \def\bullet{$\ptexbullet$} \def\geq{\ifmmode \ge\else $\ge$\fi} \def\leq{\ifmmode \le\else $\le$\fi} \def\minus{\ifmmode -\else $-$\fi} % @dots{} outputs an ellipsis using the current font. % We do .5em per period so that it has the same spacing in the cm % typewriter fonts as three actual period characters; on the other hand, % in other typewriter fonts three periods are wider than 1.5em. So do % whichever is larger. % \def\dots{% \leavevmode \setbox0=\hbox{...}% get width of three periods \ifdim\wd0 > 1.5em \dimen0 = \wd0 \else \dimen0 = 1.5em \fi \hbox to \dimen0{% \hskip 0pt plus.25fil .\hskip 0pt plus1fil .\hskip 0pt plus1fil .\hskip 0pt plus.5fil }% } % @enddots{} is an end-of-sentence ellipsis. % \def\enddots{% \dots \spacefactor=\endofsentencespacefactor } % @comma{} is so commas can be inserted into text without messing up % Texinfo's parsing. % \let\comma = , % @refill is a no-op. \let\refill=\relax % If working on a large document in chapters, it is convenient to % be able to disable indexing, cross-referencing, and contents, for test runs. % This is done with @novalidate (before @setfilename). % \newif\iflinks \linkstrue % by default we want the aux files. \let\novalidate = \linksfalse % @setfilename is done at the beginning of every texinfo file. % So open here the files we need to have open while reading the input. % This makes it possible to make a .fmt file for texinfo. \def\setfilename{% \fixbackslash % Turn off hack to swallow `\input texinfo'. \iflinks \tryauxfile % Open the new aux file. TeX will close it automatically at exit. \immediate\openout\auxfile=\jobname.aux \fi % \openindices needs to do some work in any case. \openindices \let\setfilename=\comment % Ignore extra @setfilename cmds. % % If texinfo.cnf is present on the system, read it. % Useful for site-wide @afourpaper, etc. \openin 1 texinfo.cnf \ifeof 1 \else \input texinfo.cnf \fi \closein 1 % \comment % Ignore the actual filename. } % Called from \setfilename. % \def\openindices{% \newindex{cp}% \newcodeindex{fn}% \newcodeindex{vr}% \newcodeindex{tp}% \newcodeindex{ky}% \newcodeindex{pg}% } % @bye. \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} \message{pdf,} % adobe `portable' document format \newcount\tempnum \newcount\lnkcount \newtoks\filename \newcount\filenamelength \newcount\pgn \newtoks\toksA \newtoks\toksB \newtoks\toksC \newtoks\toksD \newbox\boxA \newcount\countA \newif\ifpdf \newif\ifpdfmakepagedest % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 % can be set). So we test for \relax and 0 as well as \undefined, % borrowed from ifpdf.sty. \ifx\pdfoutput\undefined \else \ifx\pdfoutput\relax \else \ifcase\pdfoutput \else \pdftrue \fi \fi \fi % PDF uses PostScript string constants for the names of xref targets, % for display in the outlines, and in other places. Thus, we have to % double any backslashes. Otherwise, a name like "\node" will be % interpreted as a newline (\n), followed by o, d, e. Not good. % http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html % (and related messages, the final outcome is that it is up to the TeX % user to double the backslashes and otherwise make the string valid, so % that's what we do). % double active backslashes. % {\catcode`\@=0 \catcode`\\=\active @gdef@activebackslashdouble{% @catcode`@\=@active @let\=@doublebackslash} } % To handle parens, we must adopt a different approach, since parens are % not active characters. hyperref.dtx (which has the same problem as % us) handles it with this amazing macro to replace tokens, with minor % changes for Texinfo. It is included here under the GPL by permission % from the author, Heiko Oberdiek. % % #1 is the tokens to replace. % #2 is the replacement. % #3 is the control sequence with the string. % \def\HyPsdSubst#1#2#3{% \def\HyPsdReplace##1#1##2\END{% ##1% \ifx\\##2\\% \else #2% \HyReturnAfterFi{% \HyPsdReplace##2\END }% \fi }% \xdef#3{\expandafter\HyPsdReplace#3#1\END}% } \long\def\HyReturnAfterFi#1\fi{\fi#1} % #1 is a control sequence in which to do the replacements. \def\backslashparens#1{% \xdef#1{#1}% redefine it as its expansion; the definition is simply % \lastnode when called from \setref -> \pdfmkdest. \HyPsdSubst{(}{\realbackslash(}{#1}% \HyPsdSubst{)}{\realbackslash)}{#1}% } \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images with PDF output, and none of those formats could be found. (.eps cannot be supported due to the design of the PDF format; use regular TeX (DVI output) for that.)} \ifpdf % % Color manipulation macros based on pdfcolor.tex, % except using rgb instead of cmyk; the latter is said to render as a % very dark gray on-screen and a very dark halftone in print, instead % of actual black. \def\rgbDarkRed{0.50 0.09 0.12} \def\rgbBlack{0 0 0} % % k sets the color for filling (usual text, etc.); % K sets the color for stroking (thin rules, e.g., normal _'s). \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}} % % Set color, and create a mark which defines \thiscolor accordingly, % so that \makeheadline knows which color to restore. \def\setcolor#1{% \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% \domark \pdfsetcolor{#1}% } % \def\maincolor{\rgbBlack} \pdfsetcolor{\maincolor} \edef\thiscolor{\maincolor} \def\lastcolordefs{} % \def\makefootline{% \baselineskip24pt \line{\pdfsetcolor{\maincolor}\the\footline}% } % \def\makeheadline{% \vbox to 0pt{% \vskip-22.5pt \line{% \vbox to8.5pt{}% % Extract \thiscolor definition from the marks. \getcolormarks % Typeset the headline with \maincolor, then restore the color. \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% }% \vss }% \nointerlineskip } % % \pdfcatalog{/PageMode /UseOutlines} % % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). \def\dopdfimage#1#2#3{% \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% % % pdftex (and the PDF format) support .png, .jpg, .pdf (among % others). Let's try in that order. \let\pdfimgext=\empty \begingroup \openin 1 #1.png \ifeof 1 \openin 1 #1.jpg \ifeof 1 \openin 1 #1.jpeg \ifeof 1 \openin 1 #1.JPG \ifeof 1 \openin 1 #1.pdf \ifeof 1 \openin 1 #1.PDF \ifeof 1 \errhelp = \nopdfimagehelp \errmessage{Could not find image file #1 for pdf}% \else \gdef\pdfimgext{PDF}% \fi \else \gdef\pdfimgext{pdf}% \fi \else \gdef\pdfimgext{JPG}% \fi \else \gdef\pdfimgext{jpeg}% \fi \else \gdef\pdfimgext{jpg}% \fi \else \gdef\pdfimgext{png}% \fi \closein 1 \endgroup % % without \immediate, ancient pdftex seg faults when the same image is % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) \ifnum\pdftexversion < 14 \immediate\pdfimage \else \immediate\pdfximage \fi \ifdim \wd0 >0pt width \imagewidth \fi \ifdim \wd2 >0pt height \imageheight \fi \ifnum\pdftexversion<13 #1.\pdfimgext \else {#1.\pdfimgext}% \fi \ifnum\pdftexversion < 14 \else \pdfrefximage \pdflastximage \fi} % \def\pdfmkdest#1{{% % We have to set dummies so commands such as @code, and characters % such as \, aren't expanded when present in a section title. \indexnofonts \turnoffactive \activebackslashdouble \makevalueexpandable \def\pdfdestname{#1}% \backslashparens\pdfdestname \safewhatsit{\pdfdest name{\pdfdestname} xyz}% }} % % used to mark target names; must be expandable. \def\pdfmkpgn#1{#1} % % by default, use a color that is dark enough to print on paper as % nearly black, but still distinguishable for online viewing. \def\urlcolor{\rgbDarkRed} \def\linkcolor{\rgbDarkRed} \def\endlink{\setcolor{\maincolor}\pdfendlink} % % Adding outlines to PDF; macros for calculating structure of outlines % come from Petr Olsak \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% \else \csname#1\endcsname \fi} \def\advancenumber#1{\tempnum=\expnumber{#1}\relax \advance\tempnum by 1 \expandafter\xdef\csname#1\endcsname{\the\tempnum}} % % #1 is the section text, which is what will be displayed in the % outline by the pdf viewer. #2 is the pdf expression for the number % of subentries (or empty, for subsubsections). #3 is the node text, % which might be empty if this toc entry had no corresponding node. % #4 is the page number % \def\dopdfoutline#1#2#3#4{% % Generate a link to the node text if that exists; else, use the % page number. We could generate a destination for the section % text in the case where a section has no node, but it doesn't % seem worth the trouble, since most documents are normally structured. \def\pdfoutlinedest{#3}% \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}% \else % Doubled backslashes in the name. {\activebackslashdouble \xdef\pdfoutlinedest{#3}% \backslashparens\pdfoutlinedest}% \fi % % Also double the backslashes in the display string. {\activebackslashdouble \xdef\pdfoutlinetext{#1}% \backslashparens\pdfoutlinetext}% % \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% } % \def\pdfmakeoutlines{% \begingroup % Thanh's hack / proper braces in bookmarks \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace % % Read toc silently, to get counts of subentries for \pdfoutline. \def\numchapentry##1##2##3##4{% \def\thischapnum{##2}% \def\thissecnum{0}% \def\thissubsecnum{0}% }% \def\numsecentry##1##2##3##4{% \advancenumber{chap\thischapnum}% \def\thissecnum{##2}% \def\thissubsecnum{0}% }% \def\numsubsecentry##1##2##3##4{% \advancenumber{sec\thissecnum}% \def\thissubsecnum{##2}% }% \def\numsubsubsecentry##1##2##3##4{% \advancenumber{subsec\thissubsecnum}% }% \def\thischapnum{0}% \def\thissecnum{0}% \def\thissubsecnum{0}% % % use \def rather than \let here because we redefine \chapentry et % al. a second time, below. \def\appentry{\numchapentry}% \def\appsecentry{\numsecentry}% \def\appsubsecentry{\numsubsecentry}% \def\appsubsubsecentry{\numsubsubsecentry}% \def\unnchapentry{\numchapentry}% \def\unnsecentry{\numsecentry}% \def\unnsubsecentry{\numsubsecentry}% \def\unnsubsubsecentry{\numsubsubsecentry}% \readdatafile{toc}% % % Read toc second time, this time actually producing the outlines. % The `-' means take the \expnumber as the absolute number of % subentries, which we calculated on our first read of the .toc above. % % We use the node names as the destinations. \def\numchapentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% \def\numsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% \def\numsubsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}% \def\numsubsubsecentry##1##2##3##4{% count is always zero \dopdfoutline{##1}{}{##3}{##4}}% % % PDF outlines are displayed using system fonts, instead of % document fonts. Therefore we cannot use special characters, % since the encoding is unknown. For example, the eogonek from % Latin 2 (0xea) gets translated to a | character. Info from % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. % % xx to do this right, we have to translate 8-bit characters to % their "best" equivalent, based on the @documentencoding. Right % now, I guess we'll just let the pdf reader have its way. \indexnofonts \setupdatafile \catcode`\\=\active \otherbackslash \input \tocreadfilename \endgroup } % \def\skipspaces#1{\def\PP{#1}\def\D{|}% \ifx\PP\D\let\nextsp\relax \else\let\nextsp\skipspaces \ifx\p\space\else\addtokens{\filename}{\PP}% \advance\filenamelength by 1 \fi \fi \nextsp} \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax} \ifnum\pdftexversion < 14 \let \startlink \pdfannotlink \else \let \startlink \pdfstartlink \fi % make a live url in pdf output. \def\pdfurl#1{% \begingroup % it seems we really need yet another set of dummies; have not % tried to figure out what each command should do in the context % of @url. for now, just make @/ a no-op, that's the only one % people have actually reported a problem with. % \normalturnoffactive \def\@{@}% \let\/=\empty \makevalueexpandable % do we want to go so far as to use \indexnofonts instead of just % special-casing \var here? \def\var##1{##1}% % \leavevmode\setcolor{\urlcolor}% \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% \endgroup} \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} \def\maketoks{% \expandafter\poptoks\the\toksA|ENDTOKS|\relax \ifx\first0\adn0 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 \else \ifnum0=\countA\else\makelink\fi \ifx\first.\let\next=\done\else \let\next=\maketoks \addtokens{\toksB}{\the\toksD} \ifx\first,\addtokens{\toksB}{\space}\fi \fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \next} \def\makelink{\addtokens{\toksB}% {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} \def\pdflink#1{% \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} \setcolor{\linkcolor}#1\endlink} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \else % non-pdf mode \let\pdfmkdest = \gobble \let\pdfurl = \gobble \let\endlink = \relax \let\setcolor = \gobble \let\pdfsetcolor = \gobble \let\pdfmakeoutlines = \relax \fi % \ifx\pdfoutput \message{fonts,} % Change the current font style to #1, remembering it in \curfontstyle. % For now, we do not accumulate font styles: @b{@i{foo}} prints foo in % italics, not bold italics. % \def\setfontstyle#1{% \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. \csname ten#1\endcsname % change the current font } % Select #1 fonts with the current style. % \def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} \def\rm{\fam=0 \setfontstyle{rm}} \def\it{\fam=\itfam \setfontstyle{it}} \def\sl{\fam=\slfam \setfontstyle{sl}} \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} \def\tt{\fam=\ttfam \setfontstyle{tt}} % Unfortunately, we have to override this for titles and the like, since % in those cases "rm" is bold. Sigh. \def\rmisbold{\rm\def\curfontstyle{bf}} % Texinfo sort of supports the sans serif font style, which plain TeX does not. % So we set up a \sf. \newfam\sffam \def\sf{\fam=\sffam \setfontstyle{sf}} \let\li = \sf % Sometimes we call it \li, not \sf. % We don't need math for this font style. \def\ttsl{\setfontstyle{ttsl}} % Default leading. \newdimen\textleading \textleading = 13.2pt % Set the baselineskip to #1, and the lineskip and strut size % correspondingly. There is no deep meaning behind these magic numbers % used as factors; they just match (closely enough) what Knuth defined. % \def\lineskipfactor{.08333} \def\strutheightpercent{.70833} \def\strutdepthpercent {.29167} % % can get a sort of poor man's double spacing by redefining this. \def\baselinefactor{1} % \def\setleading#1{% \dimen0 = #1\relax \normalbaselineskip = \baselinefactor\dimen0 \normallineskip = \lineskipfactor\normalbaselineskip \normalbaselines \setbox\strutbox =\hbox{% \vrule width0pt height\strutheightpercent\baselineskip depth \strutdepthpercent \baselineskip }% } % PDF CMaps. See also LaTeX's t1.cmap. % % do nothing with this by default. \expandafter\let\csname cmapOT1\endcsname\gobble \expandafter\let\csname cmapOT1IT\endcsname\gobble \expandafter\let\csname cmapOT1TT\endcsname\gobble % if we are producing pdf, and we have \pdffontattr, then define cmaps. % (\pdffontattr was introduced many years ago, but people still run % older pdftex's; it's easy to conditionalize, so we do.) \ifpdf \ifx\pdffontattr\undefined \else \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1-0) %%Title: (TeX-OT1-0 TeX OT1 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1) /Supplement 0 >> def /CMapName /TeX-OT1-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <23> <26> <0023> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 40 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1IT \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1IT-0) %%Title: (TeX-OT1IT-0 TeX OT1IT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1IT) /Supplement 0 >> def /CMapName /TeX-OT1IT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <25> <26> <0025> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 42 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <23> <0023> <24> <00A3> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1IT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1TT \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1TT-0) %%Title: (TeX-OT1TT-0 TeX OT1TT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1TT) /Supplement 0 >> def /CMapName /TeX-OT1TT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 5 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <21> <26> <0021> <28> <5F> <0028> <61> <7E> <0061> endbfrange 32 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <2191> <0C> <2193> <0D> <0027> <0E> <00A1> <0F> <00BF> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <20> <2423> <27> <2019> <60> <2018> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1TT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% \fi\fi % Set the font macro #1 to the font named #2, adding on the % specified font prefix (normally `cm'). % #3 is the font's design size, #4 is a scale factor, #5 is the CMap % encoding (currently only OT1, OT1IT and OT1TT are allowed, pass % empty to omit). \def\setfont#1#2#3#4#5{% \font#1=\fontprefix#2#3 scaled #4 \csname cmap#5\endcsname#1% } % This is what gets called when #5 of \setfont is empty. \let\cmap\gobble % emacs-page end of cmaps % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix % before you read in texinfo.tex. \ifx\fontprefix\undefined \def\fontprefix{cm} \fi % Support font families that don't use the same naming scheme as CM. \def\rmshape{r} \def\rmbshape{bx} %where the normal face is bold \def\bfshape{b} \def\bxshape{bx} \def\ttshape{tt} \def\ttbshape{tt} \def\ttslshape{sltt} \def\itshape{ti} \def\itbshape{bxti} \def\slshape{sl} \def\slbshape{bxsl} \def\sfshape{ss} \def\sfbshape{ss} \def\scshape{csc} \def\scbshape{csc} % Definitions for a main text size of 11pt. This is the default in % Texinfo. % \def\definetextfontsizexi{% % Text fonts (11.2pt, magstep1). \def\textnominalsize{11pt} \edef\mainmagstep{\magstephalf} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1095} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstep1}{OT1} \setfont\deftt\ttshape{10}{\magstep1}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} \setfont\smallrm\rmshape{9}{1000}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter (and unnumbered) fonts (17.28pt). \def\chapnominalsize{17pt} \setfont\chaprm\rmbshape{12}{\magstep2}{OT1} \setfont\chapit\itbshape{10}{\magstep3}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep3}{OT1} \setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} \setfont\chapsf\sfbshape{17}{1000}{OT1} \let\chapbf=\chaprm \setfont\chapsc\scbshape{10}{\magstep3}{OT1} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 \def\chapecsize{1728} % Section fonts (14.4pt). \def\secnominalsize{14pt} \setfont\secrm\rmbshape{12}{\magstep1}{OT1} \setfont\secit\itbshape{10}{\magstep2}{OT1IT} \setfont\secsl\slbshape{10}{\magstep2}{OT1} \setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\secsf\sfbshape{12}{\magstep1}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep2}{OT1} \font\seci=cmmi12 scaled \magstep1 \font\secsy=cmsy10 scaled \magstep2 \def\sececsize{1440} % Subsection fonts (13.15pt). \def\ssecnominalsize{13pt} \setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} \setfont\ssecit\itbshape{10}{1315}{OT1IT} \setfont\ssecsl\slbshape{10}{1315}{OT1} \setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} \setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1315}{OT1} \font\sseci=cmmi12 scaled \magstephalf \font\ssecsy=cmsy10 scaled 1315 \def\ssececsize{1200} % Reduced fonts for @acro in text (10pt). \def\reducednominalsize{10pt} \setfont\reducedrm\rmshape{10}{1000}{OT1} \setfont\reducedtt\ttshape{10}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{1000}{OT1} \setfont\reducedit\itshape{10}{1000}{OT1IT} \setfont\reducedsl\slshape{10}{1000}{OT1} \setfont\reducedsf\sfshape{10}{1000}{OT1} \setfont\reducedsc\scshape{10}{1000}{OT1} \setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} \font\reducedi=cmmi10 \font\reducedsy=cmsy10 \def\reducedecsize{1000} % reset the current fonts \textfonts \rm } % end of 11pt text font size definitions % Definitions to make the main text be 10pt Computer Modern, with % section, chapter, etc., sizes following suit. This is for the GNU % Press printing of the Emacs 22 manual. Maybe other manuals in the % future. Used with @smallbook, which sets the leading to 12pt. % \def\definetextfontsizex{% % Text fonts (10pt). \def\textnominalsize{10pt} \edef\mainmagstep{1000} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1000} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstephalf}{OT1} \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} \setfont\smallrm\rmshape{9}{1000}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter fonts (14.4pt). \def\chapnominalsize{14pt} \setfont\chaprm\rmbshape{12}{\magstep1}{OT1} \setfont\chapit\itbshape{10}{\magstep2}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep2}{OT1} \setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\chapsf\sfbshape{12}{\magstep1}{OT1} \let\chapbf\chaprm \setfont\chapsc\scbshape{10}{\magstep2}{OT1} \font\chapi=cmmi12 scaled \magstep1 \font\chapsy=cmsy10 scaled \magstep2 \def\chapecsize{1440} % Section fonts (12pt). \def\secnominalsize{12pt} \setfont\secrm\rmbshape{12}{1000}{OT1} \setfont\secit\itbshape{10}{\magstep1}{OT1IT} \setfont\secsl\slbshape{10}{\magstep1}{OT1} \setfont\sectt\ttbshape{12}{1000}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} \setfont\secsf\sfbshape{12}{1000}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep1}{OT1} \font\seci=cmmi12 \font\secsy=cmsy10 scaled \magstep1 \def\sececsize{1200} % Subsection fonts (10pt). \def\ssecnominalsize{10pt} \setfont\ssecrm\rmbshape{10}{1000}{OT1} \setfont\ssecit\itbshape{10}{1000}{OT1IT} \setfont\ssecsl\slbshape{10}{1000}{OT1} \setfont\ssectt\ttbshape{10}{1000}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} \setfont\ssecsf\sfbshape{10}{1000}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1000}{OT1} \font\sseci=cmmi10 \font\ssecsy=cmsy10 \def\ssececsize{1000} % Reduced fonts for @acro in text (9pt). \def\reducednominalsize{9pt} \setfont\reducedrm\rmshape{9}{1000}{OT1} \setfont\reducedtt\ttshape{9}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{900}{OT1} \setfont\reducedit\itshape{9}{1000}{OT1IT} \setfont\reducedsl\slshape{9}{1000}{OT1} \setfont\reducedsf\sfshape{9}{1000}{OT1} \setfont\reducedsc\scshape{10}{900}{OT1} \setfont\reducedttsl\ttslshape{10}{900}{OT1TT} \font\reducedi=cmmi9 \font\reducedsy=cmsy9 \def\reducedecsize{0900} % reduce space between paragraphs \divide\parskip by 2 % reset the current fonts \textfonts \rm } % end of 10pt text font size definitions % We provide the user-level command % @fonttextsize 10 % (or 11) to redefine the text font size. pt is assumed. % \def\xword{10} \def\xiword{11} % \parseargdef\fonttextsize{% \def\textsizearg{#1}% \wlog{doing @fonttextsize \textsizearg}% % % Set \globaldefs so that documents can use this inside @tex, since % makeinfo 4.8 does not support it, but we need it nonetheless. % \begingroup \globaldefs=1 \ifx\textsizearg\xword \definetextfontsizex \else \ifx\textsizearg\xiword \definetextfontsizexi \else \errhelp=\EMsimple \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} \fi\fi \endgroup } % In order for the font changes to affect most math symbols and letters, % we have to define the \textfont of the standard families. Since % texinfo doesn't allow for producing subscripts and superscripts except % in the main text, we don't bother to reset \scriptfont and % \scriptscriptfont (which would also require loading a lot more fonts). % \def\resetmathfonts{% \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf \textfont\ttfam=\tentt \textfont\sffam=\tensf } % The font-changing commands redefine the meanings of \tenSTYLE, instead % of just \STYLE. We do this because \STYLE needs to also set the % current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire % \tenSTYLE to set the current font. % % Each font-changing command also sets the names \lsize (one size lower) % and \lllsize (three sizes lower). These relative commands are used in % the LaTeX logo and acronyms. % % This all needs generalizing, badly. % \def\textfonts{% \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl \def\curfontsize{text}% \def\lsize{reduced}\def\lllsize{smaller}% \resetmathfonts \setleading{\textleading}} \def\titlefonts{% \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy \let\tenttsl=\titlettsl \def\curfontsize{title}% \def\lsize{chap}\def\lllsize{subsec}% \resetmathfonts \setleading{25pt}} \def\titlefont#1{{\titlefonts\rmisbold #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl \def\curfontsize{chap}% \def\lsize{sec}\def\lllsize{text}% \resetmathfonts \setleading{19pt}} \def\secfonts{% \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl \def\curfontsize{sec}% \def\lsize{subsec}\def\lllsize{reduced}% \resetmathfonts \setleading{16pt}} \def\subsecfonts{% \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl \def\curfontsize{ssec}% \def\lsize{text}\def\lllsize{small}% \resetmathfonts \setleading{15pt}} \let\subsubsecfonts = \subsecfonts \def\reducedfonts{% \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy \let\tenttsl=\reducedttsl \def\curfontsize{reduced}% \def\lsize{small}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallfonts{% \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy \let\tenttsl=\smallttsl \def\curfontsize{small}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallerfonts{% \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy \let\tenttsl=\smallerttsl \def\curfontsize{smaller}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{9.5pt}} % Fonts for short table of contents. \setfont\shortcontrm\rmshape{12}{1000}{OT1} \setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 \setfont\shortcontsl\slshape{12}{1000}{OT1} \setfont\shortconttt\ttshape{12}{1000}{OT1TT} % Define these just so they can be easily changed for other fonts. \def\angleleft{$\langle$} \def\angleright{$\rangle$} % Set the fonts to use with the @small... environments. \let\smallexamplefonts = \smallfonts % About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample % can fit this many characters: % 8.5x11=86 smallbook=72 a4=90 a5=69 % If we use \scriptfonts (8pt), then we can fit this many characters: % 8.5x11=90+ smallbook=80 a4=90+ a5=77 % For me, subjectively, the few extra characters that fit aren't worth % the additional smallness of 8pt. So I'm making the default 9pt. % % By the way, for comparison, here's what fits with @example (10pt): % 8.5x11=71 smallbook=60 a4=75 a5=58 % --karl, 24jan03. % Set up the default fonts, so we can use them for creating boxes. % \definetextfontsizexi \message{markup,} % Check if we are currently using a typewriter font. Since all the % Computer Modern typewriter fonts have zero interword stretch (and % shrink), and it is reasonable to expect all typewriter fonts to have % this property, we can check that font parameter. % \def\ifmonospace{\ifdim\fontdimen3\font=0pt } % Markup style infrastructure. \defmarkupstylesetup\INITMACRO will % define and register \INITMACRO to be called on markup style changes. % \INITMACRO can check \currentmarkupstyle for the innermost % style and the set of \ifmarkupSTYLE switches for all styles % currently in effect. \newif\ifmarkupvar \newif\ifmarkupsamp \newif\ifmarkupkey %\newif\ifmarkupfile % @file == @samp. %\newif\ifmarkupoption % @option == @samp. \newif\ifmarkupcode \newif\ifmarkupkbd %\newif\ifmarkupenv % @env == @code. %\newif\ifmarkupcommand % @command == @code. \newif\ifmarkuptex % @tex (and part of @math, for now). \newif\ifmarkupexample \newif\ifmarkupverb \newif\ifmarkupverbatim \let\currentmarkupstyle\empty \def\setupmarkupstyle#1{% \csname markup#1true\endcsname \def\currentmarkupstyle{#1}% \markupstylesetup } \let\markupstylesetup\empty \def\defmarkupstylesetup#1{% \expandafter\def\expandafter\markupstylesetup \expandafter{\markupstylesetup #1}% \def#1% } % Markup style setup for left and right quotes. \defmarkupstylesetup\markupsetuplq{% \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuplqdefault \else \temp \fi } \defmarkupstylesetup\markupsetuprq{% \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuprqdefault \else \temp \fi } { \catcode`\'=\active \catcode`\`=\active \gdef\markupsetuplqdefault{\let`\lq} \gdef\markupsetuprqdefault{\let'\rq} \gdef\markupsetcodequoteleft{\let`\codequoteleft} \gdef\markupsetcodequoteright{\let'\codequoteright} \gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft} } \let\markupsetuplqcode \markupsetcodequoteleft \let\markupsetuprqcode \markupsetcodequoteright \let\markupsetuplqexample \markupsetcodequoteleft \let\markupsetuprqexample \markupsetcodequoteright \let\markupsetuplqverb \markupsetcodequoteleft \let\markupsetuprqverb \markupsetcodequoteright \let\markupsetuplqverbatim \markupsetcodequoteleft \let\markupsetuprqverbatim \markupsetcodequoteright \let\markupsetuplqsamp \markupsetnoligaturesquoteleft \let\markupsetuplqkbd \markupsetnoligaturesquoteleft % Allow an option to not replace quotes with a regular directed right % quote/apostrophe (char 0x27), but instead use the undirected quote % from cmtt (char 0x0d). The undirected quote is ugly, so don't make it % the default, but it works for pasting with more pdf viewers (at least % evince), the lilypond developers report. xpdf does work with the % regular 0x27. % \def\codequoteright{% \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax '% \else \char'15 \fi \else \char'15 \fi } % % and a similar option for the left quote char vs. a grave accent. % Modern fonts display ASCII 0x60 as a grave accent, so some people like % the code environments to do likewise. % \def\codequoteleft{% \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax % [Knuth] pp. 380,381,391 % \relax disables Spanish ligatures ?` and !` of \tt font. \relax`% \else \char'22 \fi \else \char'22 \fi } % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. \def\noligaturesquoteleft{\relax\lq} % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 %% Add scribe-like font environments, plus @l for inline lisp (usually sans %% serif) and @ii for TeX italic % \smartitalic{ARG} outputs arg in italics, followed by an italic correction % unless the following character is such as not to need one. \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else \ptexslash\fi\fi\fi} \def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx} \def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx} % like \smartslanted except unconditionally uses \ttsl. % @var is set to this for defun arguments. \def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx} % @cite is like \smartslanted except unconditionally use \sl. We never want % ttsl for book titles, do we? \def\cite#1{{\sl #1}\futurelet\next\smartitalicx} \let\i=\smartitalic \let\slanted=\smartslanted \def\var#1{{\setupmarkupstyle{var}\smartslanted{#1}}} \let\dfn=\smartslanted \let\emph=\smartitalic % Explicit font changes: @r, @sc, undocumented @ii. \def\r#1{{\rm #1}} % roman font \def\sc#1{{\smallcaps#1}} % smallcaps font \def\ii#1{{\it #1}} % italic font % @b, explicit bold. Also @strong. \def\b#1{{\bf #1}} \let\strong=\b % @sansserif, explicit sans. \def\sansserif#1{{\sf #1}} % We can't just use \exhyphenpenalty, because that only has effect at % the end of a paragraph. Restore normal hyphenation at the end of the % group within which \nohyphenation is presumably called. % \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} \def\restorehyphenation{\hyphenchar\font = `- } % Set sfcode to normal for the chars that usually have another value. % Can't use plain's \frenchspacing because it uses the `\x notation, and % sometimes \x has an active definition that messes things up. % \catcode`@=11 \def\plainfrenchspacing{% \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m \def\endofsentencespacefactor{1000}% for @. and friends } \def\plainnonfrenchspacing{% \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 \def\endofsentencespacefactor{3000}% for @. and friends } \catcode`@=\other \def\endofsentencespacefactor{3000}% default % @t, explicit typewriter. \def\t#1{% {\tt \rawbackslash \plainfrenchspacing #1}% \null } % @samp. \def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} % definition of @key that produces a lozenge. Doesn't adjust to text size. %\setfont\keyrm\rmshape{8}{1000}{OT1} %\font\keysy=cmsy9 %\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% % \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% % \vbox{\hrule\kern-0.4pt % \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% % \kern-0.4pt\hrule}% % \kern-.06em\raise0.4pt\hbox{\angleright}}}} % definition of @key with no lozenge. If the current font is already % monospace, don't change it; that way, we respect @kbdinputstyle. But % if it isn't monospace, then use \tt. % \def\key#1{{\setupmarkupstyle{key}% \nohyphenation \ifmonospace\else\tt\fi #1}\null} % ctrl is no longer a Texinfo command. \def\ctrl #1{{\tt \rawbackslash \hat}#1} % @file, @option are the same as @samp. \let\file=\samp \let\option=\samp % @code is a modification of @t, % which makes spaces the same size as normal in the surrounding text. \def\tclose#1{% {% % Change normal interword space to be same as for the current font. \spaceskip = \fontdimen2\font % % Switch to typewriter. \tt % % But `\ ' produces the large typewriter interword space. \def\ {{\spaceskip = 0pt{} }}% % % Turn off hyphenation. \nohyphenation % \rawbackslash \plainfrenchspacing #1% }% \null } % We *must* turn on hyphenation at `-' and `_' in @code. % Otherwise, it is too hard to avoid overfull hboxes % in the Emacs manual, the Library manual, etc. % Unfortunately, TeX uses one parameter (\hyphenchar) to control % both hyphenation at - and hyphenation within words. % We must therefore turn them both off (\tclose does that) % and arrange explicitly to hyphenate at a dash. % -- rms. { \catcode`\-=\active \catcode`\_=\active \catcode`\'=\active \catcode`\`=\active \global\let'=\rq \global\let`=\lq % default definitions % \global\def\code{\begingroup \setupmarkupstyle{code}% % The following should really be moved into \setupmarkupstyle handlers. \catcode\dashChar=\active \catcode\underChar=\active \ifallowcodebreaks \let-\codedash \let_\codeunder \else \let-\realdash \let_\realunder \fi \codex } } \def\realdash{-} \def\codedash{-\discretionary{}{}{}} \def\codeunder{% % this is all so @math{@code{var_name}+1} can work. In math mode, _ % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) % will therefore expand the active definition of _, which is us % (inside @code that is), therefore an endless loop. \ifusingtt{\ifmmode \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. \else\normalunderscore \fi \discretionary{}{}{}}% {\_}% } \def\codex #1{\tclose{#1}\endgroup} % An additional complication: the above will allow breaks after, e.g., % each of the four underscores in __typeof__. This is undesirable in % some manuals, especially if they don't have long identifiers in % general. @allowcodebreaks provides a way to control this. % \newif\ifallowcodebreaks \allowcodebreakstrue \def\keywordtrue{true} \def\keywordfalse{false} \parseargdef\allowcodebreaks{% \def\txiarg{#1}% \ifx\txiarg\keywordtrue \allowcodebreakstrue \else\ifx\txiarg\keywordfalse \allowcodebreaksfalse \else \errhelp = \EMsimple \errmessage{Unknown @allowcodebreaks option `\txiarg'}% \fi\fi } % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. \def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}} % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), % `example' (@kbd uses ttsl only inside of @example and friends), % or `code' (@kbd uses normal tty font always). \parseargdef\kbdinputstyle{% \def\txiarg{#1}% \ifx\txiarg\worddistinct \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% \else\ifx\txiarg\wordexample \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% \else\ifx\txiarg\wordcode \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% \else \errhelp = \EMsimple \errmessage{Unknown @kbdinputstyle option `\txiarg'}% \fi\fi\fi } \def\worddistinct{distinct} \def\wordexample{example} \def\wordcode{code} % Default is `distinct'. \kbdinputstyle distinct \def\xkey{\key} \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% \ifx\one\xkey\ifx\threex\three \key{#2}% \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi} % For @indicateurl, @env, @command quotes seem unnecessary, so use \code. \let\indicateurl=\code \let\env=\code \let\command=\code % @clicksequence{File @click{} Open ...} \def\clicksequence#1{\begingroup #1\endgroup} % @clickstyle @arrow (by default) \parseargdef\clickstyle{\def\click{#1}} \def\click{\arrow} % @uref (abbreviation for `urlref') takes an optional (comma-separated) % second argument specifying the text to display and an optional third % arg as text to display instead of (rather than in addition to) the url % itself. First (mandatory) arg is the url. Perhaps eventually put in % a hypertex \special here. % \def\uref#1{\douref #1,,,\finish} \def\douref#1,#2,#3,#4\finish{\begingroup \unsepspaces \pdfurl{#1}% \setbox0 = \hbox{\ignorespaces #3}% \ifdim\wd0 > 0pt \unhbox0 % third arg given, show only that \else \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \ifpdf \unhbox0 % PDF: 2nd arg given, show only it \else \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url \fi \else \code{#1}% only url given, so show it \fi \fi \endlink \endgroup} % @url synonym for @uref, since that's how everyone uses it. % \let\url=\uref % rms does not like angle brackets --karl, 17may97. % So now @email is just like @uref, unless we are pdf. % %\def\email#1{\angleleft{\tt #1}\angleright} \ifpdf \def\email#1{\doemail#1,,\finish} \def\doemail#1,#2,#3\finish{\begingroup \unsepspaces \pdfurl{mailto:#1}% \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi \endlink \endgroup} \else \let\email=\uref \fi % Typeset a dimension, e.g., `in' or `pt'. The only reason for the % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. % \def\dmn#1{\thinspace #1} % @l was never documented to mean ``switch to the Lisp font'', % and it is not used as such in any manual I can find. We need it for % Polish suppressed-l. --karl, 22sep96. %\def\l#1{{\li #1}\null} % @acronym for "FBI", "NATO", and the like. % We print this one point size smaller, since it's intended for % all-uppercase. % \def\acronym#1{\doacronym #1,,\finish} \def\doacronym#1,#2,#3\finish{% {\selectfonts\lsize #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi } % @abbr for "Comput. J." and the like. % No font change, but don't do end-of-sentence spacing. % \def\abbr#1{\doabbr #1,,\finish} \def\doabbr#1,#2,#3\finish{% {\plainfrenchspacing #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi } \message{glyphs,} % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. % % Since these characters are used in examples, they should be an even number of % \tt widths. Each \tt character is 1en, so two makes it 1em. % \def\point{$\star$} \def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} \def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} \def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} \def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}} % The @error{} command. % Adapted from the TeXbook's \boxit. % \newbox\errorbox % {\tentt \global\dimen0 = 3em}% Width of the box. \dimen2 = .55pt % Thickness of rules % The text. (`r' is open on the right, `e' somewhat less so on the left.) \setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt} % \setbox\errorbox=\hbox to \dimen0{\hfil \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. \advance\hsize by -2\dimen2 % Rules. \vbox{% \hrule height\dimen2 \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. \kern3pt\vrule width\dimen2}% Space to right. \hrule height\dimen2} \hfil} % \def\error{\leavevmode\lower.7ex\copy\errorbox} % @pounds{} is a sterling sign, which Knuth put in the CM italic font. % \def\pounds{{\it\$}} % @euro{} comes from a separate font, depending on the current style. % We use the free feym* fonts from the eurosym package by Henrik % Theiling, which support regular, slanted, bold and bold slanted (and % "outlined" (blackboard board, sort of) versions, which we don't need). % It is available from http://www.ctan.org/tex-archive/fonts/eurosym. % % Although only regular is the truly official Euro symbol, we ignore % that. The Euro is designed to be slightly taller than the regular % font height. % % feymr - regular % feymo - slanted % feybr - bold % feybo - bold slanted % % There is no good (free) typewriter version, to my knowledge. % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. % Hmm. % % Also doesn't work in math. Do we need to do math with euro symbols? % Hope not. % % \def\euro{{\eurofont e}} \def\eurofont{% % We set the font at each command, rather than predefining it in % \textfonts and the other font-switching commands, so that % installations which never need the symbol don't have to have the % font installed. % % There is only one designed size (nominal 10pt), so we always scale % that to the current nominal size. % % By the way, simply using "at 1em" works for cmr10 and the like, but % does not work for cmbx10 and other extended/shrunken fonts. % \def\eurosize{\csname\curfontsize nominalsize\endcsname}% % \ifx\curfontstyle\bfstylename % bold: \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize \else % regular: \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize \fi \thiseurofont } % Glyphs from the EC fonts. We don't use \let for the aliases, because % sometimes we redefine the original macro, and the alias should reflect % the redefinition. % % Use LaTeX names for the Icelandic letters. \def\DH{{\ecfont \char"D0}} % Eth \def\dh{{\ecfont \char"F0}} % eth \def\TH{{\ecfont \char"DE}} % Thorn \def\th{{\ecfont \char"FE}} % thorn % \def\guillemetleft{{\ecfont \char"13}} \def\guillemotleft{\guillemetleft} \def\guillemetright{{\ecfont \char"14}} \def\guillemotright{\guillemetright} \def\guilsinglleft{{\ecfont \char"0E}} \def\guilsinglright{{\ecfont \char"0F}} \def\quotedblbase{{\ecfont \char"12}} \def\quotesinglbase{{\ecfont \char"0D}} % % This positioning is not perfect (see the ogonek LaTeX package), but % we have the precomposed glyphs for the most common cases. We put the % tests to use those glyphs in the single \ogonek macro so we have fewer % dummy definitions to worry about for index entries, etc. % % ogonek is also used with other letters in Lithuanian (IOU), but using % the precomposed glyphs for those is not so easy since they aren't in % the same EC font. \def\ogonek#1{{% \def\temp{#1}% \ifx\temp\macrocharA\Aogonek \else\ifx\temp\macrochara\aogonek \else\ifx\temp\macrocharE\Eogonek \else\ifx\temp\macrochare\eogonek \else \ecfont \setbox0=\hbox{#1}% \ifdim\ht0=1ex\accent"0C #1% \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}% \fi \fi\fi\fi\fi }% } \def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A} \def\aogonek{{\ecfont \char"A1}}\def\macrochara{a} \def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} \def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} % % Use the ec* fonts (cm-super in outline format) for non-CM glyphs. \def\ecfont{% % We can't distinguish serif/sans and italic/slanted, but this % is used for crude hacks anyway (like adding French and German % quotes to documents typeset with CM, where we lose kerning), so % hopefully nobody will notice/care. \edef\ecsize{\csname\curfontsize ecsize\endcsname}% \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% \ifx\curfontstyle\bfstylename % bold: \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize \else % regular: \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize \fi \thisecfont } % @registeredsymbol - R in a circle. The font for the R should really % be smaller yet, but lllsize is the best we can do for now. % Adapted from the plain.tex definition of \copyright. % \def\registeredsymbol{% $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}% \hfil\crcr\Orb}}% }$% } % @textdegree - the normal degrees sign. % \def\textdegree{$^\circ$} % Laurent Siebenmann reports \Orb undefined with: % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 % so we'll define it if necessary. % \ifx\Orb\undefined \def\Orb{\mathhexbox20D} \fi % Quotes. \chardef\quotedblleft="5C \chardef\quotedblright=`\" \chardef\quoteleft=`\` \chardef\quoteright=`\' \message{page headings,} \newskip\titlepagetopglue \titlepagetopglue = 1.5in \newskip\titlepagebottomglue \titlepagebottomglue = 2pc % First the title page. Must do @settitle before @titlepage. \newif\ifseenauthor \newif\iffinishedtitlepage % Do an implicit @contents or @shortcontents after @end titlepage if the % user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. % \newif\ifsetcontentsaftertitlepage \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue \newif\ifsetshortcontentsaftertitlepage \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue \parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% \endgroup\page\hbox{}\page} \envdef\titlepage{% % Open one extra group, as we want to close it in the middle of \Etitlepage. \begingroup \parindent=0pt \textfonts % Leave some space at the very top of the page. \vglue\titlepagetopglue % No rule at page bottom unless we print one at the top with @title. \finishedtitlepagetrue % % Most title ``pages'' are actually two pages long, with space % at the top of the second. We don't want the ragged left on the second. \let\oldpage = \page \def\page{% \iffinishedtitlepage\else \finishtitlepage \fi \let\page = \oldpage \page \null }% } \def\Etitlepage{% \iffinishedtitlepage\else \finishtitlepage \fi % It is important to do the page break before ending the group, % because the headline and footline are only empty inside the group. % If we use the new definition of \page, we always get a blank page % after the title page, which we certainly don't want. \oldpage \endgroup % % Need this before the \...aftertitlepage checks so that if they are % in effect the toc pages will come out with page numbers. \HEADINGSon % % If they want short, they certainly want long too. \ifsetshortcontentsaftertitlepage \shortcontents \contents \global\let\shortcontents = \relax \global\let\contents = \relax \fi % \ifsetcontentsaftertitlepage \contents \global\let\contents = \relax \global\let\shortcontents = \relax \fi } \def\finishtitlepage{% \vskip4pt \hrule height 2pt width \hsize \vskip\titlepagebottomglue \finishedtitlepagetrue } %%% Macros to be used within @titlepage: \let\subtitlerm=\tenrm \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} \parseargdef\title{% \checkenv\titlepage \leftline{\titlefonts\rmisbold #1} % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt } \parseargdef\subtitle{% \checkenv\titlepage {\subtitlefont \rightline{#1}}% } % @author should come last, but may come many times. % It can also be used inside @quotation. % \parseargdef\author{% \def\temp{\quotation}% \ifx\thisenv\temp \def\quotationauthor{#1}% printed in \Equotation. \else \checkenv\titlepage \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi {\secfonts\rmisbold \leftline{#1}}% \fi } %%% Set up page headings and footings. \let\thispage=\folio \newtoks\evenheadline % headline on even pages \newtoks\oddheadline % headline on odd pages \newtoks\evenfootline % footline on even pages \newtoks\oddfootline % footline on odd pages % Now make TeX use those variables \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline \else \the\evenheadline \fi}} \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline \else \the\evenfootline \fi}\HEADINGShook} \let\HEADINGShook=\relax % Commands to set those variables. % For example, this is what @headings on does % @evenheading @thistitle|@thispage|@thischapter % @oddheading @thischapter|@thispage|@thistitle % @evenfooting @thisfile|| % @oddfooting ||@thisfile \def\evenheading{\parsearg\evenheadingxxx} \def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish} \def\evenheadingyyy #1\|#2\|#3\|#4\finish{% \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddheading{\parsearg\oddheadingxxx} \def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish} \def\oddheadingyyy #1\|#2\|#3\|#4\finish{% \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}% \def\evenfooting{\parsearg\evenfootingxxx} \def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish} \def\evenfootingyyy #1\|#2\|#3\|#4\finish{% \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddfooting{\parsearg\oddfootingxxx} \def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish} \def\oddfootingyyy #1\|#2\|#3\|#4\finish{% \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% % % Leave some space for the footline. Hopefully ok to assume % @evenfooting will not be used by itself. \global\advance\pageheight by -12pt \global\advance\vsize by -12pt } \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} % @evenheadingmarks top \thischapter <- chapter at the top of a page % @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page % % The same set of arguments for: % % @oddheadingmarks % @evenfootingmarks % @oddfootingmarks % @everyheadingmarks % @everyfootingmarks \def\evenheadingmarks{\headingmarks{even}{heading}} \def\oddheadingmarks{\headingmarks{odd}{heading}} \def\evenfootingmarks{\headingmarks{even}{footing}} \def\oddfootingmarks{\headingmarks{odd}{footing}} \def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} \headingmarks{odd}{heading}{#1} } \def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} \headingmarks{odd}{footing}{#1} } % #1 = even/odd, #2 = heading/footing, #3 = top/bottom. \def\headingmarks#1#2#3 {% \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname \global\expandafter\let\csname get#1#2marks\endcsname \temp } \everyheadingmarks bottom \everyfootingmarks bottom % @headings double turns headings on for double-sided printing. % @headings single turns headings on for single-sided printing. % @headings off turns them off. % @headings on same as @headings double, retained for compatibility. % @headings after turns on double-sided headings after this page. % @headings doubleafter turns on double-sided headings after this page. % @headings singleafter turns on single-sided headings after this page. % By default, they are off at the start of a document, % and turned `on' after @end titlepage. \def\headings #1 {\csname HEADINGS#1\endcsname} \def\HEADINGSoff{% \global\evenheadline={\hfil} \global\evenfootline={\hfil} \global\oddheadline={\hfil} \global\oddfootline={\hfil}} \HEADINGSoff % When we turn headings on, set the page number to 1. % For double-sided printing, put current file name in lower left corner, % chapter name on inside top of right hand pages, document % title on inside top of left hand pages, and page numbers on outside top % edge of all pages. \def\HEADINGSdouble{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \let\contentsalignmacro = \chappager % For single-sided printing, chapter title goes across top left of page, % page number on top right. \def\HEADINGSsingle{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } \def\HEADINGSon{\HEADINGSdouble} \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} \let\HEADINGSdoubleafter=\HEADINGSafter \def\HEADINGSdoublex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} \def\HEADINGSsinglex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } % Subroutines used in generating headings % This produces Day Month Year style of output. % Only define if not already defined, in case a txi-??.tex file has set % up a different format (e.g., txi-cs.tex does this). \ifx\today\undefined \def\today{% \number\day\space \ifcase\month \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec \fi \space\number\year} \fi % @settitle line... specifies the title of the document, for headings. % It generates no output of its own. \def\thistitle{\putwordNoTitle} \def\settitle{\parsearg{\gdef\thistitle}} \message{tables,} % Tables -- @table, @ftable, @vtable, @item(x). % default indentation of table text \newdimen\tableindent \tableindent=.8in % default indentation of @itemize and @enumerate text \newdimen\itemindent \itemindent=.3in % margin between end of table item and start of table text. \newdimen\itemmargin \itemmargin=.1in % used internally for \itemindent minus \itemmargin \newdimen\itemmax % Note @table, @ftable, and @vtable define @item, @itemx, etc., with % these defs. % They also define \itemindex % to index the item name in whatever manner is desired (perhaps none). \newif\ifitemxneedsnegativevskip \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} \def\internalBitem{\smallbreak \parsearg\itemzzz} \def\internalBitemx{\itemxpar \parsearg\itemzzz} \def\itemzzz #1{\begingroup % \advance\hsize by -\rightskip \advance\hsize by -\tableindent \setbox0=\hbox{\itemindicate{#1}}% \itemindex{#1}% \nobreak % This prevents a break before @itemx. % % If the item text does not fit in the space we have, put it on a line % by itself, and do not allow a page break either before or after that % line. We do not start a paragraph here because then if the next % command is, e.g., @kindex, the whatsit would get put into the % horizontal list on a line by itself, resulting in extra blank space. \ifdim \wd0>\itemmax % % Make this a paragraph so we get the \parskip glue and wrapping, % but leave it ragged-right. \begingroup \advance\leftskip by-\tableindent \advance\hsize by\tableindent \advance\rightskip by0pt plus1fil \leavevmode\unhbox0\par \endgroup % % We're going to be starting a paragraph, but we don't want the % \parskip glue -- logically it's part of the @item we just started. \nobreak \vskip-\parskip % % Stop a page break at the \parskip glue coming up. However, if % what follows is an environment such as @example, there will be no % \parskip glue; then the negative vskip we just inserted would % cause the example and the item to crash together. So we use this % bizarre value of 10001 as a signal to \aboveenvbreak to insert % \parskip glue after all. Section titles are handled this way also. % \penalty 10001 \endgroup \itemxneedsnegativevskipfalse \else % The item text fits into the space. Start a paragraph, so that the % following text (if any) will end up on the same line. \noindent % Do this with kerns and \unhbox so that if there is a footnote in % the item text, it can migrate to the main vertical list and % eventually be printed. \nobreak\kern-\tableindent \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 \unhbox0 \nobreak\kern\dimen0 \endgroup \itemxneedsnegativevskiptrue \fi } \def\item{\errmessage{@item while not in a list environment}} \def\itemx{\errmessage{@itemx while not in a list environment}} % @table, @ftable, @vtable. \envdef\table{% \let\itemindex\gobble \tablecheck{table}% } \envdef\ftable{% \def\itemindex ##1{\doind {fn}{\code{##1}}}% \tablecheck{ftable}% } \envdef\vtable{% \def\itemindex ##1{\doind {vr}{\code{##1}}}% \tablecheck{vtable}% } \def\tablecheck#1{% \ifnum \the\catcode`\^^M=\active \endgroup \errmessage{This command won't work in this context; perhaps the problem is that we are \inenvironment\thisenv}% \def\next{\doignore{#1}}% \else \let\next\tablex \fi \next } \def\tablex#1{% \def\itemindicate{#1}% \parsearg\tabley } \def\tabley#1{% {% \makevalueexpandable \edef\temp{\noexpand\tablez #1\space\space\space}% \expandafter }\temp \endtablez } \def\tablez #1 #2 #3 #4\endtablez{% \aboveenvbreak \ifnum 0#1>0 \advance \leftskip by #1\mil \fi \ifnum 0#2>0 \tableindent=#2\mil \fi \ifnum 0#3>0 \advance \rightskip by #3\mil \fi \itemmax=\tableindent \advance \itemmax by -\itemmargin \advance \leftskip by \tableindent \exdentamount=\tableindent \parindent = 0pt \parskip = \smallskipamount \ifdim \parskip=0pt \parskip=2pt \fi \let\item = \internalBitem \let\itemx = \internalBitemx } \def\Etable{\endgraf\afterenvbreak} \let\Eftable\Etable \let\Evtable\Etable \let\Eitemize\Etable \let\Eenumerate\Etable % This is the counter used by @enumerate, which is really @itemize \newcount \itemno \envdef\itemize{\parsearg\doitemize} \def\doitemize#1{% \aboveenvbreak \itemmax=\itemindent \advance\itemmax by -\itemmargin \advance\leftskip by \itemindent \exdentamount=\itemindent \parindent=0pt \parskip=\smallskipamount \ifdim\parskip=0pt \parskip=2pt \fi % % Try typesetting the item mark that if the document erroneously says % something like @itemize @samp (intending @table), there's an error % right away at the @itemize. It's not the best error message in the % world, but it's better than leaving it to the @item. This means if % the user wants an empty mark, they have to say @w{} not just @w. \def\itemcontents{#1}% \setbox0 = \hbox{\itemcontents}% % % @itemize with no arg is equivalent to @itemize @bullet. \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi % \let\item=\itemizeitem } % Definition of @item while inside @itemize and @enumerate. % \def\itemizeitem{% \advance\itemno by 1 % for enumerations {\let\par=\endgraf \smallbreak}% reasonable place to break {% % If the document has an @itemize directly after a section title, a % \nobreak will be last on the list, and \sectionheading will have % done a \vskip-\parskip. In that case, we don't want to zero % parskip, or the item text will crash with the heading. On the % other hand, when there is normal text preceding the item (as there % usually is), we do want to zero parskip, or there would be too much % space. In that case, we won't have a \nobreak before. At least % that's the theory. \ifnum\lastpenalty<10000 \parskip=0in \fi \noindent \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% % \vadjust{\penalty 1200}}% not good to break after first line of item. \flushcr } % \splitoff TOKENS\endmark defines \first to be the first token in % TOKENS, and \rest to be the remainder. % \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% % Allow an optional argument of an uppercase letter, lowercase letter, % or number, to specify the first label in the enumerated list. No % argument is the same as `1'. % \envparseargdef\enumerate{\enumeratey #1 \endenumeratey} \def\enumeratey #1 #2\endenumeratey{% % If we were given no argument, pretend we were given `1'. \def\thearg{#1}% \ifx\thearg\empty \def\thearg{1}\fi % % Detect if the argument is a single token. If so, it might be a % letter. Otherwise, the only valid thing it can be is a number. % (We will always have one token, because of the test we just made. % This is a good thing, since \splitoff doesn't work given nothing at % all -- the first parameter is undelimited.) \expandafter\splitoff\thearg\endmark \ifx\rest\empty % Only one token in the argument. It could still be anything. % A ``lowercase letter'' is one whose \lccode is nonzero. % An ``uppercase letter'' is one whose \lccode is both nonzero, and % not equal to itself. % Otherwise, we assume it's a number. % % We need the \relax at the end of the \ifnum lines to stop TeX from % continuing to look for a . % \ifnum\lccode\expandafter`\thearg=0\relax \numericenumerate % a number (we hope) \else % It's a letter. \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax \lowercaseenumerate % lowercase letter \else \uppercaseenumerate % uppercase letter \fi \fi \else % Multiple tokens in the argument. We hope it's a number. \numericenumerate \fi } % An @enumerate whose labels are integers. The starting integer is % given in \thearg. % \def\numericenumerate{% \itemno = \thearg \startenumeration{\the\itemno}% } % The starting (lowercase) letter is in \thearg. \def\lowercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more lowercase letters in @enumerate; get a bigger alphabet}% \fi \char\lccode\itemno }% } % The starting (uppercase) letter is in \thearg. \def\uppercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more uppercase letters in @enumerate; get a bigger alphabet} \fi \char\uccode\itemno }% } % Call \doitemize, adding a period to the first argument and supplying the % common last two arguments. Also subtract one from the initial value in % \itemno, since @item increments \itemno. % \def\startenumeration#1{% \advance\itemno by -1 \doitemize{#1.}\flushcr } % @alphaenumerate and @capsenumerate are abbreviations for giving an arg % to @enumerate. % \def\alphaenumerate{\enumerate{a}} \def\capsenumerate{\enumerate{A}} \def\Ealphaenumerate{\Eenumerate} \def\Ecapsenumerate{\Eenumerate} % @multitable macros % Amy Hendrickson, 8/18/94, 3/6/96 % % @multitable ... @end multitable will make as many columns as desired. % Contents of each column will wrap at width given in preamble. Width % can be specified either with sample text given in a template line, % or in percent of \hsize, the current width of text on page. % Table can continue over pages but will only break between lines. % To make preamble: % % Either define widths of columns in terms of percent of \hsize: % @multitable @columnfractions .25 .3 .45 % @item ... % % Numbers following @columnfractions are the percent of the total % current hsize to be used for each column. You may use as many % columns as desired. % Or use a template: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item ... % using the widest term desired in each column. % Each new table line starts with @item, each subsequent new column % starts with @tab. Empty columns may be produced by supplying @tab's % with nothing between them for as many times as empty columns are needed, % ie, @tab@tab@tab will produce two empty columns. % @item, @tab do not need to be on their own lines, but it will not hurt % if they are. % Sample multitable: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item first col stuff @tab second col stuff @tab third col % @item % first col stuff % @tab % second col stuff % @tab % third col % @item first col stuff @tab second col stuff % @tab Many paragraphs of text may be used in any column. % % They will wrap at the width determined by the template. % @item@tab@tab This will be in third column. % @end multitable % Default dimensions may be reset by user. % @multitableparskip is vertical space between paragraphs in table. % @multitableparindent is paragraph indent in table. % @multitablecolmargin is horizontal space to be left between columns. % @multitablelinespace is space to leave between table items, baseline % to baseline. % 0pt means it depends on current normal line spacing. % \newskip\multitableparskip \newskip\multitableparindent \newdimen\multitablecolspace \newskip\multitablelinespace \multitableparskip=0pt \multitableparindent=6pt \multitablecolspace=12pt \multitablelinespace=0pt % Macros used to set up halign preamble: % \let\endsetuptable\relax \def\xendsetuptable{\endsetuptable} \let\columnfractions\relax \def\xcolumnfractions{\columnfractions} \newif\ifsetpercent % #1 is the @columnfraction, usually a decimal number like .5, but might % be just 1. We just use it, whatever it is. % \def\pickupwholefraction#1 {% \global\advance\colcount by 1 \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}% \setuptable } \newcount\colcount \def\setuptable#1{% \def\firstarg{#1}% \ifx\firstarg\xendsetuptable \let\go = \relax \else \ifx\firstarg\xcolumnfractions \global\setpercenttrue \else \ifsetpercent \let\go\pickupwholefraction \else \global\advance\colcount by 1 \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a % separator; typically that is always in the input, anyway. \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% \fi \fi \ifx\go\pickupwholefraction % Put the argument back for the \pickupwholefraction call, so % we'll always have a period there to be parsed. \def\go{\pickupwholefraction#1}% \else \let\go = \setuptable \fi% \fi \go } % multitable-only commands. % % @headitem starts a heading row, which we typeset in bold. % Assignments have to be global since we are inside the implicit group % of an alignment entry. \everycr resets \everytab so we don't have to % undo it ourselves. \def\headitemfont{\b}% for people to use in the template row; not changeable \def\headitem{% \checkenv\multitable \crcr \global\everytab={\bf}% can't use \headitemfont since the parsing differs \the\everytab % for the first item }% % % A \tab used to include \hskip1sp. But then the space in a template % line is not enough. That is bad. So let's go back to just `&' until % we again encounter the problem the 1sp was intended to solve. % --karl, nathan@acm.org, 20apr99. \def\tab{\checkenv\multitable &\the\everytab}% % @multitable ... @end multitable definitions: % \newtoks\everytab % insert after every tab. % \envdef\multitable{% \vskip\parskip \startsavinginserts % % @item within a multitable starts a normal row. % We use \def instead of \let so that if one of the multitable entries % contains an @itemize, we don't choke on the \item (seen as \crcr aka % \endtemplate) expanding \doitemize. \def\item{\crcr}% % \tolerance=9500 \hbadness=9500 \setmultitablespacing \parskip=\multitableparskip \parindent=\multitableparindent \overfullrule=0pt \global\colcount=0 % \everycr = {% \noalign{% \global\everytab={}% \global\colcount=0 % Reset the column counter. % Check for saved footnotes, etc. \checkinserts % Keeps underfull box messages off when table breaks over pages. %\filbreak % Maybe so, but it also creates really weird page breaks when the % table breaks over pages. Wouldn't \vfil be better? Wait until the % problem manifests itself, so it can be fixed for real --karl. }% }% % \parsearg\domultitable } \def\domultitable#1{% % To parse everything between @multitable and @item: \setuptable#1 \endsetuptable % % This preamble sets up a generic column definition, which will % be used as many times as user calls for columns. % \vtop will set a single line and will also let text wrap and % continue for many paragraphs if desired. \halign\bgroup &% \global\advance\colcount by 1 \multistrut \vtop{% % Use the current \colcount to find the correct column width: \hsize=\expandafter\csname col\the\colcount\endcsname % % In order to keep entries from bumping into each other % we will add a \leftskip of \multitablecolspace to all columns after % the first one. % % If a template has been used, we will add \multitablecolspace % to the width of each template entry. % % If the user has set preamble in terms of percent of \hsize we will % use that dimension as the width of the column, and the \leftskip % will keep entries from bumping into each other. Table will start at % left margin and final column will justify at right margin. % % Make sure we don't inherit \rightskip from the outer environment. \rightskip=0pt \ifnum\colcount=1 % The first column will be indented with the surrounding text. \advance\hsize by\leftskip \else \ifsetpercent \else % If user has not set preamble in terms of percent of \hsize % we will advance \hsize by \multitablecolspace. \advance\hsize by \multitablecolspace \fi % In either case we will make \leftskip=\multitablecolspace: \leftskip=\multitablecolspace \fi % Ignoring space at the beginning and end avoids an occasional spurious % blank line, when TeX decides to break the line at the space before the % box from the multistrut, so the strut ends up on a line by itself. % For example: % @multitable @columnfractions .11 .89 % @item @code{#} % @tab Legal holiday which is valid in major parts of the whole country. % Is automatically provided with highlighting sequences respectively % marking characters. \noindent\ignorespaces##\unskip\multistrut }\cr } \def\Emultitable{% \crcr \egroup % end the \halign \global\setpercentfalse } \def\setmultitablespacing{% \def\multistrut{\strut}% just use the standard line spacing % % Compute \multitablelinespace (if not defined by user) for use in % \multitableparskip calculation. We used define \multistrut based on % this, but (ironically) that caused the spacing to be off. % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. \ifdim\multitablelinespace=0pt \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip \global\advance\multitablelinespace by-\ht0 \fi %% Test to see if parskip is larger than space between lines of %% table. If not, do nothing. %% If so, set to same dimension as multitablelinespace. \ifdim\multitableparskip>\multitablelinespace \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller %% than skip between lines in the table. \fi% \ifdim\multitableparskip=0pt \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller %% than skip between lines in the table. \fi} \message{conditionals,} % @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext, % @ifnotxml always succeed. They currently do nothing; we don't % attempt to check whether the conditionals are properly nested. But we % have to remember that they are conditionals, so that @end doesn't % attempt to close an environment group. % \def\makecond#1{% \expandafter\let\csname #1\endcsname = \relax \expandafter\let\csname iscond.#1\endcsname = 1 } \makecond{iftex} \makecond{ifnotdocbook} \makecond{ifnothtml} \makecond{ifnotinfo} \makecond{ifnotplaintext} \makecond{ifnotxml} % Ignore @ignore, @ifhtml, @ifinfo, and the like. % \def\direntry{\doignore{direntry}} \def\documentdescription{\doignore{documentdescription}} \def\docbook{\doignore{docbook}} \def\html{\doignore{html}} \def\ifdocbook{\doignore{ifdocbook}} \def\ifhtml{\doignore{ifhtml}} \def\ifinfo{\doignore{ifinfo}} \def\ifnottex{\doignore{ifnottex}} \def\ifplaintext{\doignore{ifplaintext}} \def\ifxml{\doignore{ifxml}} \def\ignore{\doignore{ignore}} \def\menu{\doignore{menu}} \def\xml{\doignore{xml}} % Ignore text until a line `@end #1', keeping track of nested conditionals. % % A count to remember the depth of nesting. \newcount\doignorecount \def\doignore#1{\begingroup % Scan in ``verbatim'' mode: \obeylines \catcode`\@ = \other \catcode`\{ = \other \catcode`\} = \other % % Make sure that spaces turn into tokens that match what \doignoretext wants. \spaceisspace % % Count number of #1's that we've seen. \doignorecount = 0 % % Swallow text until we reach the matching `@end #1'. \dodoignore{#1}% } { \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source. \obeylines % % \gdef\dodoignore#1{% % #1 contains the command name as a string, e.g., `ifinfo'. % % Define a command to find the next `@end #1'. \long\def\doignoretext##1^^M@end #1{% \doignoretextyyy##1^^M@#1\_STOP_}% % % And this command to find another #1 command, at the beginning of a % line. (Otherwise, we would consider a line `@c @ifset', for % example, to count as an @ifset for nesting.) \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% % % And now expand that command. \doignoretext ^^M% }% } \def\doignoreyyy#1{% \def\temp{#1}% \ifx\temp\empty % Nothing found. \let\next\doignoretextzzz \else % Found a nested condition, ... \advance\doignorecount by 1 \let\next\doignoretextyyy % ..., look for another. % If we're here, #1 ends with ^^M\ifinfo (for example). \fi \next #1% the token \_STOP_ is present just after this macro. } % We have to swallow the remaining "\_STOP_". % \def\doignoretextzzz#1{% \ifnum\doignorecount = 0 % We have just found the outermost @end. \let\next\enddoignore \else % Still inside a nested condition. \advance\doignorecount by -1 \let\next\doignoretext % Look for the next @end. \fi \next } % Finish off ignored text. { \obeylines% % Ignore anything after the last `@end #1'; this matters in verbatim % environments, where otherwise the newline after an ignored conditional % would result in a blank line in the output. \gdef\enddoignore#1^^M{\endgroup\ignorespaces}% } % @set VAR sets the variable VAR to an empty value. % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. % % Since we want to separate VAR from REST-OF-LINE (which might be % empty), we can't just use \parsearg; we have to insert a space of our % own to delimit the rest of the line, and then take it out again if we % didn't need it. % We rely on the fact that \parsearg sets \catcode`\ =10. % \parseargdef\set{\setyyy#1 \endsetyyy} \def\setyyy#1 #2\endsetyyy{% {% \makevalueexpandable \def\temp{#2}% \edef\next{\gdef\makecsname{SET#1}}% \ifx\temp\empty \next{}% \else \setzzz#2\endsetzzz \fi }% } % Remove the trailing space \setxxx inserted. \def\setzzz#1 \endsetzzz{\next{#1}} % @clear VAR clears (i.e., unsets) the variable VAR. % \parseargdef\clear{% {% \makevalueexpandable \global\expandafter\let\csname SET#1\endcsname=\relax }% } % @value{foo} gets the text saved in variable foo. \def\value{\begingroup\makevalueexpandable\valuexxx} \def\valuexxx#1{\expandablevalue{#1}\endgroup} { \catcode`\- = \active \catcode`\_ = \active % \gdef\makevalueexpandable{% \let\value = \expandablevalue % We don't want these characters active, ... \catcode`\-=\other \catcode`\_=\other % ..., but we might end up with active ones in the argument if % we're called from @code, as @code{@value{foo-bar_}}, though. % So \let them to their normal equivalents. \let-\realdash \let_\normalunderscore } } % We have this subroutine so that we can handle at least some @value's % properly in indexes (we call \makevalueexpandable in \indexdummies). % The command has to be fully expandable (if the variable is set), since % the result winds up in the index file. This means that if the % variable's value contains other Texinfo commands, it's almost certain % it will fail (although perhaps we could fix that with sufficient work % to do a one-level expansion on the result, instead of complete). % \def\expandablevalue#1{% \expandafter\ifx\csname SET#1\endcsname\relax {[No value for ``#1'']}% \message{Variable `#1', used in @value, is not set.}% \else \csname SET#1\endcsname \fi } % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. % % To get special treatment of `@end ifset,' call \makeond and the redefine. % \makecond{ifset} \def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} \def\doifset#1#2{% {% \makevalueexpandable \let\next=\empty \expandafter\ifx\csname SET#2\endcsname\relax #1% If not set, redefine \next. \fi \expandafter }\next } \def\ifsetfail{\doignore{ifset}} % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been % defined with @set, or has been undefined with @clear. % % The `\else' inside the `\doifset' parameter is a trick to reuse the % above code: if the variable is not set, do nothing, if it is set, % then redefine \next to \ifclearfail. % \makecond{ifclear} \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} \def\ifclearfail{\doignore{ifclear}} % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. \let\dircategory=\comment % @defininfoenclose. \let\definfoenclose=\comment \message{indexing,} % Index generation facilities % Define \newwrite to be identical to plain tex's \newwrite % except not \outer, so it can be used within macros and \if's. \edef\newwrite{\makecsname{ptexnewwrite}} % \newindex {foo} defines an index named foo. % It automatically defines \fooindex such that % \fooindex ...rest of line... puts an entry in the index foo. % It also defines \fooindfile to be the number of the output channel for % the file that accumulates this index. The file's extension is foo. % The name of an index should be no more than 2 characters long % for the sake of vms. % \def\newindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 % Open the file \fi \expandafter\xdef\csname#1index\endcsname{% % Define @#1index \noexpand\doindex{#1}} } % @defindex foo == \newindex{foo} % \def\defindex{\parsearg\newindex} % Define @defcodeindex, like @defindex except put all entries in @code. % \def\defcodeindex{\parsearg\newcodeindex} % \def\newcodeindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 \fi \expandafter\xdef\csname#1index\endcsname{% \noexpand\docodeindex{#1}}% } % @synindex foo bar makes index foo feed into index bar. % Do this instead of @defindex foo if you don't want it as a separate index. % % @syncodeindex foo bar similar, but put all entries made for index foo % inside @code. % \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), % #3 the target index (bar). \def\dosynindex#1#2#3{% % Only do \closeout if we haven't already done it, else we'll end up % closing the target index. \expandafter \ifx\csname donesynindex#2\endcsname \relax % The \closeout helps reduce unnecessary open files; the limit on the % Acorn RISC OS is a mere 16 files. \expandafter\closeout\csname#2indfile\endcsname \expandafter\let\csname donesynindex#2\endcsname = 1 \fi % redefine \fooindfile: \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname \expandafter\let\csname#2indfile\endcsname=\temp % redefine \fooindex: \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% } % Define \doindex, the driver for all \fooindex macros. % Argument #1 is generated by the calling \fooindex macro, % and it is "foo", the name of the index. % \doindex just uses \parsearg; it calls \doind for the actual work. % This is because \doind is more useful to call from other macros. % There is also \dosubind {index}{topic}{subtopic} % which makes an entry in a two-level index such as the operation index. \def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} \def\singleindexer #1{\doind{\indexname}{#1}} % like the previous two, but they put @code around the argument. \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} % Take care of Texinfo commands that can appear in an index entry. % Since there are some commands we want to expand, and others we don't, % we have to laboriously prevent expansion for those that we don't. % \def\indexdummies{% \escapechar = `\\ % use backslash in output files. \def\@{@}% change to @@ when we switch to @ as escape char in index files. \def\ {\realbackslash\space }% % % Need these in case \tex is in effect and \{ is a \delimiter again. % But can't use \lbracecmd and \rbracecmd because texindex assumes % braces and backslashes are used only as delimiters. \let\{ = \mylbrace \let\} = \myrbrace % % I don't entirely understand this, but when an index entry is % generated from a macro call, the \endinput which \scanmacro inserts % causes processing to be prematurely terminated. This is, % apparently, because \indexsorttmp is fully expanded, and \endinput % is an expandable command. The redefinition below makes \endinput % disappear altogether for that purpose -- although logging shows that % processing continues to some further point. On the other hand, it % seems \endinput does not hurt in the printed index arg, since that % is still getting written without apparent harm. % % Sample source (mac-idx3.tex, reported by Graham Percival to % help-texinfo, 22may06): % @macro funindex {WORD} % @findex xyz % @end macro % ... % @funindex commtest % % The above is not enough to reproduce the bug, but it gives the flavor. % % Sample whatsit resulting: % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} % % So: \let\endinput = \empty % % Do the redefinitions. \commondummies } % For the aux and toc files, @ is the escape character. So we want to % redefine everything using @ as the escape character (instead of % \realbackslash, still used for index files). When everything uses @, % this will be simpler. % \def\atdummies{% \def\@{@@}% \def\ {@ }% \let\{ = \lbraceatcmd \let\} = \rbraceatcmd % % Do the redefinitions. \commondummies \otherbackslash } % Called from \indexdummies and \atdummies. % \def\commondummies{% % % \definedummyword defines \#1 as \string\#1\space, thus effectively % preventing its expansion. This is used only for control% words, % not control letters, because the \space would be incorrect for % control characters, but is needed to separate the control word % from whatever follows. % % For control letters, we have \definedummyletter, which omits the % space. % % These can be used both for control words that take an argument and % those that do not. If it is followed by {arg} in the input, then % that will dutifully get written to the index (or wherever). % \def\definedummyword ##1{\def##1{\string##1\space}}% \def\definedummyletter##1{\def##1{\string##1}}% \let\definedummyaccent\definedummyletter % \commondummiesnofonts % \definedummyletter\_% % % Non-English letters. \definedummyword\AA \definedummyword\AE \definedummyword\DH \definedummyword\L \definedummyword\O \definedummyword\OE \definedummyword\TH \definedummyword\aa \definedummyword\ae \definedummyword\dh \definedummyword\exclamdown \definedummyword\l \definedummyword\o \definedummyword\oe \definedummyword\ordf \definedummyword\ordm \definedummyword\questiondown \definedummyword\ss \definedummyword\th % % Although these internal commands shouldn't show up, sometimes they do. \definedummyword\bf \definedummyword\gtr \definedummyword\hat \definedummyword\less \definedummyword\sf \definedummyword\sl \definedummyword\tclose \definedummyword\tt % \definedummyword\LaTeX \definedummyword\TeX % % Assorted special characters. \definedummyword\bullet \definedummyword\comma \definedummyword\copyright \definedummyword\registeredsymbol \definedummyword\dots \definedummyword\enddots \definedummyword\equiv \definedummyword\error \definedummyword\euro \definedummyword\guillemetleft \definedummyword\guillemetright \definedummyword\guilsinglleft \definedummyword\guilsinglright \definedummyword\expansion \definedummyword\minus \definedummyword\ogonek \definedummyword\pounds \definedummyword\point \definedummyword\print \definedummyword\quotedblbase \definedummyword\quotedblleft \definedummyword\quotedblright \definedummyword\quoteleft \definedummyword\quoteright \definedummyword\quotesinglbase \definedummyword\result \definedummyword\textdegree % % We want to disable all macros so that they are not expanded by \write. \macrolist % \normalturnoffactive % % Handle some cases of @value -- where it does not contain any % (non-fully-expandable) commands. \makevalueexpandable } % \commondummiesnofonts: common to \commondummies and \indexnofonts. % \def\commondummiesnofonts{% % Control letters and accents. \definedummyletter\!% \definedummyaccent\"% \definedummyaccent\'% \definedummyletter\*% \definedummyaccent\,% \definedummyletter\.% \definedummyletter\/% \definedummyletter\:% \definedummyaccent\=% \definedummyletter\?% \definedummyaccent\^% \definedummyaccent\`% \definedummyaccent\~% \definedummyword\u \definedummyword\v \definedummyword\H \definedummyword\dotaccent \definedummyword\ogonek \definedummyword\ringaccent \definedummyword\tieaccent \definedummyword\ubaraccent \definedummyword\udotaccent \definedummyword\dotless % % Texinfo font commands. \definedummyword\b \definedummyword\i \definedummyword\r \definedummyword\sc \definedummyword\t % % Commands that take arguments. \definedummyword\acronym \definedummyword\cite \definedummyword\code \definedummyword\command \definedummyword\dfn \definedummyword\email \definedummyword\emph \definedummyword\env \definedummyword\file \definedummyword\kbd \definedummyword\key \definedummyword\math \definedummyword\option \definedummyword\pxref \definedummyword\ref \definedummyword\samp \definedummyword\strong \definedummyword\tie \definedummyword\uref \definedummyword\url \definedummyword\var \definedummyword\verb \definedummyword\w \definedummyword\xref } % \indexnofonts is used when outputting the strings to sort the index % by, and when constructing control sequence names. It eliminates all % control sequences and just writes whatever the best ASCII sort string % would be for a given command (usually its argument). % \def\indexnofonts{% % Accent commands should become @asis. \def\definedummyaccent##1{\let##1\asis}% % We can just ignore other control letters. \def\definedummyletter##1{\let##1\empty}% % Hopefully, all control words can become @asis. \let\definedummyword\definedummyaccent % \commondummiesnofonts % % Don't no-op \tt, since it isn't a user-level command % and is used in the definitions of the active chars like <, >, |, etc. % Likewise with the other plain tex font commands. %\let\tt=\asis % \def\ { }% \def\@{@}% % how to handle braces? \def\_{\normalunderscore}% % % Non-English letters. \def\AA{AA}% \def\AE{AE}% \def\DH{DZZ}% \def\L{L}% \def\OE{OE}% \def\O{O}% \def\TH{ZZZ}% \def\aa{aa}% \def\ae{ae}% \def\dh{dzz}% \def\exclamdown{!}% \def\l{l}% \def\oe{oe}% \def\ordf{a}% \def\ordm{o}% \def\o{o}% \def\questiondown{?}% \def\ss{ss}% \def\th{zzz}% % \def\LaTeX{LaTeX}% \def\TeX{TeX}% % % Assorted special characters. % (The following {} will end up in the sort string, but that's ok.) \def\bullet{bullet}% \def\comma{,}% \def\copyright{copyright}% \def\dots{...}% \def\enddots{...}% \def\equiv{==}% \def\error{error}% \def\euro{euro}% \def\expansion{==>}% \def\guillemetleft{<<}% \def\guillemetright{>>}% \def\guilsinglleft{<}% \def\guilsinglright{>}% \def\minus{-}% \def\point{.}% \def\pounds{pounds}% \def\print{-|}% \def\quotedblbase{"}% \def\quotedblleft{"}% \def\quotedblright{"}% \def\quoteleft{`}% \def\quoteright{'}% \def\quotesinglbase{,}% \def\registeredsymbol{R}% \def\result{=>}% \def\textdegree{o}% % % We need to get rid of all macros, leaving only the arguments (if present). % Of course this is not nearly correct, but it is the best we can do for now. % makeinfo does not expand macros in the argument to @deffn, which ends up % writing an index entry, and texindex isn't prepared for an index sort entry % that starts with \. % % Since macro invocations are followed by braces, we can just redefine them % to take a single TeX argument. The case of a macro invocation that % goes to end-of-line is not handled. % \macrolist } \let\indexbackslash=0 %overridden during \printindex. \let\SETmarginindex=\relax % put index entries in margin (undocumented)? % Most index entries go through here, but \dosubind is the general case. % #1 is the index name, #2 is the entry text. \def\doind#1#2{\dosubind{#1}{#2}{}} % Workhorse for all \fooindexes. % #1 is name of index, #2 is stuff to put there, #3 is subentry -- % empty if called from \doind, as we usually are (the main exception % is with most defuns, which call us directly). % \def\dosubind#1#2#3{% \iflinks {% % Store the main index entry text (including the third arg). \toks0 = {#2}% % If third arg is present, precede it with a space. \def\thirdarg{#3}% \ifx\thirdarg\empty \else \toks0 = \expandafter{\the\toks0 \space #3}% \fi % \edef\writeto{\csname#1indfile\endcsname}% % \safewhatsit\dosubindwrite }% \fi } % Write the entry in \toks0 to the index file: % \def\dosubindwrite{% % Put the index entry in the margin if desired. \ifx\SETmarginindex\relax\else \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% \fi % % Remember, we are within a group. \indexdummies % Must do this here, since \bf, etc expand at this stage \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now % so it will be output as is; and it will print as backslash. % % Process the index entry with all font commands turned off, to % get the string to sort by. {\indexnofonts \edef\temp{\the\toks0}% need full expansion \xdef\indexsorttmp{\temp}% }% % % Set up the complete index entry, with both the sort key and % the original text, including any font commands. We write % three arguments to \entry to the .?? file (four in the % subentry case), texindex reduces to two when writing the .??s % sorted result. \edef\temp{% \write\writeto{% \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% }% \temp } % Take care of unwanted page breaks/skips around a whatsit: % % If a skip is the last thing on the list now, preserve it % by backing up by \lastskip, doing the \write, then inserting % the skip again. Otherwise, the whatsit generated by the % \write or \pdfdest will make \lastskip zero. The result is that % sequences like this: % @end defun % @tindex whatever % @defun ... % will have extra space inserted, because the \medbreak in the % start of the @defun won't see the skip inserted by the @end of % the previous defun. % % But don't do any of this if we're not in vertical mode. We % don't want to do a \vskip and prematurely end a paragraph. % % Avoid page breaks due to these extra skips, too. % % But wait, there is a catch there: % We'll have to check whether \lastskip is zero skip. \ifdim is not % sufficient for this purpose, as it ignores stretch and shrink parts % of the skip. The only way seems to be to check the textual % representation of the skip. % % The following is almost like \def\zeroskipmacro{0.0pt} except that % the ``p'' and ``t'' characters have catcode \other, not 11 (letter). % \edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} % \newskip\whatsitskip \newcount\whatsitpenalty % % ..., ready, GO: % \def\safewhatsit#1{% \ifhmode #1% \else % \lastskip and \lastpenalty cannot both be nonzero simultaneously. \whatsitskip = \lastskip \edef\lastskipmacro{\the\lastskip}% \whatsitpenalty = \lastpenalty % % If \lastskip is nonzero, that means the last item was a % skip. And since a skip is discardable, that means this % -\whatsitskip glue we're inserting is preceded by a % non-discardable item, therefore it is not a potential % breakpoint, therefore no \nobreak needed. \ifx\lastskipmacro\zeroskipmacro \else \vskip-\whatsitskip \fi % #1% % \ifx\lastskipmacro\zeroskipmacro % If \lastskip was zero, perhaps the last item was a penalty, and % perhaps it was >=10000, e.g., a \nobreak. In that case, we want % to re-insert the same penalty (values >10000 are used for various % signals); since we just inserted a non-discardable item, any % following glue (such as a \parskip) would be a breakpoint. For example: % % @deffn deffn-whatever % @vindex index-whatever % Description. % would allow a break between the index-whatever whatsit % and the "Description." paragraph. \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi \else % On the other hand, if we had a nonzero \lastskip, % this make-up glue would be preceded by a non-discardable item % (the whatsit from the \write), so we must insert a \nobreak. \nobreak\vskip\whatsitskip \fi \fi } % The index entry written in the file actually looks like % \entry {sortstring}{page}{topic} % or % \entry {sortstring}{page}{topic}{subtopic} % The texindex program reads in these files and writes files % containing these kinds of lines: % \initial {c} % before the first topic whose initial is c % \entry {topic}{pagelist} % for a topic that is used without subtopics % \primary {topic} % for the beginning of a topic that is used with subtopics % \secondary {subtopic}{pagelist} % for each subtopic. % Define the user-accessible indexing commands % @findex, @vindex, @kindex, @cindex. \def\findex {\fnindex} \def\kindex {\kyindex} \def\cindex {\cpindex} \def\vindex {\vrindex} \def\tindex {\tpindex} \def\pindex {\pgindex} \def\cindexsub {\begingroup\obeylines\cindexsub} {\obeylines % \gdef\cindexsub "#1" #2^^M{\endgroup % \dosubind{cp}{#2}{#1}}} % Define the macros used in formatting output of the sorted index material. % @printindex causes a particular index (the ??s file) to get printed. % It does not print any chapter heading (usually an @unnumbered). % \parseargdef\printindex{\begingroup \dobreak \chapheadingskip{10000}% % \smallfonts \rm \tolerance = 9500 \plainfrenchspacing \everypar = {}% don't want the \kern\-parindent from indentation suppression. % % See if the index file exists and is nonempty. % Change catcode of @ here so that if the index file contains % \initial {@} % as its first line, TeX doesn't complain about mismatched braces % (because it thinks @} is a control sequence). \catcode`\@ = 11 \openin 1 \jobname.#1s \ifeof 1 % \enddoublecolumns gets confused if there is no text in the index, % and it loses the chapter title and the aux file entries for the % index. The easiest way to prevent this problem is to make sure % there is some text. \putwordIndexNonexistent \else % % If the index file exists but is empty, then \openin leaves \ifeof % false. We have to make TeX try to read something from the file, so % it can discover if there is anything in it. \read 1 to \temp \ifeof 1 \putwordIndexIsEmpty \else % Index files are almost Texinfo source, but we use \ as the escape % character. It would be better to use @, but that's too big a change % to make right now. \def\indexbackslash{\backslashcurfont}% \catcode`\\ = 0 \escapechar = `\\ \begindoublecolumns \input \jobname.#1s \enddoublecolumns \fi \fi \closein 1 \endgroup} % These macros are used by the sorted index file itself. % Change them to control the appearance of the index. \def\initial#1{{% % Some minor font changes for the special characters. \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt % % Remove any glue we may have, we'll be inserting our own. \removelastskip % % We like breaks before the index initials, so insert a bonus. \nobreak \vskip 0pt plus 3\baselineskip \penalty 0 \vskip 0pt plus -3\baselineskip % % Typeset the initial. Making this add up to a whole number of % baselineskips increases the chance of the dots lining up from column % to column. It still won't often be perfect, because of the stretch % we need before each entry, but it's better. % % No shrink because it confuses \balancecolumns. \vskip 1.67\baselineskip plus .5\baselineskip \leftline{\secbf #1}% % Do our best not to break after the initial. \nobreak \vskip .33\baselineskip plus .1\baselineskip }} % \entry typesets a paragraph consisting of the text (#1), dot leaders, and % then page number (#2) flushed to the right margin. It is used for index % and table of contents entries. The paragraph is indented by \leftskip. % % A straightforward implementation would start like this: % \def\entry#1#2{... % But this freezes the catcodes in the argument, and can cause problems to % @code, which sets - active. This problem was fixed by a kludge--- % ``-'' was active throughout whole index, but this isn't really right. % % The right solution is to prevent \entry from swallowing the whole text. % --kasal, 21nov03 \def\entry{% \begingroup % % Start a new paragraph if necessary, so our assignments below can't % affect previous text. \par % % Do not fill out the last line with white space. \parfillskip = 0in % % No extra space above this paragraph. \parskip = 0in % % Do not prefer a separate line ending with a hyphen to fewer lines. \finalhyphendemerits = 0 % % \hangindent is only relevant when the entry text and page number % don't both fit on one line. In that case, bob suggests starting the % dots pretty far over on the line. Unfortunately, a large % indentation looks wrong when the entry text itself is broken across % lines. So we use a small indentation and put up with long leaders. % % \hangafter is reset to 1 (which is the value we want) at the start % of each paragraph, so we need not do anything with that. \hangindent = 2em % % When the entry text needs to be broken, just fill out the first line % with blank space. \rightskip = 0pt plus1fil % % A bit of stretch before each entry for the benefit of balancing % columns. \vskip 0pt plus1pt % % Swallow the left brace of the text (first parameter): \afterassignment\doentry \let\temp = } \def\doentry{% \bgroup % Instead of the swallowed brace. \noindent \aftergroup\finishentry % And now comes the text of the entry. } \def\finishentry#1{% % #1 is the page number. % % The following is kludged to not output a line of dots in the index if % there are no page numbers. The next person who breaks this will be % cursed by a Unix daemon. \setbox\boxA = \hbox{#1}% \ifdim\wd\boxA = 0pt \ % \else % % If we must, put the page number on a line of its own, and fill out % this line with blank space. (The \hfil is overwhelmed with the % fill leaders glue in \indexdotfill if the page number does fit.) \hfil\penalty50 \null\nobreak\indexdotfill % Have leaders before the page number. % % The `\ ' here is removed by the implicit \unskip that TeX does as % part of (the primitive) \par. Without it, a spurious underfull % \hbox ensues. \ifpdf \pdfgettoks#1.% \ \the\toksA \else \ #1% \fi \fi \par \endgroup } % Like plain.tex's \dotfill, except uses up at least 1 em. \def\indexdotfill{\cleaders \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill} \def\primary #1{\line{#1\hfil}} \newskip\secondaryindent \secondaryindent=0.5cm \def\secondary#1#2{{% \parfillskip=0in \parskip=0in \hangindent=1in \hangafter=1 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill \ifpdf \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. \else #2 \fi \par }} % Define two-column mode, which we use to typeset indexes. % Adapted from the TeXbook, page 416, which is to say, % the manmac.tex format used to print the TeXbook itself. \catcode`\@=11 \newbox\partialpage \newdimen\doublecolumnhsize \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns % Grab any single-column material above us. \output = {% % % Here is a possibility not foreseen in manmac: if we accumulate a % whole lot of material, we might end up calling this \output % routine twice in a row (see the doublecol-lose test, which is % essentially a couple of indexes with @setchapternewpage off). In % that case we just ship out what is in \partialpage with the normal % output routine. Generally, \partialpage will be empty when this % runs and this will be a no-op. See the indexspread.tex test case. \ifvoid\partialpage \else \onepageout{\pagecontents\partialpage}% \fi % \global\setbox\partialpage = \vbox{% % Unvbox the main output page. \unvbox\PAGE \kern-\topskip \kern\baselineskip }% }% \eject % run that output routine to set \partialpage % % Use the double-column output routine for subsequent pages. \output = {\doublecolumnout}% % % Change the page size parameters. We could do this once outside this % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 % format, but then we repeat the same computation. Repeating a couple % of assignments once per index is clearly meaningless for the % execution time, so we may as well do it in one place. % % First we halve the line length, less a little for the gutter between % the columns. We compute the gutter based on the line length, so it % changes automatically with the paper format. The magic constant % below is chosen so that the gutter has the same value (well, +-<1pt) % as it did when we hard-coded it. % % We put the result in a separate register, \doublecolumhsize, so we % can restore it in \pagesofar, after \hsize itself has (potentially) % been clobbered. % \doublecolumnhsize = \hsize \advance\doublecolumnhsize by -.04154\hsize \divide\doublecolumnhsize by 2 \hsize = \doublecolumnhsize % % Double the \vsize as well. (We don't need a separate register here, % since nobody clobbers \vsize.) \vsize = 2\vsize } % The double-column output routine for all double-column pages except % the last. % \def\doublecolumnout{% \splittopskip=\topskip \splitmaxdepth=\maxdepth % Get the available space for the double columns -- the normal % (undoubled) page height minus any material left over from the % previous page. \dimen@ = \vsize \divide\dimen@ by 2 \advance\dimen@ by -\ht\partialpage % % box0 will be the left-hand column, box2 the right. \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ \onepageout\pagesofar \unvbox255 \penalty\outputpenalty } % % Re-output the contents of the output page -- any previous material, % followed by the two boxes we just split, in box0 and box2. \def\pagesofar{% \unvbox\partialpage % \hsize = \doublecolumnhsize \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}% } % % All done with double columns. \def\enddoublecolumns{% % The following penalty ensures that the page builder is exercised % _before_ we change the output routine. This is necessary in the % following situation: % % The last section of the index consists only of a single entry. % Before this section, \pagetotal is less than \pagegoal, so no % break occurs before the last section starts. However, the last % section, consisting of \initial and the single \entry, does not % fit on the page and has to be broken off. Without the following % penalty the page builder will not be exercised until \eject % below, and by that time we'll already have changed the output % routine to the \balancecolumns version, so the next-to-last % double-column page will be processed with \balancecolumns, which % is wrong: The two columns will go to the main vertical list, with % the broken-off section in the recent contributions. As soon as % the output routine finishes, TeX starts reconsidering the page % break. The two columns and the broken-off section both fit on the % page, because the two columns now take up only half of the page % goal. When TeX sees \eject from below which follows the final % section, it invokes the new output routine that we've set after % \balancecolumns below; \onepageout will try to fit the two columns % and the final section into the vbox of \pageheight (see % \pagebody), causing an overfull box. % % Note that glue won't work here, because glue does not exercise the % page builder, unlike penalties (see The TeXbook, pp. 280-281). \penalty0 % \output = {% % Split the last of the double-column material. Leave it on the % current page, no automatic page break. \balancecolumns % % If we end up splitting too much material for the current page, % though, there will be another page break right after this \output % invocation ends. Having called \balancecolumns once, we do not % want to call it again. Therefore, reset \output to its normal % definition right away. (We hope \balancecolumns will never be % called on to balance too much material, but if it is, this makes % the output somewhat more palatable.) \global\output = {\onepageout{\pagecontents\PAGE}}% }% \eject \endgroup % started in \begindoublecolumns % % \pagegoal was set to the doubled \vsize above, since we restarted % the current page. We're now back to normal single-column % typesetting, so reset \pagegoal to the normal \vsize (after the % \endgroup where \vsize got restored). \pagegoal = \vsize } % % Called at the end of the double column material. \def\balancecolumns{% \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. \dimen@ = \ht0 \advance\dimen@ by \topskip \advance\dimen@ by-\baselineskip \divide\dimen@ by 2 % target to split to %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% \splittopskip = \topskip % Loop until we get a decent breakpoint. {% \vbadness = 10000 \loop \global\setbox3 = \copy0 \global\setbox1 = \vsplit3 to \dimen@ \ifdim\ht3>\dimen@ \global\advance\dimen@ by 1pt \repeat }% %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% \setbox0=\vbox to\dimen@{\unvbox1}% \setbox2=\vbox to\dimen@{\unvbox3}% % \pagesofar } \catcode`\@ = \other \message{sectioning,} % Chapters, sections, etc. % \unnumberedno is an oxymoron, of course. But we count the unnumbered % sections so that we can refer to them unambiguously in the pdf % outlines by their "section number". We avoid collisions with chapter % numbers by starting them at 10000. (If a document ever has 10000 % chapters, we're in trouble anyway, I'm sure.) \newcount\unnumberedno \unnumberedno = 10000 \newcount\chapno \newcount\secno \secno=0 \newcount\subsecno \subsecno=0 \newcount\subsubsecno \subsubsecno=0 % This counter is funny since it counts through charcodes of letters A, B, ... \newcount\appendixno \appendixno = `\@ % % \def\appendixletter{\char\the\appendixno} % We do the following ugly conditional instead of the above simple % construct for the sake of pdftex, which needs the actual % letter in the expansion, not just typeset. % \def\appendixletter{% \ifnum\appendixno=`A A% \else\ifnum\appendixno=`B B% \else\ifnum\appendixno=`C C% \else\ifnum\appendixno=`D D% \else\ifnum\appendixno=`E E% \else\ifnum\appendixno=`F F% \else\ifnum\appendixno=`G G% \else\ifnum\appendixno=`H H% \else\ifnum\appendixno=`I I% \else\ifnum\appendixno=`J J% \else\ifnum\appendixno=`K K% \else\ifnum\appendixno=`L L% \else\ifnum\appendixno=`M M% \else\ifnum\appendixno=`N N% \else\ifnum\appendixno=`O O% \else\ifnum\appendixno=`P P% \else\ifnum\appendixno=`Q Q% \else\ifnum\appendixno=`R R% \else\ifnum\appendixno=`S S% \else\ifnum\appendixno=`T T% \else\ifnum\appendixno=`U U% \else\ifnum\appendixno=`V V% \else\ifnum\appendixno=`W W% \else\ifnum\appendixno=`X X% \else\ifnum\appendixno=`Y Y% \else\ifnum\appendixno=`Z Z% % The \the is necessary, despite appearances, because \appendixletter is % expanded while writing the .toc file. \char\appendixno is not % expandable, thus it is written literally, thus all appendixes come out % with the same letter (or @) in the toc without it. \else\char\the\appendixno \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} % Each @chapter defines these (using marks) as the number+name, number % and name of the chapter. Page headings and footings can use % these. @section does likewise. \def\thischapter{} \def\thischapternum{} \def\thischaptername{} \def\thissection{} \def\thissectionnum{} \def\thissectionname{} \newcount\absseclevel % used to calculate proper heading level \newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count % @raisesections: treat @section as chapter, @subsection as section, etc. \def\raisesections{\global\advance\secbase by -1} \let\up=\raisesections % original BFox name % @lowersections: treat @chapter as section, @section as subsection, etc. \def\lowersections{\global\advance\secbase by 1} \let\down=\lowersections % original BFox name % we only have subsub. \chardef\maxseclevel = 3 % % A numbered section within an unnumbered changes to unnumbered too. % To achive this, remember the "biggest" unnum. sec. we are currently in: \chardef\unmlevel = \maxseclevel % % Trace whether the current chapter is an appendix or not: % \chapheadtype is "N" or "A", unnumbered chapters are ignored. \def\chapheadtype{N} % Choose a heading macro % #1 is heading type % #2 is heading level % #3 is text for heading \def\genhead#1#2#3{% % Compute the abs. sec. level: \absseclevel=#2 \advance\absseclevel by \secbase % Make sure \absseclevel doesn't fall outside the range: \ifnum \absseclevel < 0 \absseclevel = 0 \else \ifnum \absseclevel > 3 \absseclevel = 3 \fi \fi % The heading type: \def\headtype{#1}% \if \headtype U% \ifnum \absseclevel < \unmlevel \chardef\unmlevel = \absseclevel \fi \else % Check for appendix sections: \ifnum \absseclevel = 0 \edef\chapheadtype{\headtype}% \else \if \headtype A\if \chapheadtype N% \errmessage{@appendix... within a non-appendix chapter}% \fi\fi \fi % Check for numbered within unnumbered: \ifnum \absseclevel > \unmlevel \def\headtype{U}% \else \chardef\unmlevel = 3 \fi \fi % Now print the heading: \if \headtype U% \ifcase\absseclevel \unnumberedzzz{#3}% \or \unnumberedseczzz{#3}% \or \unnumberedsubseczzz{#3}% \or \unnumberedsubsubseczzz{#3}% \fi \else \if \headtype A% \ifcase\absseclevel \appendixzzz{#3}% \or \appendixsectionzzz{#3}% \or \appendixsubseczzz{#3}% \or \appendixsubsubseczzz{#3}% \fi \else \ifcase\absseclevel \chapterzzz{#3}% \or \seczzz{#3}% \or \numberedsubseczzz{#3}% \or \numberedsubsubseczzz{#3}% \fi \fi \fi \suppressfirstparagraphindent } % an interface: \def\numhead{\genhead N} \def\apphead{\genhead A} \def\unnmhead{\genhead U} % @chapter, @appendix, @unnumbered. Increment top-level counter, reset % all lower-level sectioning counters to zero. % % Also set \chaplevelprefix, which we prepend to @float sequence numbers % (e.g., figures), q.v. By default (before any chapter), that is empty. \let\chaplevelprefix = \empty % \outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz \def\chapterzzz#1{% % section resetting is \global in case the chapter is in a group, such % as an @include file. \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\chapno by 1 % % Used for \float. \gdef\chaplevelprefix{\the\chapno.}% \resetallfloatnos % % \putwordChapter can contain complex things in translations. \toks0=\expandafter{\putwordChapter}% \message{\the\toks0 \space \the\chapno}% % % Write the actual heading. \chapmacro{#1}{Ynumbered}{\the\chapno}% % % So @section and the like are numbered underneath this chapter. \global\let\section = \numberedsec \global\let\subsection = \numberedsubsec \global\let\subsubsection = \numberedsubsubsec } \outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz % \def\appendixzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\appendixno by 1 \gdef\chaplevelprefix{\appendixletter.}% \resetallfloatnos % % \putwordAppendix can contain complex things in translations. \toks0=\expandafter{\putwordAppendix}% \message{\the\toks0 \space \appendixletter}% % \chapmacro{#1}{Yappendix}{\appendixletter}% % \global\let\section = \appendixsec \global\let\subsection = \appendixsubsec \global\let\subsubsection = \appendixsubsubsec } \outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz \def\unnumberedzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\unnumberedno by 1 % % Since an unnumbered has no number, no prefix for figures. \global\let\chaplevelprefix = \empty \resetallfloatnos % % This used to be simply \message{#1}, but TeX fully expands the % argument to \message. Therefore, if #1 contained @-commands, TeX % expanded them. For example, in `@unnumbered The @cite{Book}', TeX % expanded @cite (which turns out to cause errors because \cite is meant % to be executed, not expanded). % % Anyway, we don't want the fully-expanded definition of @cite to appear % as a result of the \message, we just want `@cite' itself. We use % \the to achieve this: TeX expands \the only once, % simply yielding the contents of . (We also do this for % the toc entries.) \toks0 = {#1}% \message{(\the\toks0)}% % \chapmacro{#1}{Ynothing}{\the\unnumberedno}% % \global\let\section = \unnumberedsec \global\let\subsection = \unnumberedsubsec \global\let\subsubsection = \unnumberedsubsubsec } % @centerchap is like @unnumbered, but the heading is centered. \outer\parseargdef\centerchap{% % Well, we could do the following in a group, but that would break % an assumption that \chapmacro is called at the outermost level. % Thus we are safer this way: --kasal, 24feb04 \let\centerparametersmaybe = \centerparameters \unnmhead0{#1}% \let\centerparametersmaybe = \relax } % @top is like @unnumbered. \let\top\unnumbered % Sections. \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz \def\seczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% } \outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz \def\appendixsectionzzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% } \let\appendixsec\appendixsection \outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz \def\unnumberedseczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% } % Subsections. \outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz \def\numberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% } \outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz \def\appendixsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno}% } \outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz \def\unnumberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno}% } % Subsubsections. \outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz \def\numberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynumbered}% {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% } \outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz \def\appendixsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% } \outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz \def\unnumberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}% } % These macros control what the section commands do, according % to what kind of chapter we are in (ordinary, appendix, or unnumbered). % Define them by default for a numbered chapter. \let\section = \numberedsec \let\subsection = \numberedsubsec \let\subsubsection = \numberedsubsubsec % Define @majorheading, @heading and @subheading % NOTE on use of \vbox for chapter headings, section headings, and such: % 1) We use \vbox rather than the earlier \line to permit % overlong headings to fold. % 2) \hyphenpenalty is set to 10000 because hyphenation in a % heading is obnoxious; this forbids it. % 3) Likewise, headings look best if no \parindent is used, and % if justification is not attempted. Hence \raggedright. \def\majorheading{% {\advance\chapheadingskip by 10pt \chapbreak }% \parsearg\chapheadingzzz } \def\chapheading{\chapbreak \parsearg\chapheadingzzz} \def\chapheadingzzz#1{% {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\ptexraggedright \rmisbold #1\hfill}}% \bigskip \par\penalty 200\relax \suppressfirstparagraphindent } % @heading, @subheading, @subsubheading. \parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} % These macros generate a chapter, section, etc. heading only % (including whitespace, linebreaking, etc. around it), % given all the information in convenient, parsed form. %%% Args are the skip and penalty (usually negative) \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} %%% Define plain chapter starts, and page on/off switching for it % Parameter controlling skip before chapter headings (if needed) \newskip\chapheadingskip \def\chapbreak{\dobreak \chapheadingskip {-4000}} \def\chappager{\par\vfill\supereject} % Because \domark is called before \chapoddpage, the filler page will % get the headings for the next chapter, which is wrong. But we don't % care -- we just disable all headings on the filler page. \def\chapoddpage{% \chappager \ifodd\pageno \else \begingroup \evenheadline={\hfil}\evenfootline={\hfil}% \oddheadline={\hfil}\oddfootline={\hfil}% \hbox to 0pt{}% \chappager \endgroup \fi } \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} \def\CHAPPAGoff{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chapbreak \global\let\pagealignmacro=\chappager} \def\CHAPPAGon{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chappager \global\let\pagealignmacro=\chappager \global\def\HEADINGSon{\HEADINGSsingle}} \def\CHAPPAGodd{% \global\let\contentsalignmacro = \chapoddpage \global\let\pchapsepmacro=\chapoddpage \global\let\pagealignmacro=\chapoddpage \global\def\HEADINGSon{\HEADINGSdouble}} \CHAPPAGon % Chapter opening. % % #1 is the text, #2 is the section type (Ynumbered, Ynothing, % Yappendix, Yomitfromtoc), #3 the chapter number. % % To test against our argument. \def\Ynothingkeyword{Ynothing} \def\Yomitfromtockeyword{Yomitfromtoc} \def\Yappendixkeyword{Yappendix} % \def\chapmacro#1#2#3{% % Insert the first mark before the heading break (see notes for \domark). \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% \gdef\thissection{}}% % \def\temptype{#2}% \ifx\temptype\Ynothingkeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{\thischaptername}}% \else\ifx\temptype\Yomitfromtockeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{}}% \else\ifx\temptype\Yappendixkeyword \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\appendixletter}% % \noexpand\putwordAppendix avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thischapter{\noexpand\putwordAppendix{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \else \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\the\chapno}% % \noexpand\putwordChapter avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thischapter{\noexpand\putwordChapter{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \fi\fi\fi % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert the chapter heading break. \pchapsepmacro % % Now the second mark, after the heading break. No break points % between here and the heading. \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \domark % {% \chapfonts \rmisbold % % Have to define \lastsection before calling \donoderef, because the % xref code eventually uses it. On the other hand, it has to be called % after \pchapsepmacro, or the headline will change too soon. \gdef\lastsection{#1}% % % Only insert the separating space if we have a chapter/appendix % number, and don't print the unnumbered ``number''. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unnchap}% \else\ifx\temptype\Yomitfromtockeyword \setbox0 = \hbox{}% contents like unnumbered, but no toc entry \def\toctype{omit}% \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% \def\toctype{app}% \else \setbox0 = \hbox{#3\enspace}% \def\toctype{numchap}% \fi\fi\fi % % Write the toc entry for this chapter. Must come before the % \donoderef, because we include the current node name in the toc % entry, and \donoderef resets it to empty. \writetocentry{\toctype}{#1}{#3}% % % For pdftex, we have to write out the node definition (aka, make % the pdfdest) after any page break, but before the actual text has % been typeset. If the destination for the pdf outline is after the % text, then jumping from the outline may wind up with the text not % being visible, for instance under high magnification. \donoderef{#2}% % % Typeset the actual heading. \nobreak % Avoid page breaks at the interline glue. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}% }% \nobreak\bigskip % no page break after a chapter title \nobreak } % @centerchap -- centered and unnumbered. \let\centerparametersmaybe = \relax \def\centerparameters{% \advance\rightskip by 3\rightskip \leftskip = \rightskip \parfillskip = 0pt } % I don't think this chapter style is supported any more, so I'm not % updating it with the new noderef stuff. We'll see. --karl, 11aug03. % \def\setchapterstyle #1 {\csname CHAPF#1\endcsname} % \def\unnchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\ptexraggedright \rmisbold #1\hfill}}\bigskip \par\nobreak } \def\chfopen #1#2{\chapoddpage {\chapfonts \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% \par\penalty 5000 % } \def\centerchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak } \def\CHAPFopen{% \global\let\chapmacro=\chfopen \global\let\centerchapmacro=\centerchfopen} % Section titles. These macros combine the section number parts and % call the generic \sectionheading to do the printing. % \newskip\secheadingskip \def\secheadingbreak{\dobreak \secheadingskip{-1000}} % Subsection titles. \newskip\subsecheadingskip \def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}} % Subsubsection titles. \def\subsubsecheadingskip{\subsecheadingskip} \def\subsubsecheadingbreak{\subsecheadingbreak} % Print any size, any type, section title. % % #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is % the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the % section number. % \def\seckeyword{sec} % \def\sectionheading#1#2#3#4{% {% % Switch to the right set of fonts. \csname #2fonts\endcsname \rmisbold % \def\sectionlevel{#2}% \def\temptype{#3}% % % Insert first mark before the heading break (see notes for \domark). \let\prevsectiondefs=\lastsectiondefs \ifx\temptype\Ynothingkeyword \ifx\sectionlevel\seckeyword \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% \gdef\thissection{\thissectionname}}% \fi \else\ifx\temptype\Yomitfromtockeyword % Don't redefine \thissection. \else\ifx\temptype\Yappendixkeyword \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thissection{\noexpand\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \else \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thissection{\noexpand\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \fi\fi\fi % % Go into vertical mode. Usually we'll already be there, but we % don't want the following whatsit to end up in a preceding paragraph % if the document didn't happen to have a blank line. \par % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert space above the heading. \csname #2headingbreak\endcsname % % Now the second mark, after the heading break. No break points % between here and the heading. \let\prevsectiondefs=\lastsectiondefs \domark % % Only insert the space after the number if we have a section number. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unn}% \gdef\lastsection{#1}% \else\ifx\temptype\Yomitfromtockeyword % for @headings -- no section number, don't include in toc, % and don't redefine \lastsection. \setbox0 = \hbox{}% \def\toctype{omit}% \let\sectionlevel=\empty \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{#4\enspace}% \def\toctype{app}% \gdef\lastsection{#1}% \else \setbox0 = \hbox{#4\enspace}% \def\toctype{num}% \gdef\lastsection{#1}% \fi\fi\fi % % Write the toc entry (before \donoderef). See comments in \chapmacro. \writetocentry{\toctype\sectionlevel}{#1}{#4}% % % Write the node reference (= pdf destination for pdftex). % Again, see comments in \chapmacro. \donoderef{#3}% % % Interline glue will be inserted when the vbox is completed. % That glue will be a valid breakpoint for the page, since it'll be % preceded by a whatsit (usually from the \donoderef, or from the % \writetocentry if there was no node). We don't want to allow that % break, since then the whatsits could end up on page n while the % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. \nobreak % % Output the actual section heading. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright \hangindent=\wd0 % zero if no section number \unhbox0 #1}% }% % Add extra space after the heading -- half of whatever came above it. % Don't allow stretch, though. \kern .5 \csname #2headingskip\endcsname % % Do not let the kern be a potential breakpoint, as it would be if it % was followed by glue. \nobreak % % We'll almost certainly start a paragraph next, so don't let that % glue accumulate. (Not a breakpoint because it's preceded by a % discardable item.) \vskip-\parskip % % This is purely so the last item on the list is a known \penalty > % 10000. This is so \startdefun can avoid allowing breakpoints after % section headings. Otherwise, it would insert a valid breakpoint between: % % @section sec-whatever % @deffn def-whatever \penalty 10001 } \message{toc,} % Table of contents. \newwrite\tocfile % Write an entry to the toc file, opening it if necessary. % Called from @chapter, etc. % % Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} % We append the current node name (if any) and page number as additional % arguments for the \{chap,sec,...}entry macros which will eventually % read this. The node name is used in the pdf outlines as the % destination to jump to. % % We open the .toc file for writing here instead of at @setfilename (or % any other fixed time) so that @contents can be anywhere in the document. % But if #1 is `omit', then we don't do anything. This is used for the % table of contents chapter openings themselves. % \newif\iftocfileopened \def\omitkeyword{omit}% % \def\writetocentry#1#2#3{% \edef\writetoctype{#1}% \ifx\writetoctype\omitkeyword \else \iftocfileopened\else \immediate\openout\tocfile = \jobname.toc \global\tocfileopenedtrue \fi % \iflinks {\atdummies \edef\temp{% \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% \temp }% \fi \fi % % Tell \shipout to create a pdf destination on each page, if we're % writing pdf. These are used in the table of contents. We can't % just write one on every page because the title pages are numbered % 1 and 2 (the page numbers aren't printed), and so are the first % two pages of the document. Thus, we'd have two destinations named % `1', and two named `2'. \ifpdf \global\pdfmakepagedesttrue \fi } % These characters do not print properly in the Computer Modern roman % fonts, so we must take special care. This is more or less redundant % with the Texinfo input format setup at the end of this file. % \def\activecatcodes{% \catcode`\"=\active \catcode`\$=\active \catcode`\<=\active \catcode`\>=\active \catcode`\\=\active \catcode`\^=\active \catcode`\_=\active \catcode`\|=\active \catcode`\~=\active } % Read the toc file, which is essentially Texinfo input. \def\readtocfile{% \setupdatafile \activecatcodes \input \tocreadfilename } \newskip\contentsrightmargin \contentsrightmargin=1in \newcount\savepageno \newcount\lastnegativepageno \lastnegativepageno = -1 % Prepare to read what we've written to \tocfile. % \def\startcontents#1{% % If @setchapternewpage on, and @headings double, the contents should % start on an odd page, unlike chapters. Thus, we maintain % \contentsalignmacro in parallel with \pagealignmacro. % From: Torbjorn Granlund \contentsalignmacro \immediate\closeout\tocfile % % Don't need to put `Contents' or `Short Contents' in the headline. % It is abundantly clear what they are. \chapmacro{#1}{Yomitfromtoc}{}% % \savepageno = \pageno \begingroup % Set up to handle contents files properly. \raggedbottom % Worry more about breakpoints than the bottom. \advance\hsize by -\contentsrightmargin % Don't use the full line length. % % Roman numerals for page numbers. \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi } % redefined for the two-volume lispref. We always output on % \jobname.toc even if this is redefined. % \def\tocreadfilename{\jobname.toc} % Normal (long) toc. % \def\contents{% \startcontents{\putwordTOC}% \openin 1 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \ifeof 1 \else \pdfmakeoutlines \fi \closein 1 \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } % And just the chapters. \def\summarycontents{% \startcontents{\putwordShortTOC}% % \let\numchapentry = \shortchapentry \let\appentry = \shortchapentry \let\unnchapentry = \shortunnchapentry % We want a true roman here for the page numbers. \secfonts \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl \let\tt=\shortconttt \rm \hyphenpenalty = 10000 \advance\baselineskip by 1pt % Open it up a little. \def\numsecentry##1##2##3##4{} \let\appsecentry = \numsecentry \let\unnsecentry = \numsecentry \let\numsubsecentry = \numsecentry \let\appsubsecentry = \numsecentry \let\unnsubsecentry = \numsecentry \let\numsubsubsecentry = \numsecentry \let\appsubsubsecentry = \numsecentry \let\unnsubsubsecentry = \numsecentry \openin 1 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi \closein 1 \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } \let\shortcontents = \summarycontents % Typeset the label for a chapter or appendix for the short contents. % The arg is, e.g., `A' for an appendix, or `3' for a chapter. % \def\shortchaplabel#1{% % This space should be enough, since a single number is .5em, and the % widest letter (M) is 1em, at least in the Computer Modern fonts. % But use \hss just in case. % (This space doesn't include the extra space that gets added after % the label; that gets put in by \shortchapentry above.) % % We'd like to right-justify chapter numbers, but that looks strange % with appendix letters. And right-justifying numbers and % left-justifying letters looks strange when there is less than 10 % chapters. Have to read the whole toc once to know how many chapters % there are before deciding ... \hbox to 1em{#1\hss}% } % These macros generate individual entries in the table of contents. % The first argument is the chapter or section name. % The last argument is the page number. % The arguments in between are the chapter number, section number, ... % Chapters, in the main contents. \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} % % Chapters, in the short toc. % See comments in \dochapentry re vbox and related settings. \def\shortchapentry#1#2#3#4{% \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}% } % Appendices, in the main contents. % Need the word Appendix, and a fixed-size box. % \def\appendixbox#1{% % We use M since it's probably the widest letter. \setbox0 = \hbox{\putwordAppendix{} M}% \hbox to \wd0{\putwordAppendix{} #1\hss}} % \def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} % Unnumbered chapters. \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} \def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}} % Sections. \def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} \let\appsecentry=\numsecentry \def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} % Subsections. \def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} \let\appsubsecentry=\numsubsecentry \def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} % And subsubsections. \def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} \let\appsubsubsecentry=\numsubsubsecentry \def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} % This parameter controls the indentation of the various levels. % Same as \defaultparindent. \newdimen\tocindent \tocindent = 15pt % Now for the actual typesetting. In all these, #1 is the text and #2 is the % page number. % % If the toc has to be broken over pages, we want it to be at chapters % if at all possible; hence the \penalty. \def\dochapentry#1#2{% \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip \begingroup \chapentryfonts \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup \nobreak\vskip .25\baselineskip plus.1\baselineskip } \def\dosecentry#1#2{\begingroup \secentryfonts \leftskip=\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsecentry#1#2{\begingroup \subsecentryfonts \leftskip=2\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsubsecentry#1#2{\begingroup \subsubsecentryfonts \leftskip=3\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} % We use the same \entry macro as for the index entries. \let\tocentry = \entry % Space between chapter (or whatever) number and the title. \def\labelspace{\hskip1em \relax} \def\dopageno#1{{\rm #1}} \def\doshortpageno#1{{\rm #1}} \def\chapentryfonts{\secfonts \rm} \def\secentryfonts{\textfonts} \def\subsecentryfonts{\textfonts} \def\subsubsecentryfonts{\textfonts} \message{environments,} % @foo ... @end foo. % @tex ... @end tex escapes into raw Tex temporarily. % One exception: @ is still an escape character, so that @end tex works. % But \@ or @@ will get a plain tex @ character. \envdef\tex{% \setupmarkupstyle{tex}% \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie \catcode `\%=14 \catcode `\+=\other \catcode `\"=\other \catcode `\|=\other \catcode `\<=\other \catcode `\>=\other \catcode`\`=\other \catcode`\'=\other \escapechar=`\\ % \let\b=\ptexb \let\bullet=\ptexbullet \let\c=\ptexc \let\,=\ptexcomma \let\.=\ptexdot \let\dots=\ptexdots \let\equiv=\ptexequiv \let\!=\ptexexclam \let\i=\ptexi \let\indent=\ptexindent \let\noindent=\ptexnoindent \let\{=\ptexlbrace \let\+=\tabalign \let\}=\ptexrbrace \let\/=\ptexslash \let\*=\ptexstar \let\t=\ptext \expandafter \let\csname top\endcsname=\ptextop % outer \let\frenchspacing=\plainfrenchspacing % \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% \def\@{@}% } % There is no need to define \Etex. % Define @lisp ... @end lisp. % @lisp environment forms a group so it can rebind things, % including the definition of @end lisp (which normally is erroneous). % Amount to narrow the margins by for @lisp. \newskip\lispnarrowing \lispnarrowing=0.4in % This is the definition that ^^M gets inside @lisp, @example, and other % such environments. \null is better than a space, since it doesn't % have any width. \def\lisppar{\null\endgraf} % This space is always present above and below environments. \newskip\envskipamount \envskipamount = 0pt % Make spacing and below environment symmetrical. We use \parskip here % to help in doing that, since in @example-like environments \parskip % is reset to zero; thus the \afterenvbreak inserts no space -- but the % start of the next paragraph will insert \parskip. % \def\aboveenvbreak{{% % =10000 instead of <10000 because of a special case in \itemzzz and % \sectionheading, q.v. \ifnum \lastpenalty=10000 \else \advance\envskipamount by \parskip \endgraf \ifdim\lastskip<\envskipamount \removelastskip % it's not a good place to break if the last penalty was \nobreak % or better ... \ifnum\lastpenalty<10000 \penalty-50 \fi \vskip\envskipamount \fi \fi }} \let\afterenvbreak = \aboveenvbreak % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will % also clear it, so that its embedded environments do the narrowing again. \let\nonarrowing=\relax % @cartouche ... @end cartouche: draw rectangle w/rounded corners around % environment contents. \font\circle=lcircle10 \newdimen\circthick \newdimen\cartouter\newdimen\cartinner \newskip\normbskip\newskip\normpskip\newskip\normlskip \circthick=\fontdimen8\circle % \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth \def\ctr{{\hskip 6pt\circle\char'010}} \def\cbl{{\circle\char'012\hskip -6pt}} \def\cbr{{\hskip 6pt\circle\char'011}} \def\carttop{\hbox to \cartouter{\hskip\lskip \ctl\leaders\hrule height\circthick\hfil\ctr \hskip\rskip}} \def\cartbot{\hbox to \cartouter{\hskip\lskip \cbl\leaders\hrule height\circthick\hfil\cbr \hskip\rskip}} % \newskip\lskip\newskip\rskip \envdef\cartouche{% \ifhmode\par\fi % can't be in the midst of a paragraph. \startsavinginserts \lskip=\leftskip \rskip=\rightskip \leftskip=0pt\rightskip=0pt % we want these *outside*. \cartinner=\hsize \advance\cartinner by-\lskip \advance\cartinner by-\rskip \cartouter=\hsize \advance\cartouter by 18.4pt % allow for 3pt kerns on either % side, and for 6pt waste from % each corner char, and rule thickness \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip % Flag to tell @lisp, etc., not to narrow margin. \let\nonarrowing = t% \vbox\bgroup \baselineskip=0pt\parskip=0pt\lineskip=0pt \carttop \hbox\bgroup \hskip\lskip \vrule\kern3pt \vbox\bgroup \kern3pt \hsize=\cartinner \baselineskip=\normbskip \lineskip=\normlskip \parskip=\normpskip \vskip -\parskip \comment % For explanation, see the end of \def\group. } \def\Ecartouche{% \ifhmode\par\fi \kern3pt \egroup \kern3pt\vrule \hskip\rskip \egroup \cartbot \egroup \checkinserts } % This macro is called at the beginning of all the @example variants, % inside a group. \newdimen\nonfillparindent \def\nonfillstart{% \aboveenvbreak \hfuzz = 12pt % Don't be fussy \sepspaces % Make spaces be word-separators rather than space tokens. \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output \parskip = 0pt % Turn off paragraph indentation but redefine \indent to emulate % the normal \indent. \nonfillparindent=\parindent \parindent = 0pt \let\indent\nonfillindent % \emergencystretch = 0pt % don't try to avoid overfull boxes \ifx\nonarrowing\relax \advance \leftskip by \lispnarrowing \exdentamount=\lispnarrowing \else \let\nonarrowing = \relax \fi \let\exdent=\nofillexdent } \begingroup \obeyspaces % We want to swallow spaces (but not other tokens) after the fake % @indent in our nonfill-environments, where spaces are normally % active and set to @tie, resulting in them not being ignored after % @indent. \gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}% \gdef\nonfillindentcheck{% \ifx\temp % \expandafter\nonfillindentgobble% \else% \leavevmode\nonfillindentbox% \fi% }% \endgroup \def\nonfillindentgobble#1{\nonfillindent} \def\nonfillindentbox{\hbox to \nonfillparindent{\hss}} % If you want all examples etc. small: @set dispenvsize small. % If you want even small examples the full size: @set dispenvsize nosmall. % This affects the following displayed environments: % @example, @display, @format, @lisp % \def\smallword{small} \def\nosmallword{nosmall} \let\SETdispenvsize\relax \def\setnormaldispenv{% \ifx\SETdispenvsize\smallword % end paragraph for sake of leading, in case document has no blank % line. This is redundant with what happens in \aboveenvbreak, but % we need to do it before changing the fonts, and it's inconvenient % to change the fonts afterward. \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } \def\setsmalldispenv{% \ifx\SETdispenvsize\nosmallword \else \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } % We often define two environments, @foo and @smallfoo. % Let's do it by one command: \def\makedispenv #1#2{ \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2} \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2} \expandafter\let\csname E#1\endcsname \afterenvbreak \expandafter\let\csname Esmall#1\endcsname \afterenvbreak } % Define two synonyms: \def\maketwodispenvs #1#2#3{ \makedispenv{#1}{#3} \makedispenv{#2}{#3} } % @lisp: indented, narrowed, typewriter font; @example: same as @lisp. % % @smallexample and @smalllisp: use smaller fonts. % Originally contributed by Pavel@xerox. % \maketwodispenvs {lisp}{example}{% \nonfillstart \tt\setupmarkupstyle{example}% \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. \gobble % eat return } % @display/@smalldisplay: same as @lisp except keep current font. % \makedispenv {display}{% \nonfillstart \gobble } % @format/@smallformat: same as @display except don't narrow margins. % \makedispenv{format}{% \let\nonarrowing = t% \nonfillstart \gobble } % @flushleft: same as @format, but doesn't obey \SETdispenvsize. \envdef\flushleft{% \let\nonarrowing = t% \nonfillstart \gobble } \let\Eflushleft = \afterenvbreak % @flushright. % \envdef\flushright{% \let\nonarrowing = t% \nonfillstart \advance\leftskip by 0pt plus 1fill \gobble } \let\Eflushright = \afterenvbreak % @raggedright does more-or-less normal line breaking but no right % justification. From plain.tex. \envdef\raggedright{% \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax } \let\Eraggedright\par \envdef\raggedleft{% \parindent=0pt \leftskip0pt plus2em \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt \hbadness=10000 % Last line will usually be underfull, so turn off % badness reporting. } \let\Eraggedleft\par \envdef\raggedcenter{% \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt \hbadness=10000 % Last line will usually be underfull, so turn off % badness reporting. } \let\Eraggedcenter\par % @quotation does normal linebreaking (hence we can't use \nonfillstart) % and narrows the margins. We keep \parskip nonzero in general, since % we're doing normal filling. So, when using \aboveenvbreak and % \afterenvbreak, temporarily make \parskip 0. % \def\quotationstart{% {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip \parindent=0pt % % @cartouche defines \nonarrowing to inhibit narrowing at next level down. \ifx\nonarrowing\relax \advance\leftskip by \lispnarrowing \advance\rightskip by \lispnarrowing \exdentamount = \lispnarrowing \else \let\nonarrowing = \relax \fi \parsearg\quotationlabel } \envdef\quotation{% \setnormaldispenv \quotationstart } \envdef\smallquotation{% \setsmalldispenv \quotationstart } \let\Esmallquotation = \Equotation % We have retained a nonzero parskip for the environment, since we're % doing normal filling. % \def\Equotation{% \par \ifx\quotationauthor\undefined\else % indent a bit. \leftline{\kern 2\leftskip \sl ---\quotationauthor}% \fi {\parskip=0pt \afterenvbreak}% } % If we're given an argument, typeset it in bold with a colon after. \def\quotationlabel#1{% \def\temp{#1}% \ifx\temp\empty \else {\bf #1: }% \fi } % LaTeX-like @verbatim...@end verbatim and @verb{...} % If we want to allow any as delimiter, % we need the curly braces so that makeinfo sees the @verb command, eg: % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org % % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. % % [Knuth] p.344; only we need to do the other characters Texinfo sets % active too. Otherwise, they get lost as the first character on a % verbatim line. \def\dospecials{% \do\ \do\\\do\{\do\}\do\$\do\&% \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% \do\<\do\>\do\|\do\@\do+\do\"% % Don't do the quotes -- if we do, @set txicodequoteundirected and % @set txicodequotebacktick will not have effect on @verb and % @verbatim, and ?` and !` ligatures won't get disabled. %\do\`\do\'% } % % [Knuth] p. 380 \def\uncatcodespecials{% \def\do##1{\catcode`##1=\other}\dospecials} % % Setup for the @verb command. % % Eight spaces for a tab \begingroup \catcode`\^^I=\active \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} \endgroup % \def\setupverb{% \tt % easiest (and conventionally used) font for verbatim \def\par{\leavevmode\endgraf}% \setupmarkupstyle{verb}% \tabeightspaces % Respect line breaks, % print special symbols as themselves, and % make each space count % must do in this order: \obeylines \uncatcodespecials \sepspaces } % Setup for the @verbatim environment % % Real tab expansion \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount % \def\starttabbox{\setbox0=\hbox\bgroup} % \begingroup \catcode`\^^I=\active \gdef\tabexpand{% \catcode`\^^I=\active \def^^I{\leavevmode\egroup \dimen0=\wd0 % the width so far, or since the previous tab \divide\dimen0 by\tabw \multiply\dimen0 by\tabw % compute previous multiple of \tabw \advance\dimen0 by\tabw % advance to next multiple of \tabw \wd0=\dimen0 \box0 \starttabbox }% } \endgroup % start the verbatim environment. \def\setupverbatim{% \let\nonarrowing = t% \nonfillstart % Easiest (and conventionally used) font for verbatim \tt \def\par{\leavevmode\egroup\box0\endgraf}% \tabexpand \setupmarkupstyle{verbatim}% % Respect line breaks, % print special symbols as themselves, and % make each space count % must do in this order: \obeylines \uncatcodespecials \sepspaces \everypar{\starttabbox}% } % Do the @verb magic: verbatim text is quoted by unique % delimiter characters. Before first delimiter expect a % right brace, after last delimiter expect closing brace: % % \def\doverb'{'#1'}'{#1} % % [Knuth] p. 382; only eat outer {} \begingroup \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] \endgroup % \def\verb{\begingroup\setupverb\doverb} % % % Do the @verbatim magic: define the macro \doverbatim so that % the (first) argument ends when '@end verbatim' is reached, ie: % % \def\doverbatim#1@end verbatim{#1} % % For Texinfo it's a lot easier than for LaTeX, % because texinfo's \verbatim doesn't stop at '\end{verbatim}': % we need not redefine '\', '{' and '}'. % % Inspired by LaTeX's verbatim command set [latex.ltx] % \begingroup \catcode`\ =\active \obeylines % % ignore everything up to the first ^^M, that's the newline at the end % of the @verbatim input line itself. Otherwise we get an extra blank % line in the output. \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% % We really want {...\end verbatim} in the body of the macro, but % without the active space; thus we have to use \xdef and \gobble. \endgroup % \envdef\verbatim{% \setupverbatim\doverbatim } \let\Everbatim = \afterenvbreak % @verbatiminclude FILE - insert text of file in verbatim environment. % \def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} % \def\doverbatiminclude#1{% {% \makevalueexpandable \setupverbatim \indexnofonts % Allow `@@' and other weird things in file names. \input #1 \afterenvbreak }% } % @copying ... @end copying. % Save the text away for @insertcopying later. % % We save the uninterpreted tokens, rather than creating a box. % Saving the text in a box would be much easier, but then all the % typesetting commands (@smallbook, font changes, etc.) have to be done % beforehand -- and a) we want @copying to be done first in the source % file; b) letting users define the frontmatter in as flexible order as % possible is very desirable. % \def\copying{\checkenv{}\begingroup\scanargctxt\docopying} \def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} % \def\insertcopying{% \begingroup \parindent = 0pt % paragraph indentation looks wrong on title page \scanexp\copyingtext \endgroup } \message{defuns,} % @defun etc. \newskip\defbodyindent \defbodyindent=.4in \newskip\defargsindent \defargsindent=50pt \newskip\deflastargmargin \deflastargmargin=18pt \newcount\defunpenalty % Start the processing of @deffn: \def\startdefun{% \ifnum\lastpenalty<10000 \medbreak \defunpenalty=10003 % Will keep this @deffn together with the % following @def command, see below. \else % If there are two @def commands in a row, we'll have a \nobreak, % which is there to keep the function description together with its % header. But if there's nothing but headers, we need to allow a % break somewhere. Check specifically for penalty 10002, inserted % by \printdefunline, instead of 10000, since the sectioning % commands also insert a nobreak penalty, and we don't want to allow % a break between a section heading and a defun. % % As a minor refinement, we avoid "club" headers by signalling % with penalty of 10003 after the very first @deffn in the % sequence (see above), and penalty of 10002 after any following % @def command. \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi % % Similarly, after a section heading, do not allow a break. % But do insert the glue. \medskip % preceded by discardable penalty, so not a breakpoint \fi % \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent } \def\dodefunx#1{% % First, check whether we are in the right environment: \checkenv#1% % % As above, allow line break if we have multiple x headers in a row. % It's not a great place, though. \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi % % And now, it's time to reuse the body of the original defun: \expandafter\gobbledefun#1% } \def\gobbledefun#1\startdefun{} % \printdefunline \deffnheader{text} % \def\printdefunline#1#2{% \begingroup % call \deffnheader: #1#2 \endheader % common ending: \interlinepenalty = 10000 \advance\rightskip by 0pt plus 1fil \endgraf \nobreak\vskip -\parskip \penalty\defunpenalty % signal to \startdefun and \dodefunx % Some of the @defun-type tags do not enable magic parentheses, % rendering the following check redundant. But we don't optimize. \checkparencounts \endgroup } \def\Edefun{\endgraf\medbreak} % \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; % the only thing remaining is to define \deffnheader. % \def\makedefun#1{% \expandafter\let\csname E#1\endcsname = \Edefun \edef\temp{\noexpand\domakedefun \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% \temp } % \domakedefun \deffn \deffnx \deffnheader % % Define \deffn and \deffnx, without parameters. % \deffnheader has to be defined explicitly. % \def\domakedefun#1#2#3{% \envdef#1{% \startdefun \parseargusing\activeparens{\printdefunline#3}% }% \def#2{\dodefunx#1}% \def#3% } %%% Untyped functions: % @deffn category name args \makedefun{deffn}{\deffngeneral{}} % @deffn category class name args \makedefun{defop}#1 {\defopon{#1\ \putwordon}} % \defopon {category on}class name args \def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deffngeneral {subind}category name args % \def\deffngeneral#1#2 #3 #4\endheader{% % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. \dosubind{fn}{\code{#3}}{#1}% \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% } %%% Typed functions: % @deftypefn category type name args \makedefun{deftypefn}{\deftypefngeneral{}} % @deftypeop category class type name args \makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}} % \deftypeopon {category on}class type name args \def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deftypefngeneral {subind}category type name args % \def\deftypefngeneral#1#2 #3 #4 #5\endheader{% \dosubind{fn}{\code{#4}}{#1}% \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } %%% Typed variables: % @deftypevr category type var args \makedefun{deftypevr}{\deftypecvgeneral{}} % @deftypecv category class type var args \makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}} % \deftypecvof {category of}class type var args \def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} } % \deftypecvgeneral {subind}category type var args % \def\deftypecvgeneral#1#2 #3 #4 #5\endheader{% \dosubind{vr}{\code{#4}}{#1}% \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } %%% Untyped variables: % @defvr category var args \makedefun{defvr}#1 {\deftypevrheader{#1} {} } % @defcv category class var args \makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} % \defcvof {category of}class var args \def\defcvof#1#2 {\deftypecvof{#1}#2 {} } %%% Type: % @deftp category name args \makedefun{deftp}#1 #2 #3\endheader{% \doind{tp}{\code{#2}}% \defname{#1}{}{#2}\defunargs{#3\unskip}% } % Remaining @defun-like shortcuts: \makedefun{defun}{\deffnheader{\putwordDeffunc} } \makedefun{defmac}{\deffnheader{\putwordDefmac} } \makedefun{defspec}{\deffnheader{\putwordDefspec} } \makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} } \makedefun{defvar}{\defvrheader{\putwordDefvar} } \makedefun{defopt}{\defvrheader{\putwordDefopt} } \makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} } \makedefun{defmethod}{\defopon\putwordMethodon} \makedefun{deftypemethod}{\deftypeopon\putwordMethodon} \makedefun{defivar}{\defcvof\putwordInstanceVariableof} \makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof} % \defname, which formats the name of the @def (not the args). % #1 is the category, such as "Function". % #2 is the return type, if any. % #3 is the function name. % % We are followed by (but not passed) the arguments, if any. % \def\defname#1#2#3{% % Get the values of \leftskip and \rightskip as they were outside the @def... \advance\leftskip by -\defbodyindent % % How we'll format the type name. Putting it in brackets helps % distinguish it from the body text that may end up on the next line % just below it. \def\temp{#1}% \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} % % Figure out line sizes for the paragraph shape. % The first line needs space for \box0; but if \rightskip is nonzero, % we need only space for the part of \box0 which exceeds it: \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip % The continuations: \dimen2=\hsize \advance\dimen2 by -\defargsindent % (plain.tex says that \dimen1 should be used only as global.) \parshape 2 0in \dimen0 \defargsindent \dimen2 % % Put the type name to the right margin. \noindent \hbox to 0pt{% \hfil\box0 \kern-\hsize % \hsize has to be shortened this way: \kern\leftskip % Intentionally do not respect \rightskip, since we need the space. }% % % Allow all lines to be underfull without complaint: \tolerance=10000 \hbadness=10000 \exdentamount=\defbodyindent {% % defun fonts. We use typewriter by default (used to be bold) because: % . we're printing identifiers, they should be in tt in principle. % . in languages with many accents, such as Czech or French, it's % common to leave accents off identifiers. The result looks ok in % tt, but exceedingly strange in rm. % . we don't want -- and --- to be treated as ligatures. % . this still does not fix the ?` and !` ligatures, but so far no % one has made identifiers using them :). \df \tt \def\temp{#2}% return value type \ifx\temp\empty\else \tclose{\temp} \fi #3% output function name }% {\rm\enskip}% hskip 0.5 em of \tenrm % \boldbrax % arguments will be output next, if any. } % Print arguments in slanted roman (not ttsl), inconsistently with using % tt for the name. This is because literal text is sometimes needed in % the argument list (groff manual), and ttsl and tt are not very % distinguishable. Prevent hyphenation at `-' chars. % \def\defunargs#1{% % use sl by default (not ttsl), % tt for the names. \df \sl \hyphenchar\font=0 % % On the other hand, if an argument has two dashes (for instance), we % want a way to get ttsl. Let's try @var for that. \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% #1% \sl\hyphenchar\font=45 } % We want ()&[] to print specially on the defun line. % \def\activeparens{% \catcode`\(=\active \catcode`\)=\active \catcode`\[=\active \catcode`\]=\active \catcode`\&=\active } % Make control sequences which act like normal parenthesis chars. \let\lparen = ( \let\rparen = ) % Be sure that we always have a definition for `(', etc. For example, % if the fn name has parens in it, \boldbrax will not be in effect yet, % so TeX would otherwise complain about undefined control sequence. { \activeparens \global\let(=\lparen \global\let)=\rparen \global\let[=\lbrack \global\let]=\rbrack \global\let& = \& \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} \gdef\magicamp{\let&=\amprm} } \newcount\parencount % If we encounter &foo, then turn on ()-hacking afterwards \newif\ifampseen \def\amprm#1 {\ampseentrue{\bf\ }} \def\parenfont{% \ifampseen % At the first level, print parens in roman, % otherwise use the default font. \ifnum \parencount=1 \rm \fi \else % The \sf parens (in \boldbrax) actually are a little bolder than % the contained text. This is especially needed for [ and ] . \sf \fi } \def\infirstlevel#1{% \ifampseen \ifnum\parencount=1 #1% \fi \fi } \def\bfafterword#1 {#1 \bf} \def\opnr{% \global\advance\parencount by 1 {\parenfont(}% \infirstlevel \bfafterword } \def\clnr{% {\parenfont)}% \infirstlevel \sl \global\advance\parencount by -1 } \newcount\brackcount \def\lbrb{% \global\advance\brackcount by 1 {\bf[}% } \def\rbrb{% {\bf]}% \global\advance\brackcount by -1 } \def\checkparencounts{% \ifnum\parencount=0 \else \badparencount \fi \ifnum\brackcount=0 \else \badbrackcount \fi } % these should not use \errmessage; the glibc manual, at least, actually % has such constructs (when documenting function pointers). \def\badparencount{% \message{Warning: unbalanced parentheses in @def...}% \global\parencount=0 } \def\badbrackcount{% \message{Warning: unbalanced square brackets in @def...}% \global\brackcount=0 } \message{macros,} % @macro. % To do this right we need a feature of e-TeX, \scantokens, % which we arrange to emulate with a temporary file in ordinary TeX. \ifx\eTeXversion\undefined \newwrite\macscribble \def\scantokens#1{% \toks0={#1}% \immediate\openout\macscribble=\jobname.tmp \immediate\write\macscribble{\the\toks0}% \immediate\closeout\macscribble \input \jobname.tmp } \fi \def\scanmacro#1{% \begingroup \newlinechar`\^^M \let\xeatspaces\eatspaces % Undo catcode changes of \startcontents and \doprintindex % When called from @insertcopying or (short)caption, we need active % backslash to get it printed correctly. Previously, we had % \catcode`\\=\other instead. We'll see whether a problem appears % with macro expansion. --kasal, 19aug04 \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ % ... and \example \spaceisspace % % Append \endinput to make sure that TeX does not see the ending newline. % I've verified that it is necessary both for e-TeX and for ordinary TeX % --kasal, 29nov03 \scantokens{#1\endinput}% \endgroup } \def\scanexp#1{% \edef\temp{\noexpand\scanmacro{#1}}% \temp } \newcount\paramno % Count of parameters \newtoks\macname % Macro name \newif\ifrecursive % Is it recursive? % List of all defined macros in the form % \definedummyword\macro1\definedummyword\macro2... % Currently is also contains all @aliases; the list can be split % if there is a need. \def\macrolist{} % Add the macro to \macrolist \def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} \def\addtomacrolistxxx#1{% \toks0 = \expandafter{\macrolist\definedummyword#1}% \xdef\macrolist{\the\toks0}% } % Utility routines. % This does \let #1 = #2, with \csnames; that is, % \let \csname#1\endcsname = \csname#2\endcsname % (except of course we have to play expansion games). % \def\cslet#1#2{% \expandafter\let \csname#1\expandafter\endcsname \csname#2\endcsname } % Trim leading and trailing spaces off a string. % Concepts from aro-bend problem 15 (see CTAN). {\catcode`\@=11 \gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} \gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} \gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} \def\unbrace#1{#1} \unbrace{\gdef\trim@@@ #1 } #2@{#1} } % Trim a single trailing ^^M off a string. {\catcode`\^^M=\other \catcode`\Q=3% \gdef\eatcr #1{\eatcra #1Q^^MQ}% \gdef\eatcra#1^^MQ{\eatcrb#1Q}% \gdef\eatcrb#1Q#2Q{#1}% } % Macro bodies are absorbed as an argument in a context where % all characters are catcode 10, 11 or 12, except \ which is active % (as in normal texinfo). It is necessary to change the definition of \. % Non-ASCII encodings make 8-bit characters active, so un-activate % them to avoid their expansion. Must do this non-globally, to % confine the change to the current group. % It's necessary to have hard CRs when the macro is executed. This is % done by making ^^M (\endlinechar) catcode 12 when reading the macro % body, and then making it the \newlinechar in \scanmacro. \def\scanctxt{% \catcode`\"=\other \catcode`\+=\other \catcode`\<=\other \catcode`\>=\other \catcode`\@=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\~=\other \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi } \def\scanargctxt{% \scanctxt \catcode`\\=\other \catcode`\^^M=\other } \def\macrobodyctxt{% \scanctxt \catcode`\{=\other \catcode`\}=\other \catcode`\^^M=\other \usembodybackslash } \def\macroargctxt{% \scanctxt \catcode`\\=\other } % \mbodybackslash is the definition of \ in @macro bodies. % It maps \foo\ => \csname macarg.foo\endcsname => #N % where N is the macro parameter number. % We define \csname macarg.\endcsname to be \realbackslash, so % \\ in macro replacement text gets you a backslash. {\catcode`@=0 @catcode`@\=@active @gdef@usembodybackslash{@let\=@mbodybackslash} @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} } \expandafter\def\csname macarg.\endcsname{\realbackslash} \def\macro{\recursivefalse\parsearg\macroxxx} \def\rmacro{\recursivetrue\parsearg\macroxxx} \def\macroxxx#1{% \getargs{#1}% now \macname is the macname and \argl the arglist \ifx\argl\empty % no arguments \paramno=0% \else \expandafter\parsemargdef \argl;% \fi \if1\csname ismacro.\the\macname\endcsname \message{Warning: redefining \the\macname}% \else \expandafter\ifx\csname \the\macname\endcsname \relax \else \errmessage{Macro name \the\macname\space already defined}\fi \global\cslet{macsave.\the\macname}{\the\macname}% \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% \addtomacrolist{\the\macname}% \fi \begingroup \macrobodyctxt \ifrecursive \expandafter\parsermacbody \else \expandafter\parsemacbody \fi} \parseargdef\unmacro{% \if1\csname ismacro.#1\endcsname \global\cslet{#1}{macsave.#1}% \global\expandafter\let \csname ismacro.#1\endcsname=0% % Remove the macro name from \macrolist: \begingroup \expandafter\let\csname#1\endcsname \relax \let\definedummyword\unmacrodo \xdef\macrolist{\macrolist}% \endgroup \else \errmessage{Macro #1 not defined}% \fi } % Called by \do from \dounmacro on each macro. The idea is to omit any % macro definitions that have been changed to \relax. % \def\unmacrodo#1{% \ifx #1\relax % remove this \else \noexpand\definedummyword \noexpand#1% \fi } % This makes use of the obscure feature that if the last token of a % is #, then the preceding argument is delimited by % an opening brace, and that opening brace is not consumed. \def\getargs#1{\getargsxxx#1{}} \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} \def\getmacname #1 #2\relax{\macname={#1}} \def\getmacargs#1{\def\argl{#1}} % Parse the optional {params} list. Set up \paramno and \paramlist % so \defmacro knows what to do. Define \macarg.blah for each blah % in the params list, to be ##N where N is the position in that list. % That gets used by \mbodybackslash (above). % We need to get `macro parameter char #' into several definitions. % The technique used is stolen from LaTeX: let \hash be something % unexpandable, insert that wherever you need a #, and then redefine % it to # just before using the token list produced. % % The same technique is used to protect \eatspaces till just before % the macro is used. \def\parsemargdef#1;{\paramno=0\def\paramlist{}% \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,} \def\parsemargdefxxx#1,{% \if#1;\let\next=\relax \else \let\next=\parsemargdefxxx \advance\paramno by 1% \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname {\xeatspaces{\hash\the\paramno}}% \edef\paramlist{\paramlist\hash\the\paramno,}% \fi\next} % These two commands read recursive and nonrecursive macro bodies. % (They're different since rec and nonrec macros end differently.) \long\def\parsemacbody#1@end macro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% \long\def\parsermacbody#1@end rmacro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% % This defines the macro itself. There are six cases: recursive and % nonrecursive macros of zero, one, and many arguments. % Much magic with \expandafter here. % \xdef is used so that macro definitions will survive the file % they're defined in; @include reads the file inside a group. \def\defmacro{% \let\hash=##% convert placeholders to macro parameter chars \ifrecursive \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\scanmacro{\temp}}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup\noexpand\scanmacro{\temp}}% \else % many \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{\egroup\noexpand\scanmacro{\temp}}% \fi \else \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \else % many \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \expandafter\noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \fi \fi} \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} % \braceorline decides whether the next nonwhitespace character is a % {. If so it reads up to the closing }, if not, it reads the whole % line. Whatever was read is then fed to the next control sequence % as an argument (by \parsebrace or \parsearg) \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup\else \expandafter\parsearg \fi \macnamexxx} % @alias. % We need some trickery to remove the optional spaces around the equal % sign. Just make them active and then expand them all to nothing. \def\alias{\parseargusing\obeyspaces\aliasxxx} \def\aliasxxx #1{\aliasyyy#1\relax} \def\aliasyyy #1=#2\relax{% {% \expandafter\let\obeyedspace=\empty \addtomacrolist{#1}% \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% }% \next } \message{cross references,} \newwrite\auxfile \newif\ifhavexrefs % True if xref values are known. \newif\ifwarnedxrefs % True if we warned once that they aren't known. % @inforef is relatively simple. \def\inforef #1{\inforefzzz #1,,,,**} \def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, node \samp{\ignorespaces#1{}}} % @node's only job in TeX is to define \lastnode, which is used in % cross-references. The @node line might or might not have commas, and % might or might not have spaces before the first comma, like: % @node foo , bar , ... % We don't want such trailing spaces in the node name. % \parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} % % also remove a trailing comma, in case of something like this: % @node Help-Cross, , , Cross-refs \def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} \def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} \let\nwnode=\node \let\lastnode=\empty % Write a cross-reference definition for the current node. #1 is the % type (Ynumbered, Yappendix, Ynothing). % \def\donoderef#1{% \ifx\lastnode\empty\else \setref{\lastnode}{#1}% \global\let\lastnode=\empty \fi } % @anchor{NAME} -- define xref target at arbitrary point. % \newcount\savesfregister % \def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} \def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} \def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an % anchor), which consists of three parts: % 1) NAME-title - the current sectioning name taken from \lastsection, % or the anchor name. % 2) NAME-snt - section number and type, passed as the SNT arg, or % empty for anchors. % 3) NAME-pg - the page number. % % This is called from \donoderef, \anchor, and \dofloat. In the case of % floats, there is an additional part, which is not written here: % 4) NAME-lof - the text as it should appear in a @listoffloats. % \def\setref#1#2{% \pdfmkdest{#1}% \iflinks {% \atdummies % preserve commands, but don't expand them \edef\writexrdef##1##2{% \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef ##1}{##2}}% these are parameters of \writexrdef }% \toks0 = \expandafter{\lastsection}% \immediate \writexrdef{title}{\the\toks0 }% \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during \shipout }% \fi } % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is % the node name, #2 the name of the Info cross-reference, #3 the printed % node name, #4 the name of the Info file, #5 the name of the printed % manual. All but the node name can be omitted. % \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} \def\ref#1{\xrefX[#1,,,,,,,]} \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup \unsepspaces \def\printedmanual{\ignorespaces #5}% \def\printedrefname{\ignorespaces #3}% \setbox1=\hbox{\printedmanual\unskip}% \setbox0=\hbox{\printedrefname\unskip}% \ifdim \wd0 = 0pt % No printed node name was explicitly given. \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax % Use the node name inside the square brackets. \def\printedrefname{\ignorespaces #1}% \else % Use the actual chapter/section title appear inside % the square brackets. Use the real section title if we have it. \ifdim \wd1 > 0pt % It is in another manual, so we don't have it. \def\printedrefname{\ignorespaces #1}% \else \ifhavexrefs % We know the real title if we have the xref values. \def\printedrefname{\refx{#1-title}{}}% \else % Otherwise just copy the Info node name. \def\printedrefname{\ignorespaces #1}% \fi% \fi \fi \fi % % Make link in pdf output. \ifpdf {\indexnofonts \turnoffactive % This expands tokens, so do it after making catcode changes, so _ % etc. don't get their TeX definitions. \getfilename{#4}% % % See comments at \activebackslashdouble. {\activebackslashdouble \xdef\pdfxrefdest{#1}% \backslashparens\pdfxrefdest}% % \leavevmode \startlink attr{/Border [0 0 0]}% \ifnum\filenamelength>0 goto file{\the\filename.pdf} name{\pdfxrefdest}% \else goto name{\pdfmkpgn{\pdfxrefdest}}% \fi }% \setcolor{\linkcolor}% \fi % % Float references are printed completely differently: "Figure 1.2" % instead of "[somenode], p.3". We distinguish them by the % LABEL-title being set to a magic string. {% % Have to otherify everything special to allow the \csname to % include an _ in the xref name, etc. \indexnofonts \turnoffactive \expandafter\global\expandafter\let\expandafter\Xthisreftitle \csname XR#1-title\endcsname }% \iffloat\Xthisreftitle % If the user specified the print name (third arg) to the ref, % print it instead of our usual "Figure 1.2". \ifdim\wd0 = 0pt \refx{#1-snt}{}% \else \printedrefname \fi % % if the user also gave the printed manual name (fifth arg), append % "in MANUALNAME". \ifdim \wd1 > 0pt \space \putwordin{} \cite{\printedmanual}% \fi \else % node/anchor (non-float) references. % % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not % insert empty discretionaries after hyphens, which means that it will % not find a line break at a hyphen in a node names. Since some manuals % are best written with fairly long node names, containing hyphens, this % is a loss. Therefore, we give the text of the node name again, so it % is as if TeX is seeing it for the first time. \ifdim \wd1 > 0pt \putwordSection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}% \else % _ (for example) has to be the character _ for the purposes of the % control sequence corresponding to the node, but it has to expand % into the usual \leavevmode...\vrule stuff for purposes of % printing. So we \turnoffactive for the \refx-snt, back on for the % printing, back off for the \refx-pg. {\turnoffactive % Only output a following space if the -snt ref is nonempty; for % @unnumbered and @anchor, it won't be. \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi }% % output the `[mynode]' via a macro so it can be overridden. \xrefprintnodename\printedrefname % % But we always want a comma and a space: ,\space % % output the `page 3'. \turnoffactive \putwordpage\tie\refx{#1-pg}{}% \fi \fi \endlink \endgroup} % This macro is called from \xrefX for the `[nodename]' part of xref % output. It's a separate macro only so it can be changed more easily, % since square brackets don't work well in some documents. Particularly % one that Bob is working on :). % \def\xrefprintnodename#1{[#1]} % Things referred to by \setref. % \def\Ynothing{} \def\Yomitfromtoc{} \def\Ynumbered{% \ifnum\secno=0 \putwordChapter@tie \the\chapno \else \ifnum\subsecno=0 \putwordSection@tie \the\chapno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie \the\chapno.\the\secno.\the\subsecno \else \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } \def\Yappendix{% \ifnum\secno=0 \putwordAppendix@tie @char\the\appendixno{}% \else \ifnum\subsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno \else \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. % If its value is nonempty, SUFFIX is output afterward. % \def\refx#1#2{% {% \indexnofonts \otherbackslash \expandafter\global\expandafter\let\expandafter\thisrefX \csname XR#1\endcsname }% \ifx\thisrefX\relax % If not defined, say something at least. \angleleft un\-de\-fined\angleright \iflinks \ifhavexrefs \message{\linenumber Undefined cross reference `#1'.}% \else \ifwarnedxrefs\else \global\warnedxrefstrue \message{Cross reference values unknown; you must run TeX again.}% \fi \fi \fi \else % It's defined, so just use it. \thisrefX \fi #2% Output the suffix in any case. } % This is the macro invoked by entries in the aux file. Usually it's % just a \def (we prepend XR to the control sequence name to avoid % collisions). But if this is a float type, we have more work to do. % \def\xrdef#1#2{% {% The node name might contain 8-bit characters, which in our current % implementation are changed to commands like @'e. Don't let these % mess up the control sequence name. \indexnofonts \turnoffactive \xdef\safexrefname{#1}% }% % \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref % % Was that xref control sequence that we just defined for a float? \expandafter\iffloat\csname XR\safexrefname\endcsname % it was a float, and we have the (safe) float type in \iffloattype. \expandafter\let\expandafter\floatlist \csname floatlist\iffloattype\endcsname % % Is this the first time we've seen this float type? \expandafter\ifx\floatlist\relax \toks0 = {\do}% yes, so just \do \else % had it before, so preserve previous elements in list. \toks0 = \expandafter{\floatlist\do}% \fi % % Remember this xref in the control sequence \floatlistFLOATTYPE, % for later use in \listoffloats. \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 {\safexrefname}}% \fi } % Read the last existing aux file, if any. No error if none exists. % \def\tryauxfile{% \openin 1 \jobname.aux \ifeof 1 \else \readdatafile{aux}% \global\havexrefstrue \fi \closein 1 } \def\setupdatafile{% \catcode`\^^@=\other \catcode`\^^A=\other \catcode`\^^B=\other \catcode`\^^C=\other \catcode`\^^D=\other \catcode`\^^E=\other \catcode`\^^F=\other \catcode`\^^G=\other \catcode`\^^H=\other \catcode`\^^K=\other \catcode`\^^L=\other \catcode`\^^N=\other \catcode`\^^P=\other \catcode`\^^Q=\other \catcode`\^^R=\other \catcode`\^^S=\other \catcode`\^^T=\other \catcode`\^^U=\other \catcode`\^^V=\other \catcode`\^^W=\other \catcode`\^^X=\other \catcode`\^^Z=\other \catcode`\^^[=\other \catcode`\^^\=\other \catcode`\^^]=\other \catcode`\^^^=\other \catcode`\^^_=\other % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. % in xref tags, i.e., node names. But since ^^e4 notation isn't % supported in the main text, it doesn't seem desirable. Furthermore, % that is not enough: for node names that actually contain a ^ % character, we would end up writing a line like this: 'xrdef {'hat % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first % argument, and \hat is not an expandable control sequence. It could % all be worked out, but why? Either we support ^^ or we don't. % % The other change necessary for this was to define \auxhat: % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter % and then to call \auxhat in \setq. % \catcode`\^=\other % % Special characters. Should be turned off anyway, but... \catcode`\~=\other \catcode`\[=\other \catcode`\]=\other \catcode`\"=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\$=\other \catcode`\#=\other \catcode`\&=\other \catcode`\%=\other \catcode`+=\other % avoid \+ for paranoia even though we've turned it off % % This is to support \ in node names and titles, since the \ % characters end up in a \csname. It's easier than % leaving it active and making its active definition an actual \ % character. What I don't understand is why it works in the *value* % of the xrdef. Seems like it should be a catcode12 \, and that % should not typeset properly. But it works, so I'm moving on for % now. --karl, 15jan04. \catcode`\\=\other % % Make the characters 128-255 be printing characters. {% \count1=128 \def\loop{% \catcode\count1=\other \advance\count1 by 1 \ifnum \count1<256 \loop \fi }% }% % % @ is our escape character in .aux files, and we need braces. \catcode`\{=1 \catcode`\}=2 \catcode`\@=0 } \def\readdatafile#1{% \begingroup \setupdatafile \input\jobname.#1 \endgroup} \message{insertions,} % including footnotes. \newcount \footnoteno % The trailing space in the following definition for supereject is % vital for proper filling; pages come out unaligned when you do a % pagealignmacro call if that space before the closing brace is % removed. (Generally, numeric constants should always be followed by a % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } % @footnotestyle is meaningful for info output only. \let\footnotestyle=\comment {\catcode `\@=11 % % Auto-number footnotes. Otherwise like plain. \gdef\footnote{% \let\indent=\ptexindent \let\noindent=\ptexnoindent \global\advance\footnoteno by \@ne \edef\thisfootno{$^{\the\footnoteno}$}% % % In case the footnote comes at the end of a sentence, preserve the % extra spacing after we do the footnote number. \let\@sf\empty \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi % % Remove inadvertent blank space before typesetting the footnote number. \unskip \thisfootno\@sf \dofootnote }% % Don't bother with the trickery in plain.tex to not require the % footnote text as a parameter. Our footnotes don't need to be so general. % % Oh yes, they do; otherwise, @ifset (and anything else that uses % \parseargline) fails inside footnotes because the tokens are fixed when % the footnote is read. --karl, 16nov96. % \gdef\dofootnote{% \insert\footins\bgroup % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. % So reset some parameters. \hsize=\pagewidth \interlinepenalty\interfootnotelinepenalty \splittopskip\ht\strutbox % top baseline for broken footnotes \splitmaxdepth\dp\strutbox \floatingpenalty\@MM \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip \parindent\defaultparindent % \smallfonts \rm % % Because we use hanging indentation in footnotes, a @noindent appears % to exdent this text, so make it be a no-op. makeinfo does not use % hanging indentation so @noindent can still be needed within footnote % text after an @example or the like (not that this is good style). \let\noindent = \relax % % Hang the footnote text off the number. Use \everypar in case the % footnote extends for more than one paragraph. \everypar = {\hang}% \textindent{\thisfootno}% % % Don't crash into the line above the footnote text. Since this % expands into a box, it must come within the paragraph, lest it % provide a place where TeX can split the footnote. \footstrut \futurelet\next\fo@t } }%end \catcode `\@=11 % In case a @footnote appears in a vbox, save the footnote text and create % the real \insert just after the vbox finished. Otherwise, the insertion % would be lost. % Similarly, if a @footnote appears inside an alignment, save the footnote % text to a box and make the \insert when a row of the table is finished. % And the same can be done for other insert classes. --kasal, 16nov03. % Replace the \insert primitive by a cheating macro. % Deeper inside, just make sure that the saved insertions are not spilled % out prematurely. % \def\startsavinginserts{% \ifx \insert\ptexinsert \let\insert\saveinsert \else \let\checkinserts\relax \fi } % This \insert replacement works for both \insert\footins{foo} and % \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}. % \def\saveinsert#1{% \edef\next{\noexpand\savetobox \makeSAVEname#1}% \afterassignment\next % swallow the left brace \let\temp = } \def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}} \def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1} \def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi} \def\placesaveins#1{% \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname {\box#1}% } % eat @SAVE -- beware, all of them have catcode \other: { \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-) \gdef\gobblesave @SAVE{} } % initialization: \def\newsaveins #1{% \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}% \next } \def\newsaveinsX #1{% \csname newbox\endcsname #1% \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts \checksaveins #1}% } % initialize: \let\checkinserts\empty \newsaveins\footins \newsaveins\margin % @image. We use the macros from epsf.tex to support this. % If epsf.tex is not installed and @image is used, we complain. % % Check for and read epsf.tex up front. If we read it only at @image % time, we might be inside a group, and then its definitions would get % undone and the next image would fail. \openin 1 = epsf.tex \ifeof 1 \else % Do not bother showing banner with epsf.tex v2.7k (available in % doc/epsf.tex and on ctan). \def\epsfannounce{\toks0 = }% \input epsf.tex \fi \closein 1 % % We will only complain once about lack of epsf.tex. \newif\ifwarnednoepsf \newhelp\noepsfhelp{epsf.tex must be installed for images to work. It is also included in the Texinfo distribution, or you can get it from ftp://tug.org/tex/epsf.tex.} % \def\image#1{% \ifx\epsfbox\undefined \ifwarnednoepsf \else \errhelp = \noepsfhelp \errmessage{epsf.tex not found, images will be ignored}% \global\warnednoepsftrue \fi \else \imagexxx #1,,,,,\finish \fi } % % Arguments to @image: % #1 is (mandatory) image filename; we tack on .eps extension. % #2 is (optional) width, #3 is (optional) height. % #4 is (ignored optional) html alt text. % #5 is (ignored optional) extension. % #6 is just the usual extra ignored arg for parsing this stuff. \newif\ifimagevmode \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup \catcode`\^^M = 5 % in case we're inside an example \normalturnoffactive % allow _ et al. in names % If the image is by itself, center it. \ifvmode \imagevmodetrue \nobreak\medskip % Usually we'll have text after the image which will insert % \parskip glue, so insert it here too to equalize the space % above and below. \nobreak\vskip\parskip \nobreak \fi % % Leave vertical mode so that indentation from an enclosing % environment such as @quotation is respected. On the other hand, if % it's at the top level, we don't want the normal paragraph indentation. \noindent % % Output the image. \ifpdf \dopdfimage{#1}{#2}{#3}% \else % \epsfbox itself resets \epsf?size at each figure. \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi \epsfbox{#1.eps}% \fi % \ifimagevmode \medskip \fi % space after the standalone image \endgroup} % @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, % etc. We don't actually implement floating yet, we always include the % float "here". But it seemed the best name for the future. % \envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} % There may be a space before second and/or third parameter; delete it. \def\eatcommaspace#1, {#1,} % #1 is the optional FLOATTYPE, the text label for this float, typically % "Figure", "Table", "Example", etc. Can't contain commas. If omitted, % this float will not be numbered and cannot be referred to. % % #2 is the optional xref label. Also must be present for the float to % be referable. % % #3 is the optional positioning argument; for now, it is ignored. It % will somehow specify the positions allowed to float to (here, top, bottom). % % We keep a separate counter for each FLOATTYPE, which we reset at each % chapter-level command. \let\resetallfloatnos=\empty % \def\dofloat#1,#2,#3,#4\finish{% \let\thiscaption=\empty \let\thisshortcaption=\empty % % don't lose footnotes inside @float. % % BEWARE: when the floats start float, we have to issue warning whenever an % insert appears inside a float which could possibly float. --kasal, 26may04 % \startsavinginserts % % We can't be used inside a paragraph. \par % \vtop\bgroup \def\floattype{#1}% \def\floatlabel{#2}% \def\floatloc{#3}% we do nothing with this yet. % \ifx\floattype\empty \let\safefloattype=\empty \else {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% \fi % % If label is given but no type, we handle that as the empty type. \ifx\floatlabel\empty \else % We want each FLOATTYPE to be numbered separately (Figure 1, % Table 1, Figure 2, ...). (And if no label, no number.) % \expandafter\getfloatno\csname\safefloattype floatno\endcsname \global\advance\floatno by 1 % {% % This magic value for \lastsection is output by \setref as the % XREFLABEL-title value. \xrefX uses it to distinguish float % labels (which have a completely different output format) from % node and anchor labels. And \xrdef uses it to construct the % lists of floats. % \edef\lastsection{\floatmagic=\safefloattype}% \setref{\floatlabel}{Yfloat}% }% \fi % % start with \parskip glue, I guess. \vskip\parskip % % Don't suppress indentation if a float happens to start a section. \restorefirstparagraphindent } % we have these possibilities: % @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap % @float Foo,lbl & no caption: Foo 1.1 % @float Foo & @caption{Cap}: Foo: Cap % @float Foo & no caption: Foo % @float ,lbl & Caption{Cap}: 1.1: Cap % @float ,lbl & no caption: 1.1 % @float & @caption{Cap}: Cap % @float & no caption: % \def\Efloat{% \let\floatident = \empty % % In all cases, if we have a float type, it comes first. \ifx\floattype\empty \else \def\floatident{\floattype}\fi % % If we have an xref label, the number comes next. \ifx\floatlabel\empty \else \ifx\floattype\empty \else % if also had float type, need tie first. \appendtomacro\floatident{\tie}% \fi % the number. \appendtomacro\floatident{\chaplevelprefix\the\floatno}% \fi % % Start the printed caption with what we've constructed in % \floatident, but keep it separate; we need \floatident again. \let\captionline = \floatident % \ifx\thiscaption\empty \else \ifx\floatident\empty \else \appendtomacro\captionline{: }% had ident, so need a colon between \fi % % caption text. \appendtomacro\captionline{\scanexp\thiscaption}% \fi % % If we have anything to print, print it, with space before. % Eventually this needs to become an \insert. \ifx\captionline\empty \else \vskip.5\parskip \captionline % % Space below caption. \vskip\parskip \fi % % If have an xref label, write the list of floats info. Do this % after the caption, to avoid chance of it being a breakpoint. \ifx\floatlabel\empty \else % Write the text that goes in the lof to the aux file as % \floatlabel-lof. Besides \floatident, we include the short % caption if specified, else the full caption if specified, else nothing. {% \atdummies % % since we read the caption text in the macro world, where ^^M % is turned into a normal character, we have to scan it back, so % we don't write the literal three characters "^^M" into the aux file. \scanexp{% \xdef\noexpand\gtemp{% \ifx\thisshortcaption\empty \thiscaption \else \thisshortcaption \fi }% }% \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident \ifx\gtemp\empty \else : \gtemp \fi}}% }% \fi \egroup % end of \vtop % % place the captured inserts % % BEWARE: when the floats start floating, we have to issue warning % whenever an insert appears inside a float which could possibly % float. --kasal, 26may04 % \checkinserts } % Append the tokens #2 to the definition of macro #1, not expanding either. % \def\appendtomacro#1#2{% \expandafter\def\expandafter#1\expandafter{#1#2}% } % @caption, @shortcaption % \def\caption{\docaption\thiscaption} \def\shortcaption{\docaption\thisshortcaption} \def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} \def\defcaption#1#2{\egroup \def#1{#2}} % The parameter is the control sequence identifying the counter we are % going to use. Create it if it doesn't exist and assign it to \floatno. \def\getfloatno#1{% \ifx#1\relax % Haven't seen this figure type before. \csname newcount\endcsname #1% % % Remember to reset this floatno at the next chap. \expandafter\gdef\expandafter\resetallfloatnos \expandafter{\resetallfloatnos #1=0 }% \fi \let\floatno#1% } % \setref calls this to get the XREFLABEL-snt value. We want an @xref % to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we % first read the @float command. % \def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% % Magic string used for the XREFLABEL-title value, so \xrefX can % distinguish floats from other xref types. \def\floatmagic{!!float!!} % #1 is the control sequence we are passed; we expand into a conditional % which is true if #1 represents a float ref. That is, the magic % \lastsection value which we \setref above. % \def\iffloat#1{\expandafter\doiffloat#1==\finish} % % #1 is (maybe) the \floatmagic string. If so, #2 will be the % (safe) float type for this float. We set \iffloattype to #2. % \def\doiffloat#1=#2=#3\finish{% \def\temp{#1}% \def\iffloattype{#2}% \ifx\temp\floatmagic } % @listoffloats FLOATTYPE - print a list of floats like a table of contents. % \parseargdef\listoffloats{% \def\floattype{#1}% floattype {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% % % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE. \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax \ifhavexrefs % if the user said @listoffloats foo but never @float foo. \message{\linenumber No `\safefloattype' floats to list.}% \fi \else \begingroup \leftskip=\tocindent % indent these entries like a toc \let\do=\listoffloatsdo \csname floatlist\safefloattype\endcsname \endgroup \fi } % This is called on each entry in a list of floats. We're passed the % xref label, in the form LABEL-title, which is how we save it in the % aux file. We strip off the -title and look up \XRLABEL-lof, which % has the text we're supposed to typeset here. % % Figures without xref labels will not be included in the list (since % they won't appear in the aux file). % \def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} \def\listoffloatsdoentry#1-title\finish{{% % Can't fully expand XR#1-lof because it can contain anything. Just % pass the control sequence. On the other hand, XR#1-pg is just the % page number, and we want to fully expand that so we can get a link % in pdf output. \toksA = \expandafter{\csname XR#1-lof\endcsname}% % % use the same \entry macro we use to generate the TOC and index. \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}% \writeentry }} \message{localization,} % For single-language documents, @documentlanguage is usually given very % early, just after @documentencoding. Single argument is the language % (de) or locale (de_DE) abbreviation. % { \catcode`\_ = \active \globaldefs=1 \parseargdef\documentlanguage{\begingroup \let_=\normalunderscore % normal _ character for filenames \tex % read txi-??.tex file in plain TeX. % Read the file by the name they passed if it exists. \openin 1 txi-#1.tex \ifeof 1 \documentlanguagetrywithoutunderscore{#1_\finish}% \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 \endgroup % end raw TeX \endgroup} % % If they passed de_DE, and txi-de_DE.tex doesn't exist, % try txi-de.tex. % \gdef\documentlanguagetrywithoutunderscore#1_#2\finish{% \openin 1 txi-#1.tex \ifeof 1 \errhelp = \nolanghelp \errmessage{Cannot read language file txi-#1.tex}% \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 } }% end of special _ catcode % \newhelp\nolanghelp{The given language definition file cannot be found or is empty. Maybe you need to install it? Putting it in the current directory should work if nowhere else does.} % This macro is called from txi-??.tex files; the first argument is the % \language name to set (without the "\lang@" prefix), the second and % third args are \{left,right}hyphenmin. % % The language names to pass are determined when the format is built. % See the etex.log file created at that time, e.g., % /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log. % % With TeX Live 2008, etex now includes hyphenation patterns for all % available languages. This means we can support hyphenation in % Texinfo, at least to some extent. (This still doesn't solve the % accented characters problem.) % \catcode`@=11 \def\txisetlanguage#1#2#3{% % do not set the language if the name is undefined in the current TeX. \expandafter\ifx\csname lang@#1\endcsname \relax \message{no patterns for #1}% \else \global\language = \csname lang@#1\endcsname \fi % but there is no harm in adjusting the hyphenmin values regardless. \global\lefthyphenmin = #2\relax \global\righthyphenmin = #3\relax } % Helpers for encodings. % Set the catcode of characters 128 through 255 to the specified number. % \def\setnonasciicharscatcode#1{% \count255=128 \loop\ifnum\count255<256 \global\catcode\count255=#1\relax \advance\count255 by 1 \repeat } \def\setnonasciicharscatcodenonglobal#1{% \count255=128 \loop\ifnum\count255<256 \catcode\count255=#1\relax \advance\count255 by 1 \repeat } % @documentencoding sets the definition of non-ASCII characters % according to the specified encoding. % \parseargdef\documentencoding{% % Encoding being declared for the document. \def\declaredencoding{\csname #1.enc\endcsname}% % % Supported encodings: names converted to tokens in order to be able % to compare them with \ifx. \def\ascii{\csname US-ASCII.enc\endcsname}% \def\latnine{\csname ISO-8859-15.enc\endcsname}% \def\latone{\csname ISO-8859-1.enc\endcsname}% \def\lattwo{\csname ISO-8859-2.enc\endcsname}% \def\utfeight{\csname UTF-8.enc\endcsname}% % \ifx \declaredencoding \ascii \asciichardefs % \else \ifx \declaredencoding \lattwo \setnonasciicharscatcode\active \lattwochardefs % \else \ifx \declaredencoding \latone \setnonasciicharscatcode\active \latonechardefs % \else \ifx \declaredencoding \latnine \setnonasciicharscatcode\active \latninechardefs % \else \ifx \declaredencoding \utfeight \setnonasciicharscatcode\active \utfeightchardefs % \else \message{Unknown document encoding #1, ignoring.}% % \fi % utfeight \fi % latnine \fi % latone \fi % lattwo \fi % ascii } % A message to be logged when using a character that isn't available % the default font encoding (OT1). % \def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} % Take account of \c (plain) vs. \, (Texinfo) difference. \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} % First, make active non-ASCII characters in order for them to be % correctly categorized when TeX reads the replacement text of % macros containing the character definitions. \setnonasciicharscatcode\active % % Latin1 (ISO-8859-1) character definitions. \def\latonechardefs{% \gdef^^a0{~} \gdef^^a1{\exclamdown} \gdef^^a2{\missingcharmsg{CENT SIGN}} \gdef^^a3{{\pounds}} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\missingcharmsg{YEN SIGN}} \gdef^^a6{\missingcharmsg{BROKEN BAR}} \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\copyright} \gdef^^aa{\ordf} \gdef^^ab{\guillemetleft} \gdef^^ac{$\lnot$} \gdef^^ad{\-} \gdef^^ae{\registeredsymbol} \gdef^^af{\={}} % \gdef^^b0{\textdegree} \gdef^^b1{$\pm$} \gdef^^b2{$^2$} \gdef^^b3{$^3$} \gdef^^b4{\'{}} \gdef^^b5{$\mu$} \gdef^^b6{\P} % \gdef^^b7{$^.$} \gdef^^b8{\cedilla\ } \gdef^^b9{$^1$} \gdef^^ba{\ordm} % \gdef^^bb{\guilletright} \gdef^^bc{$1\over4$} \gdef^^bd{$1\over2$} \gdef^^be{$3\over4$} \gdef^^bf{\questiondown} % \gdef^^c0{\`A} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\~A} \gdef^^c4{\"A} \gdef^^c5{\ringaccent A} \gdef^^c6{\AE} \gdef^^c7{\cedilla C} \gdef^^c8{\`E} \gdef^^c9{\'E} \gdef^^ca{\^E} \gdef^^cb{\"E} \gdef^^cc{\`I} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\"I} % \gdef^^d0{\DH} \gdef^^d1{\~N} \gdef^^d2{\`O} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\~O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\O} \gdef^^d9{\`U} \gdef^^da{\'U} \gdef^^db{\^U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\TH} \gdef^^df{\ss} % \gdef^^e0{\`a} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\~a} \gdef^^e4{\"a} \gdef^^e5{\ringaccent a} \gdef^^e6{\ae} \gdef^^e7{\cedilla c} \gdef^^e8{\`e} \gdef^^e9{\'e} \gdef^^ea{\^e} \gdef^^eb{\"e} \gdef^^ec{\`{\dotless i}} \gdef^^ed{\'{\dotless i}} \gdef^^ee{\^{\dotless i}} \gdef^^ef{\"{\dotless i}} % \gdef^^f0{\dh} \gdef^^f1{\~n} \gdef^^f2{\`o} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\~o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\o} \gdef^^f9{\`u} \gdef^^fa{\'u} \gdef^^fb{\^u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\th} \gdef^^ff{\"y} } % Latin9 (ISO-8859-15) encoding character definitions. \def\latninechardefs{% % Encoding is almost identical to Latin1. \latonechardefs % \gdef^^a4{\euro} \gdef^^a6{\v S} \gdef^^a8{\v s} \gdef^^b4{\v Z} \gdef^^b8{\v z} \gdef^^bc{\OE} \gdef^^bd{\oe} \gdef^^be{\"Y} } % Latin2 (ISO-8859-2) character definitions. \def\lattwochardefs{% \gdef^^a0{~} \gdef^^a1{\ogonek{A}} \gdef^^a2{\u{}} \gdef^^a3{\L} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\v L} \gdef^^a6{\'S} \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\v S} \gdef^^aa{\cedilla S} \gdef^^ab{\v T} \gdef^^ac{\'Z} \gdef^^ad{\-} \gdef^^ae{\v Z} \gdef^^af{\dotaccent Z} % \gdef^^b0{\textdegree} \gdef^^b1{\ogonek{a}} \gdef^^b2{\ogonek{ }} \gdef^^b3{\l} \gdef^^b4{\'{}} \gdef^^b5{\v l} \gdef^^b6{\'s} \gdef^^b7{\v{}} \gdef^^b8{\cedilla\ } \gdef^^b9{\v s} \gdef^^ba{\cedilla s} \gdef^^bb{\v t} \gdef^^bc{\'z} \gdef^^bd{\H{}} \gdef^^be{\v z} \gdef^^bf{\dotaccent z} % \gdef^^c0{\'R} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\u A} \gdef^^c4{\"A} \gdef^^c5{\'L} \gdef^^c6{\'C} \gdef^^c7{\cedilla C} \gdef^^c8{\v C} \gdef^^c9{\'E} \gdef^^ca{\ogonek{E}} \gdef^^cb{\"E} \gdef^^cc{\v E} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\v D} % \gdef^^d0{\DH} \gdef^^d1{\'N} \gdef^^d2{\v N} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\H O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\v R} \gdef^^d9{\ringaccent U} \gdef^^da{\'U} \gdef^^db{\H U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\cedilla T} \gdef^^df{\ss} % \gdef^^e0{\'r} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\u a} \gdef^^e4{\"a} \gdef^^e5{\'l} \gdef^^e6{\'c} \gdef^^e7{\cedilla c} \gdef^^e8{\v c} \gdef^^e9{\'e} \gdef^^ea{\ogonek{e}} \gdef^^eb{\"e} \gdef^^ec{\v e} \gdef^^ed{\'\i} \gdef^^ee{\^\i} \gdef^^ef{\v d} % \gdef^^f0{\dh} \gdef^^f1{\'n} \gdef^^f2{\v n} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\H o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\v r} \gdef^^f9{\ringaccent u} \gdef^^fa{\'u} \gdef^^fb{\H u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\cedilla t} \gdef^^ff{\dotaccent{}} } % UTF-8 character definitions. % % This code to support UTF-8 is based on LaTeX's utf8.def, with some % changes for Texinfo conventions. It is included here under the GPL by % permission from Frank Mittelbach and the LaTeX team. % \newcount\countUTFx \newcount\countUTFy \newcount\countUTFz \gdef\UTFviiiTwoOctets#1#2{\expandafter \UTFviiiDefined\csname u8:#1\string #2\endcsname} % \gdef\UTFviiiThreeOctets#1#2#3{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} % \gdef\UTFviiiFourOctets#1#2#3#4{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} \gdef\UTFviiiDefined#1{% \ifx #1\relax \message{\linenumber Unicode char \string #1 not defined for Texinfo}% \else \expandafter #1% \fi } \begingroup \catcode`\~13 \catcode`\"12 \def\UTFviiiLoop{% \global\catcode\countUTFx\active \uccode`\~\countUTFx \uppercase\expandafter{\UTFviiiTmp}% \advance\countUTFx by 1 \ifnum\countUTFx < \countUTFy \expandafter\UTFviiiLoop \fi} \countUTFx = "C2 \countUTFy = "E0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiTwoOctets\string~}} \UTFviiiLoop \countUTFx = "E0 \countUTFy = "F0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiThreeOctets\string~}} \UTFviiiLoop \countUTFx = "F0 \countUTFy = "F4 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiFourOctets\string~}} \UTFviiiLoop \endgroup \begingroup \catcode`\"=12 \catcode`\<=12 \catcode`\.=12 \catcode`\,=12 \catcode`\;=12 \catcode`\!=12 \catcode`\~=13 \gdef\DeclareUnicodeCharacter#1#2{% \countUTFz = "#1\relax \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% \begingroup \parseXMLCharref \def\UTFviiiTwoOctets##1##2{% \csname u8:##1\string ##2\endcsname}% \def\UTFviiiThreeOctets##1##2##3{% \csname u8:##1\string ##2\string ##3\endcsname}% \def\UTFviiiFourOctets##1##2##3##4{% \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% \expandafter\expandafter\expandafter\expandafter \expandafter\expandafter\expandafter \gdef\UTFviiiTmp{#2}% \endgroup} \gdef\parseXMLCharref{% \ifnum\countUTFz < "A0\relax \errhelp = \EMsimple \errmessage{Cannot define Unicode char value < 00A0}% \else\ifnum\countUTFz < "800\relax \parseUTFviiiA,% \parseUTFviiiB C\UTFviiiTwoOctets.,% \else\ifnum\countUTFz < "10000\relax \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% \else \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiA!% \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% \fi\fi\fi } \gdef\parseUTFviiiA#1{% \countUTFx = \countUTFz \divide\countUTFz by 64 \countUTFy = \countUTFz \multiply\countUTFz by 64 \advance\countUTFx by -\countUTFz \advance\countUTFx by 128 \uccode `#1\countUTFx \countUTFz = \countUTFy} \gdef\parseUTFviiiB#1#2#3#4{% \advance\countUTFz by "#10\relax \uccode `#3\countUTFz \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} \endgroup \def\utfeightchardefs{% \DeclareUnicodeCharacter{00A0}{\tie} \DeclareUnicodeCharacter{00A1}{\exclamdown} \DeclareUnicodeCharacter{00A3}{\pounds} \DeclareUnicodeCharacter{00A8}{\"{ }} \DeclareUnicodeCharacter{00A9}{\copyright} \DeclareUnicodeCharacter{00AA}{\ordf} \DeclareUnicodeCharacter{00AB}{\guillemetleft} \DeclareUnicodeCharacter{00AD}{\-} \DeclareUnicodeCharacter{00AE}{\registeredsymbol} \DeclareUnicodeCharacter{00AF}{\={ }} \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} \DeclareUnicodeCharacter{00B4}{\'{ }} \DeclareUnicodeCharacter{00B8}{\cedilla{ }} \DeclareUnicodeCharacter{00BA}{\ordm} \DeclareUnicodeCharacter{00BB}{\guillemetright} \DeclareUnicodeCharacter{00BF}{\questiondown} \DeclareUnicodeCharacter{00C0}{\`A} \DeclareUnicodeCharacter{00C1}{\'A} \DeclareUnicodeCharacter{00C2}{\^A} \DeclareUnicodeCharacter{00C3}{\~A} \DeclareUnicodeCharacter{00C4}{\"A} \DeclareUnicodeCharacter{00C5}{\AA} \DeclareUnicodeCharacter{00C6}{\AE} \DeclareUnicodeCharacter{00C7}{\cedilla{C}} \DeclareUnicodeCharacter{00C8}{\`E} \DeclareUnicodeCharacter{00C9}{\'E} \DeclareUnicodeCharacter{00CA}{\^E} \DeclareUnicodeCharacter{00CB}{\"E} \DeclareUnicodeCharacter{00CC}{\`I} \DeclareUnicodeCharacter{00CD}{\'I} \DeclareUnicodeCharacter{00CE}{\^I} \DeclareUnicodeCharacter{00CF}{\"I} \DeclareUnicodeCharacter{00D0}{\DH} \DeclareUnicodeCharacter{00D1}{\~N} \DeclareUnicodeCharacter{00D2}{\`O} \DeclareUnicodeCharacter{00D3}{\'O} \DeclareUnicodeCharacter{00D4}{\^O} \DeclareUnicodeCharacter{00D5}{\~O} \DeclareUnicodeCharacter{00D6}{\"O} \DeclareUnicodeCharacter{00D8}{\O} \DeclareUnicodeCharacter{00D9}{\`U} \DeclareUnicodeCharacter{00DA}{\'U} \DeclareUnicodeCharacter{00DB}{\^U} \DeclareUnicodeCharacter{00DC}{\"U} \DeclareUnicodeCharacter{00DD}{\'Y} \DeclareUnicodeCharacter{00DE}{\TH} \DeclareUnicodeCharacter{00DF}{\ss} \DeclareUnicodeCharacter{00E0}{\`a} \DeclareUnicodeCharacter{00E1}{\'a} \DeclareUnicodeCharacter{00E2}{\^a} \DeclareUnicodeCharacter{00E3}{\~a} \DeclareUnicodeCharacter{00E4}{\"a} \DeclareUnicodeCharacter{00E5}{\aa} \DeclareUnicodeCharacter{00E6}{\ae} \DeclareUnicodeCharacter{00E7}{\cedilla{c}} \DeclareUnicodeCharacter{00E8}{\`e} \DeclareUnicodeCharacter{00E9}{\'e} \DeclareUnicodeCharacter{00EA}{\^e} \DeclareUnicodeCharacter{00EB}{\"e} \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} \DeclareUnicodeCharacter{00F0}{\dh} \DeclareUnicodeCharacter{00F1}{\~n} \DeclareUnicodeCharacter{00F2}{\`o} \DeclareUnicodeCharacter{00F3}{\'o} \DeclareUnicodeCharacter{00F4}{\^o} \DeclareUnicodeCharacter{00F5}{\~o} \DeclareUnicodeCharacter{00F6}{\"o} \DeclareUnicodeCharacter{00F8}{\o} \DeclareUnicodeCharacter{00F9}{\`u} \DeclareUnicodeCharacter{00FA}{\'u} \DeclareUnicodeCharacter{00FB}{\^u} \DeclareUnicodeCharacter{00FC}{\"u} \DeclareUnicodeCharacter{00FD}{\'y} \DeclareUnicodeCharacter{00FE}{\th} \DeclareUnicodeCharacter{00FF}{\"y} \DeclareUnicodeCharacter{0100}{\=A} \DeclareUnicodeCharacter{0101}{\=a} \DeclareUnicodeCharacter{0102}{\u{A}} \DeclareUnicodeCharacter{0103}{\u{a}} \DeclareUnicodeCharacter{0104}{\ogonek{A}} \DeclareUnicodeCharacter{0105}{\ogonek{a}} \DeclareUnicodeCharacter{0106}{\'C} \DeclareUnicodeCharacter{0107}{\'c} \DeclareUnicodeCharacter{0108}{\^C} \DeclareUnicodeCharacter{0109}{\^c} \DeclareUnicodeCharacter{0118}{\ogonek{E}} \DeclareUnicodeCharacter{0119}{\ogonek{e}} \DeclareUnicodeCharacter{010A}{\dotaccent{C}} \DeclareUnicodeCharacter{010B}{\dotaccent{c}} \DeclareUnicodeCharacter{010C}{\v{C}} \DeclareUnicodeCharacter{010D}{\v{c}} \DeclareUnicodeCharacter{010E}{\v{D}} \DeclareUnicodeCharacter{0112}{\=E} \DeclareUnicodeCharacter{0113}{\=e} \DeclareUnicodeCharacter{0114}{\u{E}} \DeclareUnicodeCharacter{0115}{\u{e}} \DeclareUnicodeCharacter{0116}{\dotaccent{E}} \DeclareUnicodeCharacter{0117}{\dotaccent{e}} \DeclareUnicodeCharacter{011A}{\v{E}} \DeclareUnicodeCharacter{011B}{\v{e}} \DeclareUnicodeCharacter{011C}{\^G} \DeclareUnicodeCharacter{011D}{\^g} \DeclareUnicodeCharacter{011E}{\u{G}} \DeclareUnicodeCharacter{011F}{\u{g}} \DeclareUnicodeCharacter{0120}{\dotaccent{G}} \DeclareUnicodeCharacter{0121}{\dotaccent{g}} \DeclareUnicodeCharacter{0124}{\^H} \DeclareUnicodeCharacter{0125}{\^h} \DeclareUnicodeCharacter{0128}{\~I} \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} \DeclareUnicodeCharacter{012A}{\=I} \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} \DeclareUnicodeCharacter{012C}{\u{I}} \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} \DeclareUnicodeCharacter{0130}{\dotaccent{I}} \DeclareUnicodeCharacter{0131}{\dotless{i}} \DeclareUnicodeCharacter{0132}{IJ} \DeclareUnicodeCharacter{0133}{ij} \DeclareUnicodeCharacter{0134}{\^J} \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} \DeclareUnicodeCharacter{0139}{\'L} \DeclareUnicodeCharacter{013A}{\'l} \DeclareUnicodeCharacter{0141}{\L} \DeclareUnicodeCharacter{0142}{\l} \DeclareUnicodeCharacter{0143}{\'N} \DeclareUnicodeCharacter{0144}{\'n} \DeclareUnicodeCharacter{0147}{\v{N}} \DeclareUnicodeCharacter{0148}{\v{n}} \DeclareUnicodeCharacter{014C}{\=O} \DeclareUnicodeCharacter{014D}{\=o} \DeclareUnicodeCharacter{014E}{\u{O}} \DeclareUnicodeCharacter{014F}{\u{o}} \DeclareUnicodeCharacter{0150}{\H{O}} \DeclareUnicodeCharacter{0151}{\H{o}} \DeclareUnicodeCharacter{0152}{\OE} \DeclareUnicodeCharacter{0153}{\oe} \DeclareUnicodeCharacter{0154}{\'R} \DeclareUnicodeCharacter{0155}{\'r} \DeclareUnicodeCharacter{0158}{\v{R}} \DeclareUnicodeCharacter{0159}{\v{r}} \DeclareUnicodeCharacter{015A}{\'S} \DeclareUnicodeCharacter{015B}{\'s} \DeclareUnicodeCharacter{015C}{\^S} \DeclareUnicodeCharacter{015D}{\^s} \DeclareUnicodeCharacter{015E}{\cedilla{S}} \DeclareUnicodeCharacter{015F}{\cedilla{s}} \DeclareUnicodeCharacter{0160}{\v{S}} \DeclareUnicodeCharacter{0161}{\v{s}} \DeclareUnicodeCharacter{0162}{\cedilla{t}} \DeclareUnicodeCharacter{0163}{\cedilla{T}} \DeclareUnicodeCharacter{0164}{\v{T}} \DeclareUnicodeCharacter{0168}{\~U} \DeclareUnicodeCharacter{0169}{\~u} \DeclareUnicodeCharacter{016A}{\=U} \DeclareUnicodeCharacter{016B}{\=u} \DeclareUnicodeCharacter{016C}{\u{U}} \DeclareUnicodeCharacter{016D}{\u{u}} \DeclareUnicodeCharacter{016E}{\ringaccent{U}} \DeclareUnicodeCharacter{016F}{\ringaccent{u}} \DeclareUnicodeCharacter{0170}{\H{U}} \DeclareUnicodeCharacter{0171}{\H{u}} \DeclareUnicodeCharacter{0174}{\^W} \DeclareUnicodeCharacter{0175}{\^w} \DeclareUnicodeCharacter{0176}{\^Y} \DeclareUnicodeCharacter{0177}{\^y} \DeclareUnicodeCharacter{0178}{\"Y} \DeclareUnicodeCharacter{0179}{\'Z} \DeclareUnicodeCharacter{017A}{\'z} \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} \DeclareUnicodeCharacter{017C}{\dotaccent{z}} \DeclareUnicodeCharacter{017D}{\v{Z}} \DeclareUnicodeCharacter{017E}{\v{z}} \DeclareUnicodeCharacter{01C4}{D\v{Z}} \DeclareUnicodeCharacter{01C5}{D\v{z}} \DeclareUnicodeCharacter{01C6}{d\v{z}} \DeclareUnicodeCharacter{01C7}{LJ} \DeclareUnicodeCharacter{01C8}{Lj} \DeclareUnicodeCharacter{01C9}{lj} \DeclareUnicodeCharacter{01CA}{NJ} \DeclareUnicodeCharacter{01CB}{Nj} \DeclareUnicodeCharacter{01CC}{nj} \DeclareUnicodeCharacter{01CD}{\v{A}} \DeclareUnicodeCharacter{01CE}{\v{a}} \DeclareUnicodeCharacter{01CF}{\v{I}} \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} \DeclareUnicodeCharacter{01D1}{\v{O}} \DeclareUnicodeCharacter{01D2}{\v{o}} \DeclareUnicodeCharacter{01D3}{\v{U}} \DeclareUnicodeCharacter{01D4}{\v{u}} \DeclareUnicodeCharacter{01E2}{\={\AE}} \DeclareUnicodeCharacter{01E3}{\={\ae}} \DeclareUnicodeCharacter{01E6}{\v{G}} \DeclareUnicodeCharacter{01E7}{\v{g}} \DeclareUnicodeCharacter{01E8}{\v{K}} \DeclareUnicodeCharacter{01E9}{\v{k}} \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} \DeclareUnicodeCharacter{01F1}{DZ} \DeclareUnicodeCharacter{01F2}{Dz} \DeclareUnicodeCharacter{01F3}{dz} \DeclareUnicodeCharacter{01F4}{\'G} \DeclareUnicodeCharacter{01F5}{\'g} \DeclareUnicodeCharacter{01F8}{\`N} \DeclareUnicodeCharacter{01F9}{\`n} \DeclareUnicodeCharacter{01FC}{\'{\AE}} \DeclareUnicodeCharacter{01FD}{\'{\ae}} \DeclareUnicodeCharacter{01FE}{\'{\O}} \DeclareUnicodeCharacter{01FF}{\'{\o}} \DeclareUnicodeCharacter{021E}{\v{H}} \DeclareUnicodeCharacter{021F}{\v{h}} \DeclareUnicodeCharacter{0226}{\dotaccent{A}} \DeclareUnicodeCharacter{0227}{\dotaccent{a}} \DeclareUnicodeCharacter{0228}{\cedilla{E}} \DeclareUnicodeCharacter{0229}{\cedilla{e}} \DeclareUnicodeCharacter{022E}{\dotaccent{O}} \DeclareUnicodeCharacter{022F}{\dotaccent{o}} \DeclareUnicodeCharacter{0232}{\=Y} \DeclareUnicodeCharacter{0233}{\=y} \DeclareUnicodeCharacter{0237}{\dotless{j}} \DeclareUnicodeCharacter{02DB}{\ogonek{ }} \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} \DeclareUnicodeCharacter{1E20}{\=G} \DeclareUnicodeCharacter{1E21}{\=g} \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} \DeclareUnicodeCharacter{1E26}{\"H} \DeclareUnicodeCharacter{1E27}{\"h} \DeclareUnicodeCharacter{1E30}{\'K} \DeclareUnicodeCharacter{1E31}{\'k} \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} \DeclareUnicodeCharacter{1E3E}{\'M} \DeclareUnicodeCharacter{1E3F}{\'m} \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} \DeclareUnicodeCharacter{1E54}{\'P} \DeclareUnicodeCharacter{1E55}{\'p} \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} \DeclareUnicodeCharacter{1E7C}{\~V} \DeclareUnicodeCharacter{1E7D}{\~v} \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} \DeclareUnicodeCharacter{1E80}{\`W} \DeclareUnicodeCharacter{1E81}{\`w} \DeclareUnicodeCharacter{1E82}{\'W} \DeclareUnicodeCharacter{1E83}{\'w} \DeclareUnicodeCharacter{1E84}{\"W} \DeclareUnicodeCharacter{1E85}{\"w} \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} \DeclareUnicodeCharacter{1E8C}{\"X} \DeclareUnicodeCharacter{1E8D}{\"x} \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} \DeclareUnicodeCharacter{1E90}{\^Z} \DeclareUnicodeCharacter{1E91}{\^z} \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} \DeclareUnicodeCharacter{1E97}{\"t} \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} \DeclareUnicodeCharacter{1EBC}{\~E} \DeclareUnicodeCharacter{1EBD}{\~e} \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} \DeclareUnicodeCharacter{1EF2}{\`Y} \DeclareUnicodeCharacter{1EF3}{\`y} \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} \DeclareUnicodeCharacter{1EF8}{\~Y} \DeclareUnicodeCharacter{1EF9}{\~y} \DeclareUnicodeCharacter{2013}{--} \DeclareUnicodeCharacter{2014}{---} \DeclareUnicodeCharacter{2018}{\quoteleft} \DeclareUnicodeCharacter{2019}{\quoteright} \DeclareUnicodeCharacter{201A}{\quotesinglbase} \DeclareUnicodeCharacter{201C}{\quotedblleft} \DeclareUnicodeCharacter{201D}{\quotedblright} \DeclareUnicodeCharacter{201E}{\quotedblbase} \DeclareUnicodeCharacter{2022}{\bullet} \DeclareUnicodeCharacter{2026}{\dots} \DeclareUnicodeCharacter{2039}{\guilsinglleft} \DeclareUnicodeCharacter{203A}{\guilsinglright} \DeclareUnicodeCharacter{20AC}{\euro} \DeclareUnicodeCharacter{2192}{\expansion} \DeclareUnicodeCharacter{21D2}{\result} \DeclareUnicodeCharacter{2212}{\minus} \DeclareUnicodeCharacter{2217}{\point} \DeclareUnicodeCharacter{2261}{\equiv} }% end of \utfeightchardefs % US-ASCII character definitions. \def\asciichardefs{% nothing need be done \relax } % Make non-ASCII characters printable again for compatibility with % existing Texinfo documents that may use them, even without declaring a % document encoding. % \setnonasciicharscatcode \other \message{formatting,} \newdimen\defaultparindent \defaultparindent = 15pt \chapheadingskip = 15pt plus 4pt minus 2pt \secheadingskip = 12pt plus 3pt minus 2pt \subsecheadingskip = 9pt plus 2pt minus 2pt % Prevent underfull vbox error messages. \vbadness = 10000 % Don't be so finicky about underfull hboxes, either. \hbadness = 2000 % Following George Bush, get rid of widows and orphans. \widowpenalty=10000 \clubpenalty=10000 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're % using an old version of TeX, don't do anything. We want the amount of % stretch added to depend on the line length, hence the dependence on % \hsize. We call this whenever the paper size is set. % \def\setemergencystretch{% \ifx\emergencystretch\thisisundefined % Allow us to assign to \emergencystretch anyway. \def\emergencystretch{\dimen0}% \else \emergencystretch = .15\hsize \fi } % Parameters in order: 1) textheight; 2) textwidth; % 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; % 7) physical page height; 8) physical page width. % % We also call \setleading{\textleading}, so the caller should define % \textleading. The caller should also set \parskip. % \def\internalpagesizes#1#2#3#4#5#6#7#8{% \voffset = #3\relax \topskip = #6\relax \splittopskip = \topskip % \vsize = #1\relax \advance\vsize by \topskip \outervsize = \vsize \advance\outervsize by 2\topandbottommargin \pageheight = \vsize % \hsize = #2\relax \outerhsize = \hsize \advance\outerhsize by 0.5in \pagewidth = \hsize % \normaloffset = #4\relax \bindingoffset = #5\relax % \ifpdf \pdfpageheight #7\relax \pdfpagewidth #8\relax % if we don't reset these, they will remain at "1 true in" of % whatever layout pdftex was dumped with. \pdfhorigin = 1 true in \pdfvorigin = 1 true in \fi % \setleading{\textleading} % \parindent = \defaultparindent \setemergencystretch } % @letterpaper (the default). \def\letterpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % If page is nothing but text, make it come out even. \internalpagesizes{607.2pt}{6in}% that's 46 lines {\voffset}{.25in}% {\bindingoffset}{36pt}% {11in}{8.5in}% }} % Use @smallbook to reset parameters for 7x9.25 trim size. \def\smallbook{{\globaldefs = 1 \parskip = 2pt plus 1pt \textleading = 12pt % \internalpagesizes{7.5in}{5in}% {-.2in}{0in}% {\bindingoffset}{16pt}% {9.25in}{7in}% % \lispnarrowing = 0.3in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .5cm }} % Use @smallerbook to reset parameters for 6x9 trim size. % (Just testing, parameters still in flux.) \def\smallerbook{{\globaldefs = 1 \parskip = 1.5pt plus 1pt \textleading = 12pt % \internalpagesizes{7.4in}{4.8in}% {-.2in}{-.4in}% {0pt}{14pt}% {9in}{6in}% % \lispnarrowing = 0.25in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .4cm }} % Use @afourpaper to print on European A4 paper. \def\afourpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % Double-side printing via postscript on Laserjet 4050 % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. % To change the settings for a different printer or situation, adjust % \normaloffset until the front-side and back-side texts align. Then % do the same for \bindingoffset. You can set these for testing in % your texinfo source file like this: % @tex % \global\normaloffset = -6mm % \global\bindingoffset = 10mm % @end tex \internalpagesizes{673.2pt}{160mm}% that's 51 lines {\voffset}{\hoffset}% {\bindingoffset}{44pt}% {297mm}{210mm}% % \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = 5mm }} % Use @afivepaper to print on European A5 paper. % From romildo@urano.iceb.ufop.br, 2 July 2000. % He also recommends making @example and @lisp be small. \def\afivepaper{{\globaldefs = 1 \parskip = 2pt plus 1pt minus 0.1pt \textleading = 12.5pt % \internalpagesizes{160mm}{120mm}% {\voffset}{\hoffset}% {\bindingoffset}{8pt}% {210mm}{148mm}% % \lispnarrowing = 0.2in \tolerance = 800 \hfuzz = 1.2pt \contentsrightmargin = 0pt \defbodyindent = 2mm \tableindent = 12mm }} % A specific text layout, 24x15cm overall, intended for A4 paper. \def\afourlatex{{\globaldefs = 1 \afourpaper \internalpagesizes{237mm}{150mm}% {\voffset}{4.6mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% % % Must explicitly reset to 0 because we call \afourpaper. \globaldefs = 0 }} % Use @afourwide to print on A4 paper in landscape format. \def\afourwide{{\globaldefs = 1 \afourpaper \internalpagesizes{241mm}{165mm}% {\voffset}{-2.95mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% \globaldefs = 0 }} % @pagesizes TEXTHEIGHT[,TEXTWIDTH] % Perhaps we should allow setting the margins, \topskip, \parskip, % and/or leading, also. Or perhaps we should compute them somehow. % \parseargdef\pagesizes{\pagesizesyyy #1,,\finish} \def\pagesizesyyy#1,#2,#3\finish{{% \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi \globaldefs = 1 % \parskip = 3pt plus 2pt minus 1pt \setleading{\textleading}% % \dimen0 = #1\relax \advance\dimen0 by \voffset % \dimen2 = \hsize \advance\dimen2 by \normaloffset % \internalpagesizes{#1}{\hsize}% {\voffset}{\normaloffset}% {\bindingoffset}{44pt}% {\dimen0}{\dimen2}% }} % Set default to letter. % \letterpaper \message{and turning on texinfo input format.} % DEL is a comment character, in case @c does not suffice. \catcode`\^^? = 14 % Define macros to output various characters with catcode for normal text. \catcode`\"=\other \catcode`\~=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\+=\other \catcode`\$=\other \def\normaldoublequote{"} \def\normaltilde{~} \def\normalcaret{^} \def\normalunderscore{_} \def\normalverticalbar{|} \def\normalless{<} \def\normalgreater{>} \def\normalplus{+} \def\normaldollar{$}%$ font-lock fix % This macro is used to make a character print one way in \tt % (where it can probably be output as-is), and another way in other fonts, % where something hairier probably needs to be done. % % #1 is what to print if we are indeed using \tt; #2 is what to print % otherwise. Since all the Computer Modern typewriter fonts have zero % interword stretch (and shrink), and it is reasonable to expect all % typewriter fonts to have this, we can check that font parameter. % \def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} % Same as above, but check for italic font. Actually this also catches % non-italic slanted fonts since it is impossible to distinguish them from % italic fonts. But since this is only used by $ and it uses \sl anyway % this is not a problem. \def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} % Turn off all special characters except @ % (and those which the user can use as if they were ordinary). % Most of these we simply print from the \tt font, but for some, we can % use math or other variants that look better in normal text. \catcode`\"=\active \def\activedoublequote{{\tt\char34}} \let"=\activedoublequote \catcode`\~=\active \def~{{\tt\char126}} \chardef\hat=`\^ \catcode`\^=\active \def^{{\tt \hat}} \catcode`\_=\active \def_{\ifusingtt\normalunderscore\_} \let\realunder=_ % Subroutine for the previous macro. \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } \catcode`\|=\active \def|{{\tt\char124}} \chardef \less=`\< \catcode`\<=\active \def<{{\tt \less}} \chardef \gtr=`\> \catcode`\>=\active \def>{{\tt \gtr}} \catcode`\+=\active \def+{{\tt \char 43}} \catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix % If a .fmt file is being used, characters that might appear in a file % name cannot be active until we have parsed the command line. % So turn them off again, and have \everyjob (or @setfilename) turn them on. % \otherifyactive is called near the end of this file. \def\otherifyactive{\catcode`+=\other \catcode`\_=\other} % Used sometimes to turn off (effectively) the active characters even after % parsing them. \def\turnoffactive{% \normalturnoffactive \otherbackslash } \catcode`\@=0 % \backslashcurfont outputs one backslash character in current font, % as in \char`\\. \global\chardef\backslashcurfont=`\\ \global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work % \realbackslash is an actual character `\' with catcode other, and % \doublebackslash is two of them (for the pdf outlines). {\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} % In texinfo, backslash is an active character; it prints the backslash % in fixed width font. \catcode`\\=\active @def@normalbackslash{{@tt@backslashcurfont}} % On startup, @fixbackslash assigns: % @let \ = @normalbackslash % \rawbackslash defines an active \ to do \backslashcurfont. % \otherbackslash defines an active \ to be a literal `\' character with % catcode other. @gdef@rawbackslash{@let\=@backslashcurfont} @gdef@otherbackslash{@let\=@realbackslash} % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of % the literal character `\'. % @def@normalturnoffactive{% @let\=@normalbackslash @let"=@normaldoublequote @let~=@normaltilde @let^=@normalcaret @let_=@normalunderscore @let|=@normalverticalbar @let<=@normalless @let>=@normalgreater @let+=@normalplus @let$=@normaldollar %$ font-lock fix @markupsetuplqdefault @markupsetuprqdefault @unsepspaces } % Make _ and + \other characters, temporarily. % This is canceled by @fixbackslash. @otherifyactive % If a .fmt file is being used, we don't want the `\input texinfo' to show up. % That is what \eatinput is for; after that, the `\' should revert to printing % a backslash. % @gdef@eatinput input texinfo{@fixbackslash} @global@let\ = @eatinput % On the other hand, perhaps the file did not have a `\input texinfo'. Then % the first `\' in the file would cause an error. This macro tries to fix % that, assuming it is called before the first `\' could plausibly occur. % Also turn back on active characters that might appear in the input % file name, in case not using a pre-dumped format. % @gdef@fixbackslash{% @ifx\@eatinput @let\ = @normalbackslash @fi @catcode`+=@active @catcode`@_=@active } % Say @foo, not \foo, in error messages. @escapechar = `@@ % These look ok in all fonts, so just make them not special. @catcode`@& = @other @catcode`@# = @other @catcode`@% = @other @c Finally, make ` and ' active, so that txicodequoteundirected and @c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we @c don't make ` and ' active, @code will not get them as active chars. @c Do this last of all since we use ` in the previous @catcode assignments. @catcode`@'=@active @catcode`@`=@active @markupsetuplqdefault @markupsetuprqdefault @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) @c page-delimiter: "^\\\\message" @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" @c time-stamp-end: "}" @c End: @c vim:sw=2: @ignore arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 @end ignore gv-3.7.4/doc/Makefile.in0000664000076400007640000010745512121323352011714 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Makefile.am for gv/doc/ # # Time-stamp: "2004-12-19 20:16:44 jemarch" # # Copyright (C) 2004 José E. Marchesi # File distribution VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc DIST_COMMON = $(gv_TEXINFOS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/stamp-vti \ $(srcdir)/version.texi mdate-sh texinfo.tex ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/canonicalize.m4 \ $(top_srcdir)/m4/double-slash-root.m4 \ $(top_srcdir)/m4/eealloc.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/getopt.m4 \ $(top_srcdir)/m4/gettimeofday.m4 \ $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 \ $(top_srcdir)/m4/include_next.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mkdtemp.m4 \ $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/multiarch.m4 \ $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/pathmax.m4 \ $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/signal_h.m4 \ $(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/stdbool.m4 \ $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/sys_stat_h.m4 \ $(top_srcdir)/m4/sys_time_h.m4 $(top_srcdir)/m4/tempname.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/wchar_t.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/ac_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = INFO_DEPS = $(srcdir)/gv.info am__TEXINFO_TEX_DIR = $(srcdir) DVIS = gv.dvi PDFS = gv.pdf PSS = gv.ps HTMLS = gv.html TEXINFOS = gv.texi TEXI2DVI = texi2dvi TEXI2PDF = $(TEXI2DVI) --pdf --batch MAKEINFOHTML = $(MAKEINFO) --html AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) DVIPS = dvips am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEPS_CFLAGS = @DEPS_CFLAGS@ DEPS_LIBS = @DEPS_LIBS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ GETOPT_H = @GETOPT_H@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_READ = @GNULIB_READ@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ LDFLAGS = @LDFLAGS@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANUALEDITION = @MANUALEDITION@ MKDIR_P = @MKDIR_P@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PAPERSIZE = @PAPERSIZE@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRINT_COMMAND = @PRINT_COMMAND@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WRITE = @REPLACE_WRITE@ SAVE_DIR = @SAVE_DIR@ SCRATCH_DIR = @SCRATCH_DIR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_BACKING_PIXMAP = @USE_BACKING_PIXMAP@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = gv.1 gv-update-userconfig.1 info_TEXINFOS = gv.texi gv_TEXINFOS = gpl.texi man_MANS = gv.1 gv-update-userconfig.1 all: all-am .SUFFIXES: .SUFFIXES: .dvi .html .info .pdf .ps .texi $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): .texi.info: restore=: && backupdir="$(am__leading_dot)am$$$$" && \ am__cwd=`pwd` && $(am__cd) $(srcdir) && \ rm -rf $$backupdir && mkdir $$backupdir && \ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ done; \ else :; fi && \ cd "$$am__cwd"; \ if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $@ $<; \ then \ rc=0; \ $(am__cd) $(srcdir); \ else \ rc=$$?; \ $(am__cd) $(srcdir) && \ $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ fi; \ rm -rf $$backupdir; exit $$rc .texi.dvi: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2DVI) $< .texi.pdf: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2PDF) $< .texi.html: rm -rf $(@:.html=.htp) if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $(@:.html=.htp) $<; \ then \ rm -rf $@; \ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \ else \ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ exit 1; \ fi $(srcdir)/gv.info: gv.texi $(srcdir)/version.texi $(gv_TEXINFOS) gv.dvi: gv.texi $(srcdir)/version.texi $(gv_TEXINFOS) gv.pdf: gv.texi $(srcdir)/version.texi $(gv_TEXINFOS) gv.html: gv.texi $(srcdir)/version.texi $(gv_TEXINFOS) $(srcdir)/stamp-vti: gv.texi $(top_srcdir)/configure @(dir=.; test -f ./gv.texi || dir=$(srcdir); \ set `$(SHELL) $(srcdir)/mdate-sh $$dir/gv.texi`; \ echo "@set UPDATED $$1 $$2 $$3"; \ echo "@set UPDATED-MONTH $$2 $$3"; \ echo "@set EDITION $(VERSION)"; \ echo "@set VERSION $(VERSION)") > vti.tmp @cmp -s vti.tmp $(srcdir)/version.texi \ || (echo "Updating $(srcdir)/version.texi"; \ cp vti.tmp $(srcdir)/version.texi) -@rm -f vti.tmp @cp $(srcdir)/version.texi $@ mostlyclean-vti: -rm -f vti.tmp maintainer-clean-vti: @MAINTAINER_MODE_TRUE@ -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi .dvi.ps: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ $(DVIPS) -o $@ $< uninstall-dvi-am: @$(NORMAL_UNINSTALL) @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ rm -f "$(DESTDIR)$(dvidir)/$$f"; \ done uninstall-html-am: @$(NORMAL_UNINSTALL) @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ done uninstall-info-am: @$(PRE_UNINSTALL) @if test -d '$(DESTDIR)$(infodir)' && \ (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ done; \ else :; fi @$(NORMAL_UNINSTALL) @list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ else :; fi); \ done uninstall-pdf-am: @$(NORMAL_UNINSTALL) @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ done uninstall-ps-am: @$(NORMAL_UNINSTALL) @list='$(PSS)'; test -n "$(psdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ rm -f "$(DESTDIR)$(psdir)/$$f"; \ done dist-info: $(INFO_DEPS) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; \ for base in $$list; do \ case $$base in \ $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$base; then d=.; else d=$(srcdir); fi; \ base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ if test -f $$file; then \ relfile=`expr "$$file" : "$$d/\(.*\)"`; \ test -f "$(distdir)/$$relfile" || \ cp -p $$file "$(distdir)/$$relfile"; \ else :; fi; \ done; \ done mostlyclean-aminfo: -rm -rf gv.aux gv.cp gv.cps gv.fn gv.fns gv.ky gv.kys gv.log gv.pg gv.pgs \ gv.tmp gv.toc gv.tp gv.tps gv.vr gv.vrs clean-aminfo: -test -z "gv.dvi gv.pdf gv.ps gv.html" \ || rm -rf gv.dvi gv.pdf gv.ps gv.html maintainer-clean-aminfo: @list='$(INFO_DEPS)'; for i in $$list; do \ i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ done install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-info check-am: all-am check: check-am all-am: Makefile $(INFO_DEPS) $(MANS) installdirs: for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-aminfo clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: $(DVIS) html: html-am html-am: $(HTMLS) info: info-am info-am: $(INFO_DEPS) install-data-am: install-info-am install-man install-dvi: install-dvi-am install-dvi-am: $(DVIS) @$(NORMAL_INSTALL) test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)" @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \ done install-exec-am: install-html: install-html-am install-html-am: $(HTMLS) @$(NORMAL_INSTALL) test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ for p in $$list; do \ if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ $(am__strip_dir) \ if test -d "$$d$$p"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ else \ list2="$$list2 $$d$$p"; \ fi; \ done; \ test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ done; } install-info: install-info-am install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)" @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ if test -f $$ifile; then \ echo "$$ifile"; \ else : ; fi; \ done; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done @$(POST_INSTALL) @if (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ done; \ else : ; fi install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: $(PDFS) @$(NORMAL_INSTALL) test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)" @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done install-ps: install-ps-am install-ps-am: $(PSS) @$(NORMAL_INSTALL) test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)" @list='$(PSS)'; test -n "$(psdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-aminfo \ maintainer-clean-generic maintainer-clean-vti mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean-vti pdf: pdf-am pdf-am: $(PDFS) ps: ps-am ps-am: $(PSS) uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ uninstall-man uninstall-pdf-am uninstall-ps-am uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-aminfo clean-generic \ dist-info distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-man1 install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-aminfo maintainer-clean-generic \ maintainer-clean-vti mostlyclean mostlyclean-aminfo \ mostlyclean-generic mostlyclean-vti pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-dvi-am uninstall-html-am \ uninstall-info-am uninstall-man uninstall-man1 \ uninstall-pdf-am uninstall-ps-am $(srcdir)/gv.1: $(top_srcdir)/src/versionp.h $(top_srcdir)/src/gv_message.h help2man -n 'Postscript and PDF viewer' -o $(srcdir)/gv.1 ../src/gv # This hack allows building CVS without having to anable maintainer mode $(srcdir)/version.texi: $(srcdir)/stamp-vti # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gv-3.7.4/doc/gpl.texi0000664000076400007640000010441311735103745011327 00000000000000@c The GNU General Public License. @center Version 3, 29 June 2007 @c This file is intended to be included within another document, @c hence no sectioning command or @node. @display Copyright @copyright{} 2007 Free Software Foundation, Inc. @url{http://fsf.org/} Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @end display @heading Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program---to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. @heading TERMS AND CONDITIONS @enumerate 0 @item Definitions. ``This License'' refers to version 3 of the GNU General Public License. ``Copyright'' also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. ``The Program'' refers to any copyrightable work licensed under this License. Each licensee is addressed as ``you''. ``Licensees'' and ``recipients'' may be individuals or organizations. To ``modify'' a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a ``modified version'' of the earlier work or a work ``based on'' the earlier work. A ``covered work'' means either the unmodified Program or a work based on the Program. To ``propagate'' a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To ``convey'' a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays ``Appropriate Legal Notices'' to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. @item Source Code. The ``source code'' for a work means the preferred form of the work for making modifications to it. ``Object code'' means any non-source form of a work. A ``Standard Interface'' means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The ``System Libraries'' of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A ``Major Component'', in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The ``Corresponding Source'' for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. @item Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. @item Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. @item Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. @item Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: @enumerate a @item The work must carry prominent notices stating that you modified it, and giving a relevant date. @item The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to ``keep intact all notices''. @item You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. @item If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. @end enumerate A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an ``aggregate'' if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @item Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: @enumerate a @item Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. @item Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. @item Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. @item Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. @item Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. @end enumerate A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A ``User Product'' is either (1) a ``consumer product'', which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, ``normally used'' refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. ``Installation Information'' for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. @item Additional Terms. ``Additional permissions'' are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: @enumerate a @item Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or @item Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or @item Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or @item Limiting the use for publicity purposes of names of licensors or authors of the material; or @item Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or @item Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. @end enumerate All other non-permissive additional terms are considered ``further restrictions'' within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. @item Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. @item Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. @item Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An ``entity transaction'' is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. @item Patents. A ``contributor'' is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's ``contributor version''. A contributor's ``essential patent claims'' are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, ``control'' includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a ``patent license'' is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To ``grant'' such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. ``Knowingly relying'' means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is ``discriminatory'' if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. @item No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @item Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. @item Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License ``or any later version'' applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. @item Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. @item Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. @item Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. @end enumerate @heading END OF TERMS AND CONDITIONS @heading How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the ``copyright'' line and a pointer to where the full notice is found. @smallexample @var{one line to give the program's name and a brief idea of what it does.} Copyright (C) @var{year} @var{name of author} This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see @url{http://www.gnu.org/licenses/}. @end smallexample Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: @smallexample @var{program} Copyright (C) @var{year} @var{name of author} This program comes with ABSOLUTELY NO WARRANTY; for details type @samp{show w}. This is free software, and you are welcome to redistribute it under certain conditions; type @samp{show c} for details. @end smallexample The hypothetical commands @samp{show w} and @samp{show c} should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an ``about box''. You should also get your employer (if you work as a programmer) or school, if any, to sign a ``copyright disclaimer'' for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see @url{http://www.gnu.org/licenses/}. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read @url{http://www.gnu.org/philosophy/why-not-lgpl.html}. gv-3.7.4/doc/gv.texi0000664000076400007640000013257111735103745011167 00000000000000\input texinfo @comment $Id$ @comment %**start of header @setfilename gv.info @settitle GNU gv Manual @comment %**end of header @include version.texi @set MYEDITION First @copying This is the @value{MYEDITION} edition of the @cite{GNU gv Manual}, updated for gv version @value{VERSION}. Copyright @copyright{} 1995, 1996, 1997 Johannes Plass Copyright @copyright{} 2004 Jos@'e E. Marchesi @quotation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or any later version published by the Free Software Foundation. @end quotation @end copying @dircategory Viewers @direntry * gv: (gv). The GNU PostScript and PDF viewer. @end direntry @titlepage @sp 6 @center @titlefont{GNU gv Manual} @sp 4 @center @value{MYEDITION} Edition, Updated for gv Version @value{VERSION}. @sp 5 @center Johannes Plass @center Jos@'e E. Marchesi @page @vskip 0pt plus 1filll @insertcopying @end titlepage @page @ifnottex @node Top, Introduction, (dir), (dir) @top GNU gv GNU gv - View PostScript and PDF documents using ghostscript. @insertcopying @end ifnottex @menu * Introduction:: * Invoking gv:: * Resources:: * Mouse and key bindings:: * Comments about the user interface:: * Frequently asked questions:: * gv internals:: * GNU General Public License:: @end menu @contents @node Introduction, Invoking gv, Top, Top @chapter Introduction GNU gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. Please note that gv is derived from Tim Theisen's ghostview. @node Invoking gv, Resources, Introduction, Top @chapter Invoking gv @verbatim Usage: gv [OPTION]... [FILE] PostScript and PDF viewer. [-]-monochrome display document using only black and white [-]-grayscale display document without colors [-]-color display document as usual [-]-safer start ghostscript in safe mode [-]-nosafer do not start ghostscript in safe mode [-]-safedir start ghostscript from a safe diretory [-]-nosafedir do not start ghostscript from a safe diretory [-]-quiet start ghostscript with the -dQUIET option [-]-noquiet do not start ghostscript with the -dQUIET option [-]-infoSilent do not show any messages in the info popup window [-]-infoErrors do not show warning messages in the info popup window [-]-infoAll do show all messages in the info popup window [-]-arguments=ARGS start ghostscript with additional options as specified by the string ARGS [-]-page=LABEL display the page with label LABEL first [-]-center the page should be centered automatically [-]-nocenter the page should not be centered automatically [-]-media=MEDIA selects the paper size to be used [-]-orientation=ORIENTATION sets the orientation of the page [-]-scale=N|f.f selects the scale N, or arbitrary scale f.f [-]-scalebase=N selects the scale base N [-]-swap interchange the meaning of the orientations landscape and seascape [-]-noswap do not interchange the meaning of the orientation landscape and seascape [-]-antialias use antialiasing [-]-noantialias do not use antialiasing [-]-dsc dsc comments are respected [-]-nodsc dsc comments are not respected [-]-eof ignore the postscript EOF comment while scanning documents [-]-noeof do not ignore the postscript EOF comment while scanning documents [-]-pixmap use backing pixmap [-]-nopixmap do not use backing pixmap [-]-watch watch the document file for changes [-]-nowatch do not watch the document file for changes [-]-help print a help message and exit [-]-usage print a usage message and exit [-]-resize fit the size of the window to the size of the page [-]-noresize do not fit the size of the window to the size of the page -geometry [][x][{+-}{+-}] [-]-ad=FILE read and use additional resources from FILE [-]-style=FILE read and use additional resources from FILE. These resources have lower priority than those provided on the context of --ad [-]-password=PASSWORD Sets the password for opening encrypted PDF files [-]-spartan shortcut for --style=gv_spartan.dat [-]-widgetless shortcut for --style=gv_widgetless.dat [-]-fullscreen start in fullscreen mode (needs support from WM) [-]-presentation Presentation mode (fullscreen, Fit to window, widgetless and no resizing of window) [-]-version show gv version and exit @end verbatim @table @code @item @var{file} The name of the file to be displayed. The file ending @file{.ps} may be omitted. @var{file} may point to a compressed file (gzipped, bzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. @item --ad=@var{file} Read and use additional resources from the file @var{file}. These resources have higher priority than those provided in the context of the @code{--style} option. @item --antialias, --noantialias Whether to use antialiasing. @item --arguments=@var{args} Start ghostscrip with additional options as specified by the string @var{args}. @item --center, --nocenter Whether the page should be centered automatically. @item --dsc, --nodsc Determines if @emph{document structuring convention} (@acronym{DSC}) comments should be respected or ignored. If @code{--nodsc} is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the @emph{document structuring conventions}. @item --eof, --noeof Defines the behaviour of the postscript scanner used to examine the structure of the document. If @code{--noeof} is used the scanner will ignore end of file (@acronym{EOF}) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If @code{--eof} is used, the scanner treats an @acronym{EOF} comment as marking the end of the file. @item --fullscreen Selects the fullscreen mode. @item --infoSilent Do not show any ghostscript messages in an info popup window. @item --infoErrors Only show error messages from ghostscript in an info popup window. @item --infoAll Shows all ghostscript messages in an info popup window. @item --pixmap, --nopixmap If @code{--pixmap} is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If @code{--nopixmap} is used the @emph{X Server} is responsible for maintaining obscured portions of the displayed page (see also the @emph{useBackingPixmap} resource). @item --version Print the version number of gv to standard output and exit. @item --help, --usage Display a short help message and exit. @item --scale=@var{n} @var{n} must be an integer or a positive float. In case @var{n} is an integer, @var{n} selects the scale entry @var{n} relative to the scale 1.0. With the special value of @code{-1000} Fit to page is selected, and likewise with the value of @code{-1001} Fit widthto page is selected. In case @var{n} is a float, @var{n} selects an arbitrary scale. @item --scalebase @var{n} Selects the scale base @var{n}. @item --monochrome, --grayscale, --color Sets the color palette to be used. @item --media=@var{media} Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the @var{medias} resource. @item --page=@var{label} Display the page with label @var{label} first. @item --orientation=@var{orientation} Sets the orientation. Valid values for @var{orientation} are @code{portrait}, @code{landscape}, @code{seascape} and @code{upsidedown}. @item --quiet, --noquiet Whether to start ghostscript with the @code{-dQUIET} option. @item --resize, --noresize Whether ghostscrip is allowed to automatically fit the size of its window to the size of the displayed page. @item --password=PASSWORD When opening a file, use PASSWORD to decrypt it. This Option is usefull for viewing encrypted PDF files. @item --presentation Is actually a shortcut for @code{--fullscreen --noresize --scale=-1000 --widgetless}. @item --safer, --nosafer Whether to start ghostscript in safer mode (that includes he @code{-dSAFER} option or the @code{-dDELAYSAFER} mode where appropriate) and the @code{-P-} option. @item --safedir, --nosafedir Whether to start ghostscript from a safe direcotry or not. @item --spartan This is a shortcut for @code{--style=gv_spartan.dat}. @item --style=@var{file} Read and use additional resources from the file @var{file}. These resources have lower priority than those provided in the context of the @code{--ad} option. @item --swap, --noswap Whether to interchange the meaning of the orientations landscape and seascape. @item --watch, --nowatch The @code{--watch} option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the @emph{watchFileFrequency} resource. Note that sending gv the @strong{SIGHUP} signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. @item --widgetless This is a shortcut for @code{--style=gv_widgetless.dat}. @end table @node Resources, Mouse and key bindings, Invoking gv, Top @chapter Resources @menu * Resource files:: * Resources of gv:: @end menu @node Resource files, Resources of gv, Resources, Resources @section Resource files In general gv does not depend on any external resource files. However, when starting gv, preferences are read from @table @strong @item a system specific resource file. The name of this file is GV and is installed on as part of gv's architecture independent library. Usually the library files are installed on @file{/usr/local/lib/gv}. Administrators may want to modify this file in order to set up gv according to the local needs of their system. @item a user specific resource file. The name of this file is either @file{~/.gv} or as described by the @code{XUSERFILESEARCHPATH} environment variable. @end table The files @file{gv_user.ad} and @file{gv_system.ad} (located in the library directory of gv, which is most probably either @file{/usr/local/lib/gv/} or @file{/usr/lib/gv/}) may serve as a basis for constructing the user and system specific resource files. Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. @node Resources of gv, , Resource files, Resources @section Resources of gv The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. @table @strong @item antialias Whether antialiasing should be used. Valid values are @code{True} and @code{False}. It defaults to @code{True}. @item autoCenter Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are @code{True} and @code{False}. It defaults to @code{True}. @item autoResize Whether gv is allowed to resize the main window according to the size of the current page. Valid values are @code{True} and @code{False}. It defaults to @code{True}. @item confirmPrint Whether printing requires an extra confirmation. Valid values are @code{True} and @code{False}. It defaults to @code{True}. @item confirmQuit Whether leaving gv requires extra confirmation. Valid values are @code{0} (Never), @code{1} (When processing) and @code{2} (Always). The default value is @code{1}, which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. @item scrollingEyeGuide If this resource is @code{True} scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are @code{True} and @code{False}. It defaults to @code{True}. @item infoVerbose Defines the behavior of the info popup which shows messages from ghostscript. Valid values are @code{Silent} (Never), @code{Errors} (show only errror messages) and @code{All} (Any message is being shown). It defaults to @code{Errors}. @item xinerama Defines whether the display resolution is determined by xinerama. Valid values are @code{On} (use Xinerama if available), @code{Off} (do not use Xinerama) and @code{Auto} (heuristically decide whether to use Xinerama or not). It defaults to @code{Auto}. @item ignoreEOF Defines the behaviour of the postscript scanner as described in the Options section. Valid values are @code{True} and @code{False}. It defaults to @code{True}. @item respectDSC Determines whether gv should attempt to respect document structuring comments. Valid values are @code{True} and @code{False}. It defaults to @code{True}. @item reverseScrolling Defines the interpretation of directions when scrolling with the mouse. Valid values are @code{True} and @code{False}. It defaults to @code{False}. @item swapLandscape Whether the meaning of @code{landscape} and @code{seacape} should be interchanged. Valid values are @code{True} and @code{False}. It defaults to @code{False}. @item scratchDir Specifies a directory used to store temporary data. It defaults to the invocation directory. @item defaultSaveDir Specifies the default destination directory for files to be saved. It defaults to the home directory, @file{~/}. @item useBackingPixmap If the value of this resource is @code{False} the @emph{X Server} is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the @emph{X Server}. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is @code{True} the @emph{X Server} is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. It defaults to @code{True}. @item watchFile Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are @code{True} and @code{False}. It defaults to @code{False}. @item watchFileFrequency Defines the time in milliseconds elapsing between successive checks of the document when @emph{watchFile} is set to @code{True}. Allowed values must be larger than 500. It defaults to @code{1000}. @item printCommand The command used for printing a file. The command may contain multiple @code{%s} wildcards which will be replaced by the name of the file to be printed. It defaults to @code{lpr}. @item saveposFilename This file is used for saving positions by the @code{z} and @code{u} keys. It defaults to @code{~/gv.savepos}. @item gsInterpreter The command used to start the ghostscript interpreter. It defaults to @code{gv}. @item gsCmdScanPDF The command used to extract document structuring comments from a PDF file. It defaults to @code{gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit} @item gsCmdConvPDF The command used to convert a PDF file to PostScript. It defaults to @code{gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit} @item gsX11Device The ghostscript command line option which activates the @emph{X11} device. It defaults to @code{-sDEVICE=x11} @item gsX11AlphaDevice The ghostscript command line option which activates the @emph{X11} device with antialiasing enabled. It defaults to @code{-dNOPLATFONTS -sDEVICE=x11alpha} @item gsSafeeDir Determines whether ghostscript should be started from a safe directory. It defaults to @code{True}. @item gsSafer Determines whether ghostscript should be started with the @code{-dSAFER} command line option. It defaults to @code{True}. @item gsQuiet Determines whether ghostscript should be started with the @code{-dQUIET} command line option. It defaults to @code{True}. @item gsArguments May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the @code{-arguments @var{arguments}} option will override this resource setting. It defaults to the empty string. @item magMenu Describes the menu that pops up when preparing to to zoom an area of the displayed page. @item dirs Defines a list of directories accessible via the @code{Directories} menu in the file selection window. The special value @code{Home} corresponds to the users home directory, the value @code{Tmp} corresponds to the scratch directory as defined by the @strong{scratchDir} resource. It defaults to @code{Home Tmp /usr/doc /usr/local/doc} @item filter Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax @verbatim := [] [no ] := [] := filename possibly including wildcards '*' which match any character. @end verbatim Example: The filter @verbatim GV*filter: *.ps *.pdf no .* @end verbatim screens out all files with names starting with a dot and keeps of the remaining ones only those which end on @file{.ps} or @file{.pdf}. It defaults to @code{no .*} @item filters Defines a list of filters offered in the @emph{Filters} menu of the file selection window. The filter @code{None} has a special meaning causing all files to be displayed when the corresponding menu entry is selected. @item miscMenuEntries Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are @itemize @item @code{update} @item @code{reload} @item @code{toggle_current} @item @code{toggle_even} @item @code{toggle_odd} @item @code{unmark} @item @code{stop} @item @code{print_all} @item @code{print_marked} @item @code{save_all} @item @code{save_marked} @item @code{line} @end itemize @item titleStyle Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to @code{True}. If this is @code{0}, no title will be shown. @code{1} means to show a the document title or the file name if there is no document title. Only the file name is shown with @code{2}. It defaults to @code{1}. @item maximumWidth, maximumHeight When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as @code{screen}, optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. @code{screen} will automatically be replaced by the size of the screen. @code{maximumWidth} defaults to @code{screen-20}. @code{maximumHeight} defaults to @code{screen-44}. @item minimumWidth, minimumHeight Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. @code{minimumWidth} defaults to @code{400}. @code{minimumHeight} defaults to @code{430}. @item scale Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the @emph{Scale} menu. It defaults to @code{0}. @item scaleBase Selects the initial scale base. The value of this resource should be a positive integer. It defaults to @code{1}. @item scales Defines the available scales bases and scales in the @emph{Scale} menu. @item orientation Sets the initial orientation. Valid values are @itemize @item @code{portrait} @item @code{landscape} @item @code{seascape} @item @code{upside-down} @item @code{automatic} @end itemize @code{automatic} causes gv to attempt to derive the correct orientation from document structuring comments. It defaults to @code{automatic}. @item fallbackOrientation Defines the paper-size to be used when automatic orientation detetction fails. Valid values are @code{portrait}, @code{landscape}, @code{seascape} and @code{upside-down}. It defaults to @code{portrait}. @item medias A list describing the page medias known to gv. List entries starting with @code{!} or @code{#} will not appear in the @emph{Media} menu but will still be used for automatic paper size detection. @item pageMedia Sets the paper size. Allowd values are as given in the above list of paper-sizes. Specifying @code{automatic} causes gv to attempt to derive the correct paper-size from document structuring comments. It defaults to @code{automatic}. @item fallbackPageMedia Defines the paper-size to be used when automatic paper-size detetction fails. Valid values are as given in the above list of paper-sizes. It defaults to @code{a4}. @item strings.* Variuos strings for translating GNU gv. @end table @node Mouse and key bindings, Comments about the user interface, Resources, Top @chapter Mouse and key bindings @menu * Mouse bindings in the Main and the Zoom window:: * Mouse bindings in the File Selection popup:: * Mouse bindings in the Table of Contents:: * Mouse bindings in the Panner widget:: * Mouse bindings in the << and >> button windows:: * Key Bindings:: @end menu @node Mouse bindings in the Main and the Zoom window, Mouse bindings in the File Selection popup, Mouse and key bindings, Mouse and key bindings @section Mouse bindings in the Main and the Zoom window The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: @table @strong @item press button 1, move mouse, release button 1 Scrolls the displayed page 'proportionally'. @item press button 3, move mouse, release button 3 Scrolls the displayed page 'absolutely'. @item double-click with button 1 In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. @item press button 2, release button 2 Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. @item press button 2, move mouse, release button 2 This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. @item press button 1, press button 2 Reload the current page. This event sequence works only in the main window. @item press button 3, release button 3 Pops up a small menu which offers a few standard actions like 'Reload', 'Mark Page', etc. @end table @node Mouse bindings in the File Selection popup, Mouse bindings in the Table of Contents, Mouse bindings in the Main and the Zoom window, Mouse and key bindings @section Mouse bindings in the File Selection popup The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: @table @strong @item press button 1, move mouse, release button 1 Scrolls a file or directory list 'proportionally'. @item press button 2, move mouse, release button 2 Scrolls a file or directory list 'absolutely'. @item press button 2, release button 2 Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. @item double-click with button 1 on a filename Selects the file and closes the File Selection popup. @item click with button 1 on a directory name Causes the contents of this directory to be displayed. @end table @node Mouse bindings in the Table of Contents, Mouse bindings in the Panner widget, Mouse bindings in the File Selection popup, Mouse and key bindings @section Mouse bindings in the Table of Contents The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): @table @strong @item press button 1, move mouse, release button 1 Scrolls the table of contents. @item press button 1 on a page number Go to this page. @item press button 2 on a page number Mark this page if it is unmarked, but unmark it if it is marked. @item press button 2, move mouse, release button 2 Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. @end table @node Mouse bindings in the Panner widget, Mouse bindings in the << and >> button windows, Mouse bindings in the Table of Contents, Mouse and key bindings @section Mouse bindings in the Panner widget The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. The following mouse events are defined when the mouse pointer is in this region: @table @strong @item press button 1, move mouse Scrolls the displayed page. @item press button 2 Display the previous page. @item press button 3 Display the next page. @end table @node Mouse bindings in the << and >> button windows, Key Bindings, Mouse bindings in the Panner widget, Mouse and key bindings @section Mouse bindings in the << and >> button windows The << and >> buttons are used to move to another page. The following mouse events are defined: @table @strong @item press button 1 Move 1 page forward/backwards. @item press button 2 Move 5 pages forward/backwards. @item press button 3 Move 10 pages forward/backwards. @end table @node Key Bindings, , Mouse bindings in the << and >> button windows, Mouse and key bindings @section Key Bindings The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. @menu * Notation:: * Miscellaneous keys:: * Orientation:: * Magnification:: * Navigating:: @end menu @node Notation, Miscellaneous keys, Key Bindings, Key Bindings @subsection Notation @table @key @item S-X means press @key{Shift} and key @key{X} @item C-X means press @key{Ctrl} and key @key{X} @item SC-X means press @key{Shift} or @key{Ctrl} and key @key{X} @end table @node Miscellaneous keys, Orientation, Notation, Key Bindings @subsection Miscellaneous keys: @table @key @item A Toggle antialiasing on and off @item O Open a new file @item Q Quit gv @item R Toggle gv's resizing behaviour @item I Respect/Ignore document structuring @item W Watch file / Don't watch file @item S Save the marked pages @item SC-S Save the current file @item P Print the marked pages @item C-P Print the current file @item S-P Switches to presentation mode by forking a new GNU gv process. @item c-L Reload the current page @item . Reload the current page @item SC-. Reopen the current file @item M Mark the current page @item N Unmark the current page @item Z append the current coordinate to a file whose name is given by the @code{GV.saveposFilename} resource. @item U enter a command with the current coordinate as its default parameter. By defalt it is % TODO @cite{\PutAtPos(x,y)()}, where x,y are the current coordinate and the user can put needed commands into (). This command is appended to a file whose name is given by the @code{GV.saveposFilename} resource. @end table @node Orientation, Magnification, Miscellaneous keys, Key Bindings @subsection Orientation @table @key @item 7 Orientation portrait @item 8 Orientation landscape @item 9 Orientation upside-down @item 0 Orientation seascape @end table @node Magnification, Navigating, Orientation, Key Bindings @subsection Magnification @table @key @item SC-6 Select the scale entry -6 relative to the scale 1.0 @item SC-5 Select the scale entry -5 relative to the scale 1.0 @item SC-4 Select the scale entry -4 relative to the scale 1.0 @item SC-3 Select the scale entry -3 relative to the scale 1.0 @item SC-2 Select the scale entry -2 relative to the scale 1.0 @item SC-1 Select the scale entry -1 relative to the scale 1.0 @item ^ Select the scale 1.0 (for german keyboard layout) @item ` Select the scale 1.0 @item 1 Select the scale entry 1 relative to the scale 1.0 @item 2 Select the scale entry 2 relative to the scale 1.0 @item 3 Select the scale entry 3 relative to the scale 1.0 @item 4 Select the scale entry 4 relative to the scale 1.0 @item 5 Select the scale entry 5 relative to the scale 1.0 @item 6 Select the scale entry 6 relative to the scale 1.0 @item + Select the next scale entry @item = Select the next scale entry @item - Select the previous scale entry @end table @node Navigating, , Magnification, Key Bindings @subsection Navigating @table @key @item Arrow Scroll in the direction of the arrow @item S-Up Scroll columns up or jump -1 pages @item S-Down Scroll columns down or jump 1 pages @item S-Left Scroll rows left or jump -1 pages @item S-Right Scroll rows right or jump 1 pages @item C-Up Jump -1 pages (to top/left corner) @item C-Down Jump 1 pages (to top/left corner) @item C-Left Jump -5 pages (to top/left corner) @item C-Right Jump 5 pages (to top/left corner) @item D Identical to arrow up @item X Identical to arrow down @item Z Identical to arrow left @item Y Identical to arrow left @item C Identical to arrow right @item V Center the page @item SC-Space Scroll columns up or jump -1 pages @item Space Scroll columns down or jump 1 pages @item BackSpace Scroll columns up or jump -1 pages @item Insert Jump -5 pages @item Delete Jump 5 pages @item Home Go to the first page @item End Go to the last page @item Prior Jump -1 pages @item Next Jump 1 pages @item Keypad 0-9 Highlight a page number @item Keypad - Highlight previous page number @item Keypad + Highlight next page number @item Keypad Enter Jump to the highlighted page @item C-Enter Scroll columns up @item S-Enter Scroll columns up @item Enter Scroll columns down @item B Jump -1 pages @item F Jump 1 pages @end table @node Comments about the user interface, Frequently asked questions, Mouse and key bindings, Top @chapter Comments about the user interface @menu * Scales:: * Scrolling:: * Displaying new versions of a document:: @end menu @node Scales, Scrolling, Comments about the user interface, Comments about the user interface @section Scales The @emph{Scale} menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. By default two scales bases are available, the @emph{Natural size} and the @emph{Pixel based} base. When choosing the @emph{Pixel based} scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. When viewing a document at a relative scale of 1.0 using the @emph{Natural size} base the page should appear in its real size, as if printed on paper. For the @emph{Natural size} base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource @verbatim GV.screenSize: x @end verbatim should be added to the @code{SCREEN_RESOURCES} property of the screen the document is viewed on, with @var{width} and @var{height} describing the width and height of the root window in units of millimeters. For instance by using the command @verbatim echo "GV.screenSize: 396 x 291" | xrdb -override -screen @end verbatim a width of 346 mm and a height of 291 mm will be used for the @emph{Natural size} scale base. Alternatively the resource @verbatim GV.screenSize___: x @end verbatim may be added to a resource file read by gv. Here @var{machine} ,@var{disp} and @var{ANGLED} describe the display on which gv displays the document. For instance, if the display is set to @code{tic.tac.toe.wo:0.1} the resource should be specified as @verbatim GV.screenSize_tic_0_1: 396 x 291 @end verbatim Note that this method doesn't work on VMS. As a last alternative the resource @verbatim GV.screenSize: x @end verbatim may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. @node Scrolling, Displaying new versions of a document, Scales, Comments about the user interface @section Scrolling It is probably a @emph{de facto} standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. Instead, in all windows with obscured data, scrolling may be performed by @quotation pressing button1, moving the mouse, then releasing button1 @end quotation directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. @node Displaying new versions of a document, , Scrolling, Comments about the user interface @section Displaying new versions of a document During document creation it is usually desirable to always display the newest version of the document in work. Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the @strong{Reload} button in the main window. Choosing the @strong{Reload} entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the @strong{State} menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line @verbatim kill -SIGHUP @end verbatim may be added (here @var{gv_pid} is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. @node Frequently asked questions, gv internals, Comments about the user interface, Top @chapter Frequently asked questions @menu * What happened to the scroll bars?:: * How can I make even more room for the image?:: * Small characters are not very clear:: * The output is not refreshed automatically:: @end menu @node What happened to the scroll bars?, How can I make even more room for the image?, Frequently asked questions, Frequently asked questions @section What happened to the scroll bars? They have been removed in order to make more room for the image. The displayed portion of the image may be moved by dragging the image or the paner (panel between the "Save Marked" and << >> buttons) with the mouse. Alternatively, the cursor arrow keys can be used. @node How can I make even more room for the image?, Small characters are not very clear, What happened to the scroll bars?, Frequently asked questions @section How can I make even more room for the image? Use the "spartan" style by starting gv with the command @verbatim gv --spartan @end verbatim This removes the "Open", "Print", "Save", "Reload", and page marking buttons (they are still available from the "File" and "Page" menus) and replaces them with the document attribute controls, which are normally along the top. @node Small characters are not very clear, The output is not refreshed automatically, How can I make even more room for the image?, Frequently asked questions @section Small characters are not very clear Antialiasing can improve the display of bitmapped fonts (eg. from TeX) when displayed on a colour or greyscale screen. The same technique is used by xdvi. Note that antialiasing requires at least Ghostscript version 4.x. Antialiasing can be turned on from the "State" menu, and can be made default by saving the setting in @code{State | gv Options...}. @node The output is not refreshed automatically, , Small characters are not very clear, Frequently asked questions @section The output is not refreshed automatically There are two methods that can be used to save the contents of the window when it's not currently displayed: backing store and backing pixmap. Some X-servers seem to support only backing store (eg. VAXstations) and some only backing pixmap (eg. some X-terminals, including EWS). In order to force gv to use one method or the other, use the @code{State | Setup Options ...} menu and toggle the "Backing Pixmap" button. When selected/highlighted (normally the default), gv will use backing pixmap; otherwise it will use backing store. Select "Apply" to use a new setting and "Save" to make it the new default. @node gv internals, GNU General Public License, Frequently asked questions, Top @chapter gv internals @menu * Interface with ghostscript:: * Comments recognized by ghostview:: * Paper Keywords and paper size in points:: @end menu @node Interface with ghostscript, Comments recognized by ghostview, gv internals, gv internals @section Interface with ghostscript @menu * Ghostview interface to ghostscript:: * Drawing on a Window:: * Drawing on a Pixmap:: * The GHOSTVIEW environment variable:: * The GHOSTVIEW property:: * Events from ghostscript:: @end menu @node Ghostview interface to ghostscript, Drawing on a Window, Interface with ghostscript, Interface with ghostscript @subsection Ghostview interface to ghostscript When the @code{GHOSTVIEW} environment variable is set, ghostscript draws on an existing drawable rather than creating its own window. Ghostscript can be directed to draw on either a window or a pixmap. @node Drawing on a Window, Drawing on a Pixmap, Ghostview interface to ghostscript, Interface with ghostscript @subsection Drawing on a Window The @code{GHOSTVIEW} environment variable contains the window id of the target window. The window id is an integer. Ghostscript will use the attributes of the window to obtain the width, height, colormap, screen, and visual of the window. The remainder of the information is gotten from the GHOSTVIEW property on that window. @node Drawing on a Pixmap, The GHOSTVIEW environment variable, Drawing on a Window, Interface with ghostscript @subsection Drawing on a Pixmap The GHOSTVIEW environment variable contains a window id and a pixmap id. They are integers separated by white space. Ghostscript will use the attributes of the window to obtain the colormap, screen, and visual to use. The width and height will be obtained from the pixmap. The remainder of the information, is gotten from the GHOSTVIEW property on the window. In this case, the property is deleted when read. @node The GHOSTVIEW environment variable, The GHOSTVIEW property, Drawing on a Pixmap, Interface with ghostscript @subsection The GHOSTVIEW environment variable @table @strong @item parameters @code{window-id [pixmap-id]} @item scanf format @code{"%d %d"} @end table Explanation of parameters: @table @code @item window-id tells ghostscript where to @itemize @item read the GHOSTVIEW property @item send events @end itemize If pixmap-id is not present, ghostscript will draw on this window. @item pixmap-id If present, tells ghostscript that a pixmap will be used as the final destination for drawing. The window will not be touched for drawing purposes. @end table @node The GHOSTVIEW property, Events from ghostscript, The GHOSTVIEW environment variable, Interface with ghostscript @subsection The GHOSTVIEW property @table @strong @item type STRING @item parameters @code{bpixmap orient llx lly urx ury xdpi ydpi [left bottom top right]} @item scanf format @code{"%d %d %d %d %d %d %f %f %d %d %d %d"} @end table Explanation of parameters: @table @code @item pixmap pixmap id of the backing pixmap for the window. If no pixmap is to be used, this parameter should be zero. This parameter must be zero when drawing on a pixmap. @item orient orientation of the page. The number represents clockwise rotation of the paper in degrees. Permitted values are 0, 90, 180, 270. @item llx, lly, urx, ury Bounding box of the drawable. The bounding box is specified in PostScript points in default user coordinates. @item xdpi, ydpi Resolution of window. (This can be derived from the other parameters, but not without roundoff error. These values are included to avoid this error.) @item left, bottom, top, right (optional) Margins around the window. The margins extend the imageable area beyond the boundaries of the window. This is primarily used for popup zoom windows. I have encountered several instances of PostScript programs that position themselves with respect to the imageable area. The margins are specified in PostScript points. If omitted, the margins are assumed to be 0. @end table @node Events from ghostscript, , The GHOSTVIEW property, Interface with ghostscript @subsection Events from ghostscript If the final destination is a pixmap, the client will get a property notify event when ghostscript reads the GHOSTVIEW property causing it to be deleted. Ghostscript sends events to the window where it read the GHOSTVIEW property. These events are of type ClientMessage. The message_type is set to either PAGE or DONE. The first long data value gives the window to be used to send replies to ghostscript. The second long data value gives the primary drawable. If rendering to a pixmap, it is the primary drawable. If rendering to a window, the backing pixmap is the primary drawable. If no backing pixmap is employed, then the window is the primary drawable. This field is necessary to distinguish multiple ghostscripts rendering to separate pixmaps where the GHOSTVIEW property was placed on the same window. The PAGE message indicates that a "page" has completed. Ghostscript will wait until it receives a ClientMessage whose message_type is NEXT before continuing. The DONE message indicates that ghostscript has finished processing. @node Comments recognized by ghostview, Paper Keywords and paper size in points, Interface with ghostscript, gv internals @section Comments recognized by ghostview @verbatim %!PS-Adobe- [EPSF-] %%BoundingBox: |(atend) %%CreationDate: %%Orientation: Portrait|Landscape|(atend) %%Pages: |(atend) %%PageOrder: Ascend|Descend|Special|(atend) %%Title: %%DocumentMedia: %%DocumentPageSizes: %%EndComments @end verbatim Preview section: @verbatim %%BeginPreview %%EndPreview @end verbatim Defaults section: @verbatim %%BeginDefaults %%PageBoundingBox: |(atend) %%PageOrientation: Portrait|Landscape %%PageMedia: %%EndDefaults @end verbatim Prolog section: @verbatim %%BeginProlog %%EndProlog @end verbatim Setup section: @verbatim %%BeginSetup %%PageBoundingBox: |(atend) %%PageOrientation: Portrait|Landscape %%PaperSize: %%EndSetup @end verbatim Page properties: @verbatim %%Page: %%PageBoundingBox: |(atend) %%PageOrientation: Portrait|Landscape %%PageMedia: %%PaperSize: @end verbatim @verbatim %%Trailer %%EOF @end verbatim Document section: @verbatim %%BeginDocument: [[]] %%EndDocument @end verbatim Binary section: @verbatim %%BeginBinary: %%EndBinary @end verbatim Data section: @verbatim %%BeginData: [Hex|Binary|ASCII[Bytes|Lines]] %%EndData @end verbatim @node Paper Keywords and paper size in points, , Comments recognized by ghostview, gv internals @section Paper Keywords and paper size in points @verbatim Letter 612x792 LetterSmall 612x792 Tabloid 792x1224 Ledger 1224x792 Legal 612x1008 Statement 396x612 Executive 540x720 A0 2384x3371 A1 1685x2384 A2 1190x1684 A3 842x1190 A4 595x842 A4Small 595x842 A5 420x595 B4 729x1032 B5 516x729 Envelope ???x??? Folio 612x936 Quarto 610x780 10x14 720x1008 @end verbatim @node GNU General Public License, , gv internals, Top @appendix GNU General Public License @include gpl.texi @c @node Index, , GNU General Public License, Top @c @unnumbered Index @printindex cp @bye gv-3.7.4/doc/stamp-vti0000664000076400007640000000013712121323370011503 00000000000000@set UPDATED 29 March 2012 @set UPDATED-MONTH March 2012 @set EDITION 3.7.4 @set VERSION 3.7.4 gv-3.7.4/doc/gv-update-userconfig.10000664000076400007640000000465111736070720013772 00000000000000.TH GV 1 "2008-07-31" "gv" "User Commands" .SH NAME gv\-update\-userconfig \- update ~/.gv config file .SH SYNOPSIS .B gv\-update\-userconfig [\fIfilename\fR] .SH DESCRIPTION .B gv\-update\-userconfig is a simple script to update an .B .gv config file to the current version of .BR gv (1). You can specify a file which is used instead of .B .gv by using the optional filename argument. This is useful if the environment variable XUSERSEARCHPATH is used. This is done by removing all entries known to cause problems with the current version of GNU gv (i.e. the one the version of this program belongs to) and updating the version information in that file. This resets all problematic items back to the default values. .TP \fB\-h\fR, \fB\-\-help\fR, \fB\-\-usage\fR displays a short help message .TP \fB\-r\fR removes all resources from \fI~\fP\fB/.gv\fP that equal the default resources being shipped with GNU gv (ignoring whitespaces). .TP \fB\-n\fR switches to alternative navigation by adding resp. updating navigation resources to \fI~\fP\fB/.gv\fP, i. e. after each page switch (except if selected by the page number) the page is scrolled to top (if switching forward) resp. to the bottom (if switching backward). .TP \fB\-N\fR switches to standard navigation by adding resp. updating navigation resources to \fI~\fP\fB/.gv\fP. .TP \fB\-s\fR removes navigation resources from \fI~\fP\fB/.gv\fP and therefore enables standard navigation. .TP \fB\-i\fR updates translation file. Using the optional filename parameter is strongly recommended for using this option. This option cannot be used together with any of the other options. .SH BACKGROUND The \fI$(HOME)\fP\fB/.gv\fP file is written by GNU gv when activating the \fBSave\fP button in one of the configuration dialogs. The values in there are used, if there is no display-specific resource value (loaded from \fI$(HOME)\fP\fB/.Xresources\fP at login time or manually \fBxrdb\fP(1)). Sometimes older values miss things needed by the new GNU gv to work properly. This GNU gv will notice old (or missing) version information in this file and refuse to start until fixed. .SH "SEE ALSO" .BR gv (1), .BR xrdb (1). .SH COPYRIGHT This manpage is Copyright \(co 2008 Bernhard R. Link and can be used, copied, distributed and/or modified without restrictions. .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. gv-3.7.4/doc/gv.info0000664000076400007640000025064412121323370011137 00000000000000Dies ist gv.info, hergestellt von Makeinfo Version 4.8 aus gv.texi. This is the First edition of the `GNU gv Manual', updated for gv version 3.7.4. Copyright (C) 1995, 1996, 1997 Johannes Plass Copyright (C) 2004 Jose' E. Marchesi Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or any later version published by the Free Software Foundation. INFO-DIR-SECTION Viewers START-INFO-DIR-ENTRY * gv: (gv). The GNU PostScript and PDF viewer. END-INFO-DIR-ENTRY  File: gv.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) GNU gv ****** GNU gv - View PostScript and PDF documents using ghostscript. This is the First edition of the `GNU gv Manual', updated for gv version 3.7.4. Copyright (C) 1995, 1996, 1997 Johannes Plass Copyright (C) 2004 Jose' E. Marchesi Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or any later version published by the Free Software Foundation. * Menu: * Introduction:: * Invoking gv:: * Resources:: * Mouse and key bindings:: * Comments about the user interface:: * Frequently asked questions:: * gv internals:: * GNU General Public License::  File: gv.info, Node: Introduction, Next: Invoking gv, Prev: Top, Up: Top 1 Introduction ************** GNU gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. Please note that gv is derived from Tim Theisen's ghostview.  File: gv.info, Node: Invoking gv, Next: Resources, Prev: Introduction, Up: Top 2 Invoking gv ************* Usage: gv [OPTION]... [FILE] PostScript and PDF viewer. [-]-monochrome display document using only black and white [-]-grayscale display document without colors [-]-color display document as usual [-]-safer start ghostscript in safe mode [-]-nosafer do not start ghostscript in safe mode [-]-safedir start ghostscript from a safe diretory [-]-nosafedir do not start ghostscript from a safe diretory [-]-quiet start ghostscript with the -dQUIET option [-]-noquiet do not start ghostscript with the -dQUIET option [-]-infoSilent do not show any messages in the info popup window [-]-infoErrors do not show warning messages in the info popup window [-]-infoAll do show all messages in the info popup window [-]-arguments=ARGS start ghostscript with additional options as specified by the string ARGS [-]-page=LABEL display the page with label LABEL first [-]-center the page should be centered automatically [-]-nocenter the page should not be centered automatically [-]-media=MEDIA selects the paper size to be used [-]-orientation=ORIENTATION sets the orientation of the page [-]-scale=N|f.f selects the scale N, or arbitrary scale f.f [-]-scalebase=N selects the scale base N [-]-swap interchange the meaning of the orientations landscape and seascape [-]-noswap do not interchange the meaning of the orientation landscape and seascape [-]-antialias use antialiasing [-]-noantialias do not use antialiasing [-]-dsc dsc comments are respected [-]-nodsc dsc comments are not respected [-]-eof ignore the postscript EOF comment while scanning documents [-]-noeof do not ignore the postscript EOF comment while scanning documents [-]-pixmap use backing pixmap [-]-nopixmap do not use backing pixmap [-]-watch watch the document file for changes [-]-nowatch do not watch the document file for changes [-]-help print a help message and exit [-]-usage print a usage message and exit [-]-resize fit the size of the window to the size of the page [-]-noresize do not fit the size of the window to the size of the page -geometry [][x][{+-}{+-}] [-]-ad=FILE read and use additional resources from FILE [-]-style=FILE read and use additional resources from FILE. These resources have lower priority than those provided on the context of --ad [-]-password=PASSWORD Sets the password for opening encrypted PDF files [-]-spartan shortcut for --style=gv_spartan.dat [-]-widgetless shortcut for --style=gv_widgetless.dat [-]-fullscreen start in fullscreen mode (needs support from WM) [-]-presentation Presentation mode (fullscreen, Fit to window, widgetless and no resizing of window) [-]-version show gv version and exit `FILE' The name of the file to be displayed. The file ending `.ps' may be omitted. FILE may point to a compressed file (gzipped, bzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. `--ad=FILE' Read and use additional resources from the file FILE. These resources have higher priority than those provided in the context of the `--style' option. `--antialias, --noantialias' Whether to use antialiasing. `--arguments=ARGS' Start ghostscrip with additional options as specified by the string ARGS. `--center, --nocenter' Whether the page should be centered automatically. `--dsc, --nodsc' Determines if _document structuring convention_ (DSC) comments should be respected or ignored. If `--nodsc' is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the _document structuring conventions_. `--eof, --noeof' Defines the behaviour of the postscript scanner used to examine the structure of the document. If `--noeof' is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If `--eof' is used, the scanner treats an EOF comment as marking the end of the file. `--fullscreen' Selects the fullscreen mode. `--infoSilent' Do not show any ghostscript messages in an info popup window. `--infoErrors' Only show error messages from ghostscript in an info popup window. `--infoAll' Shows all ghostscript messages in an info popup window. `--pixmap, --nopixmap' If `--pixmap' is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If `--nopixmap' is used the _X Server_ is responsible for maintaining obscured portions of the displayed page (see also the _useBackingPixmap_ resource). `--version' Print the version number of gv to standard output and exit. `--help, --usage' Display a short help message and exit. `--scale=N' N must be an integer or a positive float. In case N is an integer, N selects the scale entry N relative to the scale 1.0. With the special value of `-1000' Fit to page is selected, and likewise with the value of `-1001' Fit widthto page is selected. In case N is a float, N selects an arbitrary scale. `--scalebase N' Selects the scale base N. `--monochrome, --grayscale, --color' Sets the color palette to be used. `--media=MEDIA' Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the MEDIAS resource. `--page=LABEL' Display the page with label LABEL first. `--orientation=ORIENTATION' Sets the orientation. Valid values for ORIENTATION are `portrait', `landscape', `seascape' and `upsidedown'. `--quiet, --noquiet' Whether to start ghostscript with the `-dQUIET' option. `--resize, --noresize' Whether ghostscrip is allowed to automatically fit the size of its window to the size of the displayed page. `--password=PASSWORD' When opening a file, use PASSWORD to decrypt it. This Option is usefull for viewing encrypted PDF files. `--presentation' Is actually a shortcut for `--fullscreen --noresize --scale=-1000 --widgetless'. `--safer, --nosafer' Whether to start ghostscript in safer mode (that includes he `-dSAFER' option or the `-dDELAYSAFER' mode where appropriate) and the `-P-' option. `--safedir, --nosafedir' Whether to start ghostscript from a safe direcotry or not. `--spartan' This is a shortcut for `--style=gv_spartan.dat'. `--style=FILE' Read and use additional resources from the file FILE. These resources have lower priority than those provided in the context of the `--ad' option. `--swap, --noswap' Whether to interchange the meaning of the orientations landscape and seascape. `--watch, --nowatch' The `--watch' option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the _watchFileFrequency_ resource. Note that sending gv the *SIGHUP* signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. `--widgetless' This is a shortcut for `--style=gv_widgetless.dat'.  File: gv.info, Node: Resources, Next: Mouse and key bindings, Prev: Invoking gv, Up: Top 3 Resources *********** * Menu: * Resource files:: * Resources of gv::  File: gv.info, Node: Resource files, Next: Resources of gv, Prev: Resources, Up: Resources 3.1 Resource files ================== In general gv does not depend on any external resource files. However, when starting gv, preferences are read from *a system specific resource file.* The name of this file is GV and is installed on as part of gv's architecture independent library. Usually the library files are installed on `/usr/local/lib/gv'. Administrators may want to modify this file in order to set up gv according to the local needs of their system. *a user specific resource file.* The name of this file is either `~/.gv' or as described by the `XUSERFILESEARCHPATH' environment variable. The files `gv_user.ad' and `gv_system.ad' (located in the library directory of gv, which is most probably either `/usr/local/lib/gv/' or `/usr/lib/gv/') may serve as a basis for constructing the user and system specific resource files. Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important.  File: gv.info, Node: Resources of gv, Prev: Resource files, Up: Resources 3.2 Resources of gv =================== The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. *antialias* Whether antialiasing should be used. Valid values are `True' and `False'. It defaults to `True'. *autoCenter* Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are `True' and `False'. It defaults to `True'. *autoResize* Whether gv is allowed to resize the main window according to the size of the current page. Valid values are `True' and `False'. It defaults to `True'. *confirmPrint* Whether printing requires an extra confirmation. Valid values are `True' and `False'. It defaults to `True'. *confirmQuit* Whether leaving gv requires extra confirmation. Valid values are `0' (Never), `1' (When processing) and `2' (Always). The default value is `1', which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. *scrollingEyeGuide* If this resource is `True' scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are `True' and `False'. It defaults to `True'. *infoVerbose* Defines the behavior of the info popup which shows messages from ghostscript. Valid values are `Silent' (Never), `Errors' (show only errror messages) and `All' (Any message is being shown). It defaults to `Errors'. *xinerama* Defines whether the display resolution is determined by xinerama. Valid values are `On' (use Xinerama if available), `Off' (do not use Xinerama) and `Auto' (heuristically decide whether to use Xinerama or not). It defaults to `Auto'. *ignoreEOF* Defines the behaviour of the postscript scanner as described in the Options section. Valid values are `True' and `False'. It defaults to `True'. *respectDSC* Determines whether gv should attempt to respect document structuring comments. Valid values are `True' and `False'. It defaults to `True'. *reverseScrolling* Defines the interpretation of directions when scrolling with the mouse. Valid values are `True' and `False'. It defaults to `False'. *swapLandscape* Whether the meaning of `landscape' and `seacape' should be interchanged. Valid values are `True' and `False'. It defaults to `False'. *scratchDir* Specifies a directory used to store temporary data. It defaults to the invocation directory. *defaultSaveDir* Specifies the default destination directory for files to be saved. It defaults to the home directory, `~/'. *useBackingPixmap* If the value of this resource is `False' the _X Server_ is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the _X Server_. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is `True' the _X Server_ is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. It defaults to `True'. *watchFile* Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are `True' and `False'. It defaults to `False'. *watchFileFrequency* Defines the time in milliseconds elapsing between successive checks of the document when _watchFile_ is set to `True'. Allowed values must be larger than 500. It defaults to `1000'. *printCommand* The command used for printing a file. The command may contain multiple `%s' wildcards which will be replaced by the name of the file to be printed. It defaults to `lpr'. *saveposFilename* This file is used for saving positions by the `z' and `u' keys. It defaults to `~/gv.savepos'. *gsInterpreter* The command used to start the ghostscript interpreter. It defaults to `gv'. *gsCmdScanPDF* The command used to extract document structuring comments from a PDF file. It defaults to `gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit' *gsCmdConvPDF* The command used to convert a PDF file to PostScript. It defaults to `gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit' *gsX11Device* The ghostscript command line option which activates the _X11_ device. It defaults to `-sDEVICE=x11' *gsX11AlphaDevice* The ghostscript command line option which activates the _X11_ device with antialiasing enabled. It defaults to `-dNOPLATFONTS -sDEVICE=x11alpha' *gsSafeeDir* Determines whether ghostscript should be started from a safe directory. It defaults to `True'. *gsSafer* Determines whether ghostscript should be started with the `-dSAFER' command line option. It defaults to `True'. *gsQuiet* Determines whether ghostscript should be started with the `-dQUIET' command line option. It defaults to `True'. *gsArguments* May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the `-arguments ARGUMENTS' option will override this resource setting. It defaults to the empty string. *magMenu* Describes the menu that pops up when preparing to to zoom an area of the displayed page. *dirs* Defines a list of directories accessible via the `Directories' menu in the file selection window. The special value `Home' corresponds to the users home directory, the value `Tmp' corresponds to the scratch directory as defined by the *scratchDir* resource. It defaults to `Home Tmp /usr/doc /usr/local/doc' *filter* Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax := [] [no ] := [] := filename possibly including wildcards '*' which match any character. Example: The filter GV*filter: *.ps *.pdf no .* screens out all files with names starting with a dot and keeps of the remaining ones only those which end on `.ps' or `.pdf'. It defaults to `no .*' *filters* Defines a list of filters offered in the _Filters_ menu of the file selection window. The filter `None' has a special meaning causing all files to be displayed when the corresponding menu entry is selected. *miscMenuEntries* Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are * `update' * `reload' * `toggle_current' * `toggle_even' * `toggle_odd' * `unmark' * `stop' * `print_all' * `print_marked' * `save_all' * `save_marked' * `line' *titleStyle* Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to `True'. If this is `0', no title will be shown. `1' means to show a the document title or the file name if there is no document title. Only the file name is shown with `2'. It defaults to `1'. *maximumWidth, maximumHeight* When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as `screen', optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. `screen' will automatically be replaced by the size of the screen. `maximumWidth' defaults to `screen-20'. `maximumHeight' defaults to `screen-44'. *minimumWidth, minimumHeight* Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. `minimumWidth' defaults to `400'. `minimumHeight' defaults to `430'. *scale* Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the _Scale_ menu. It defaults to `0'. *scaleBase* Selects the initial scale base. The value of this resource should be a positive integer. It defaults to `1'. *scales* Defines the available scales bases and scales in the _Scale_ menu. *orientation* Sets the initial orientation. Valid values are * `portrait' * `landscape' * `seascape' * `upside-down' * `automatic' `automatic' causes gv to attempt to derive the correct orientation from document structuring comments. It defaults to `automatic'. *fallbackOrientation* Defines the paper-size to be used when automatic orientation detetction fails. Valid values are `portrait', `landscape', `seascape' and `upside-down'. It defaults to `portrait'. *medias* A list describing the page medias known to gv. List entries starting with `!' or `#' will not appear in the _Media_ menu but will still be used for automatic paper size detection. *pageMedia* Sets the paper size. Allowd values are as given in the above list of paper-sizes. Specifying `automatic' causes gv to attempt to derive the correct paper-size from document structuring comments. It defaults to `automatic'. *fallbackPageMedia* Defines the paper-size to be used when automatic paper-size detetction fails. Valid values are as given in the above list of paper-sizes. It defaults to `a4'. *strings.** Variuos strings for translating GNU gv.  File: gv.info, Node: Mouse and key bindings, Next: Comments about the user interface, Prev: Resources, Up: Top 4 Mouse and key bindings ************************ * Menu: * Mouse bindings in the Main and the Zoom window:: * Mouse bindings in the File Selection popup:: * Mouse bindings in the Table of Contents:: * Mouse bindings in the Panner widget:: * Mouse bindings in the << and >> button windows:: * Key Bindings::  File: gv.info, Node: Mouse bindings in the Main and the Zoom window, Next: Mouse bindings in the File Selection popup, Prev: Mouse and key bindings, Up: Mouse and key bindings 4.1 Mouse bindings in the Main and the Zoom window ================================================== The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: *press button 1, move mouse, release button 1* Scrolls the displayed page 'proportionally'. *press button 3, move mouse, release button 3* Scrolls the displayed page 'absolutely'. *double-click with button 1* In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. *press button 2, release button 2* Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. *press button 2, move mouse, release button 2* This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. *press button 1, press button 2* Reload the current page. This event sequence works only in the main window. *press button 3, release button 3* Pops up a small menu which offers a few standard actions like 'Reload', 'Mark Page', etc.  File: gv.info, Node: Mouse bindings in the File Selection popup, Next: Mouse bindings in the Table of Contents, Prev: Mouse bindings in the Main and the Zoom window, Up: Mouse and key bindings 4.2 Mouse bindings in the File Selection popup ============================================== The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: *press button 1, move mouse, release button 1* Scrolls a file or directory list 'proportionally'. *press button 2, move mouse, release button 2* Scrolls a file or directory list 'absolutely'. *press button 2, release button 2* Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. *double-click with button 1 on a filename* Selects the file and closes the File Selection popup. *click with button 1 on a directory name* Causes the contents of this directory to be displayed.  File: gv.info, Node: Mouse bindings in the Table of Contents, Next: Mouse bindings in the Panner widget, Prev: Mouse bindings in the File Selection popup, Up: Mouse and key bindings 4.3 Mouse bindings in the Table of Contents =========================================== The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): *press button 1, move mouse, release button 1* Scrolls the table of contents. *press button 1 on a page number* Go to this page. *press button 2 on a page number* Mark this page if it is unmarked, but unmark it if it is marked. *press button 2, move mouse, release button 2* Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement.  File: gv.info, Node: Mouse bindings in the Panner widget, Next: Mouse bindings in the << and >> button windows, Prev: Mouse bindings in the Table of Contents, Up: Mouse and key bindings 4.4 Mouse bindings in the Panner widget ======================================= The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. The following mouse events are defined when the mouse pointer is in this region: *press button 1, move mouse* Scrolls the displayed page. *press button 2* Display the previous page. *press button 3* Display the next page.  File: gv.info, Node: Mouse bindings in the << and >> button windows, Next: Key Bindings, Prev: Mouse bindings in the Panner widget, Up: Mouse and key bindings 4.5 Mouse bindings in the << and >> button windows ================================================== The << and >> buttons are used to move to another page. The following mouse events are defined: *press button 1* Move 1 page forward/backwards. *press button 2* Move 5 pages forward/backwards. *press button 3* Move 10 pages forward/backwards.  File: gv.info, Node: Key Bindings, Prev: Mouse bindings in the << and >> button windows, Up: Mouse and key bindings 4.6 Key Bindings ================ The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. * Menu: * Notation:: * Miscellaneous keys:: * Orientation:: * Magnification:: * Navigating::  File: gv.info, Node: Notation, Next: Miscellaneous keys, Prev: Key Bindings, Up: Key Bindings 4.6.1 Notation -------------- means press and key means press and key means press or and key  File: gv.info, Node: Miscellaneous keys, Next: Orientation, Prev: Notation, Up: Key Bindings 4.6.2 Miscellaneous keys: ------------------------- Toggle antialiasing on and off Open a new file Quit gv Toggle gv's resizing behaviour Respect/Ignore document structuring Watch file / Don't watch file Save the marked pages Save the current file

Print the marked pages Print the current file Switches to presentation mode by forking a new GNU gv process. Reload the current page <.> Reload the current page Reopen the current file Mark the current page Unmark the current page append the current coordinate to a file whose name is given by the `GV.saveposFilename' resource. enter a command with the current coordinate as its default parameter. By defalt it is % TODO `\PutAtPos(x,y)()', where x,y are the current coordinate and the user can put needed commands into (). This command is appended to a file whose name is given by the `GV.saveposFilename' resource.  File: gv.info, Node: Orientation, Next: Magnification, Prev: Miscellaneous keys, Up: Key Bindings 4.6.3 Orientation ----------------- <7> Orientation portrait <8> Orientation landscape <9> Orientation upside-down <0> Orientation seascape  File: gv.info, Node: Magnification, Next: Navigating, Prev: Orientation, Up: Key Bindings 4.6.4 Magnification ------------------- Select the scale entry -6 relative to the scale 1.0 Select the scale entry -5 relative to the scale 1.0 Select the scale entry -4 relative to the scale 1.0 Select the scale entry -3 relative to the scale 1.0 Select the scale entry -2 relative to the scale 1.0 Select the scale entry -1 relative to the scale 1.0 <^> Select the scale 1.0 (for german keyboard layout) <`> Select the scale 1.0 <1> Select the scale entry 1 relative to the scale 1.0 <2> Select the scale entry 2 relative to the scale 1.0 <3> Select the scale entry 3 relative to the scale 1.0 <4> Select the scale entry 4 relative to the scale 1.0 <5> Select the scale entry 5 relative to the scale 1.0 <6> Select the scale entry 6 relative to the scale 1.0 <+> Select the next scale entry <=> Select the next scale entry <-> Select the previous scale entry  File: gv.info, Node: Navigating, Prev: Magnification, Up: Key Bindings 4.6.5 Navigating ---------------- Scroll in the direction of the arrow Scroll columns up or jump -1 pages Scroll columns down or jump 1 pages Scroll rows left or jump -1 pages Scroll rows right or jump 1 pages Jump -1 pages (to top/left corner) Jump 1 pages (to top/left corner) Jump -5 pages (to top/left corner) Jump 5 pages (to top/left corner) Identical to arrow up Identical to arrow down Identical to arrow left Identical to arrow left Identical to arrow right Center the page Scroll columns up or jump -1 pages Scroll columns down or jump 1 pages Scroll columns up or jump -1 pages Jump -5 pages Jump 5 pages Go to the first page Go to the last page Jump -1 pages Jump 1 pages Highlight a page number Highlight previous page number Highlight next page number Jump to the highlighted page Scroll columns up Scroll columns up Scroll columns down Jump -1 pages Jump 1 pages  File: gv.info, Node: Comments about the user interface, Next: Frequently asked questions, Prev: Mouse and key bindings, Up: Top 5 Comments about the user interface *********************************** * Menu: * Scales:: * Scrolling:: * Displaying new versions of a document::  File: gv.info, Node: Scales, Next: Scrolling, Prev: Comments about the user interface, Up: Comments about the user interface 5.1 Scales ========== The _Scale_ menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. By default two scales bases are available, the _Natural size_ and the _Pixel based_ base. When choosing the _Pixel based_ scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. When viewing a document at a relative scale of 1.0 using the _Natural size_ base the page should appear in its real size, as if printed on paper. For the _Natural size_ base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource GV.screenSize: x should be added to the `SCREEN_RESOURCES' property of the screen the document is viewed on, with WIDTH and HEIGHT describing the width and height of the root window in units of millimeters. For instance by using the command echo "GV.screenSize: 396 x 291" | xrdb -override -screen a width of 346 mm and a height of 291 mm will be used for the _Natural size_ scale base. Alternatively the resource GV.screenSize___: x may be added to a resource file read by gv. Here MACHINE ,DISP and ANGLED describe the display on which gv displays the document. For instance, if the display is set to `tic.tac.toe.wo:0.1' the resource should be specified as GV.screenSize_tic_0_1: 396 x 291 Note that this method doesn't work on VMS. As a last alternative the resource GV.screenSize: x may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines.  File: gv.info, Node: Scrolling, Next: Displaying new versions of a document, Prev: Scales, Up: Comments about the user interface 5.2 Scrolling ============= It is probably a _de facto_ standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup.  File: gv.info, Node: Displaying new versions of a document, Prev: Scrolling, Up: Comments about the user interface 5.3 Displaying new versions of a document ========================================= During document creation it is usually desirable to always display the newest version of the document in work. Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the *Reload* button in the main window. Choosing the *Reload* entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the *State* menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line kill -SIGHUP may be added (here GV_PID is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems.  File: gv.info, Node: Frequently asked questions, Next: gv internals, Prev: Comments about the user interface, Up: Top 6 Frequently asked questions **************************** * Menu: * What happened to the scroll bars?:: * How can I make even more room for the image?:: * Small characters are not very clear:: * The output is not refreshed automatically::  File: gv.info, Node: What happened to the scroll bars?, Next: How can I make even more room for the image?, Prev: Frequently asked questions, Up: Frequently asked questions 6.1 What happened to the scroll bars? ===================================== They have been removed in order to make more room for the image. The displayed portion of the image may be moved by dragging the image or the paner (panel between the "Save Marked" and << >> buttons) with the mouse. Alternatively, the cursor arrow keys can be used.  File: gv.info, Node: How can I make even more room for the image?, Next: Small characters are not very clear, Prev: What happened to the scroll bars?, Up: Frequently asked questions 6.2 How can I make even more room for the image? ================================================ Use the "spartan" style by starting gv with the command gv --spartan This removes the "Open", "Print", "Save", "Reload", and page marking buttons (they are still available from the "File" and "Page" menus) and replaces them with the document attribute controls, which are normally along the top.  File: gv.info, Node: Small characters are not very clear, Next: The output is not refreshed automatically, Prev: How can I make even more room for the image?, Up: Frequently asked questions 6.3 Small characters are not very clear ======================================= Antialiasing can improve the display of bitmapped fonts (eg. from TeX) when displayed on a colour or greyscale screen. The same technique is used by xdvi. Note that antialiasing requires at least Ghostscript version 4.x. Antialiasing can be turned on from the "State" menu, and can be made default by saving the setting in `State | gv Options...'.  File: gv.info, Node: The output is not refreshed automatically, Prev: Small characters are not very clear, Up: Frequently asked questions 6.4 The output is not refreshed automatically ============================================= There are two methods that can be used to save the contents of the window when it's not currently displayed: backing store and backing pixmap. Some X-servers seem to support only backing store (eg. VAXstations) and some only backing pixmap (eg. some X-terminals, including EWS). In order to force gv to use one method or the other, use the `State | Setup Options ...' menu and toggle the "Backing Pixmap" button. When selected/highlighted (normally the default), gv will use backing pixmap; otherwise it will use backing store. Select "Apply" to use a new setting and "Save" to make it the new default.  File: gv.info, Node: gv internals, Next: GNU General Public License, Prev: Frequently asked questions, Up: Top 7 gv internals ************** * Menu: * Interface with ghostscript:: * Comments recognized by ghostview:: * Paper Keywords and paper size in points::  File: gv.info, Node: Interface with ghostscript, Next: Comments recognized by ghostview, Prev: gv internals, Up: gv internals 7.1 Interface with ghostscript ============================== * Menu: * Ghostview interface to ghostscript:: * Drawing on a Window:: * Drawing on a Pixmap:: * The GHOSTVIEW environment variable:: * The GHOSTVIEW property:: * Events from ghostscript::  File: gv.info, Node: Ghostview interface to ghostscript, Next: Drawing on a Window, Prev: Interface with ghostscript, Up: Interface with ghostscript 7.1.1 Ghostview interface to ghostscript ---------------------------------------- When the `GHOSTVIEW' environment variable is set, ghostscript draws on an existing drawable rather than creating its own window. Ghostscript can be directed to draw on either a window or a pixmap.  File: gv.info, Node: Drawing on a Window, Next: Drawing on a Pixmap, Prev: Ghostview interface to ghostscript, Up: Interface with ghostscript 7.1.2 Drawing on a Window ------------------------- The `GHOSTVIEW' environment variable contains the window id of the target window. The window id is an integer. Ghostscript will use the attributes of the window to obtain the width, height, colormap, screen, and visual of the window. The remainder of the information is gotten from the GHOSTVIEW property on that window.  File: gv.info, Node: Drawing on a Pixmap, Next: The GHOSTVIEW environment variable, Prev: Drawing on a Window, Up: Interface with ghostscript 7.1.3 Drawing on a Pixmap ------------------------- The GHOSTVIEW environment variable contains a window id and a pixmap id. They are integers separated by white space. Ghostscript will use the attributes of the window to obtain the colormap, screen, and visual to use. The width and height will be obtained from the pixmap. The remainder of the information, is gotten from the GHOSTVIEW property on the window. In this case, the property is deleted when read.  File: gv.info, Node: The GHOSTVIEW environment variable, Next: The GHOSTVIEW property, Prev: Drawing on a Pixmap, Up: Interface with ghostscript 7.1.4 The GHOSTVIEW environment variable ---------------------------------------- *parameters* `window-id [pixmap-id]' *scanf format* `"%d %d"' Explanation of parameters: `window-id' tells ghostscript where to * read the GHOSTVIEW property * send events If pixmap-id is not present, ghostscript will draw on this window. `pixmap-id' If present, tells ghostscript that a pixmap will be used as the final destination for drawing. The window will not be touched for drawing purposes.  File: gv.info, Node: The GHOSTVIEW property, Next: Events from ghostscript, Prev: The GHOSTVIEW environment variable, Up: Interface with ghostscript 7.1.5 The GHOSTVIEW property ---------------------------- *type* STRING *parameters* `bpixmap orient llx lly urx ury xdpi ydpi [left bottom top right]' *scanf format* `"%d %d %d %d %d %d %f %f %d %d %d %d"' Explanation of parameters: `pixmap' pixmap id of the backing pixmap for the window. If no pixmap is to be used, this parameter should be zero. This parameter must be zero when drawing on a pixmap. `orient' orientation of the page. The number represents clockwise rotation of the paper in degrees. Permitted values are 0, 90, 180, 270. `llx, lly, urx, ury' Bounding box of the drawable. The bounding box is specified in PostScript points in default user coordinates. `xdpi, ydpi' Resolution of window. (This can be derived from the other parameters, but not without roundoff error. These values are included to avoid this error.) `left, bottom, top, right (optional)' Margins around the window. The margins extend the imageable area beyond the boundaries of the window. This is primarily used for popup zoom windows. I have encountered several instances of PostScript programs that position themselves with respect to the imageable area. The margins are specified in PostScript points. If omitted, the margins are assumed to be 0.  File: gv.info, Node: Events from ghostscript, Prev: The GHOSTVIEW property, Up: Interface with ghostscript 7.1.6 Events from ghostscript ----------------------------- If the final destination is a pixmap, the client will get a property notify event when ghostscript reads the GHOSTVIEW property causing it to be deleted. Ghostscript sends events to the window where it read the GHOSTVIEW property. These events are of type ClientMessage. The message_type is set to either PAGE or DONE. The first long data value gives the window to be used to send replies to ghostscript. The second long data value gives the primary drawable. If rendering to a pixmap, it is the primary drawable. If rendering to a window, the backing pixmap is the primary drawable. If no backing pixmap is employed, then the window is the primary drawable. This field is necessary to distinguish multiple ghostscripts rendering to separate pixmaps where the GHOSTVIEW property was placed on the same window. The PAGE message indicates that a "page" has completed. Ghostscript will wait until it receives a ClientMessage whose message_type is NEXT before continuing. The DONE message indicates that ghostscript has finished processing.  File: gv.info, Node: Comments recognized by ghostview, Next: Paper Keywords and paper size in points, Prev: Interface with ghostscript, Up: gv internals 7.2 Comments recognized by ghostview ==================================== %!PS-Adobe- [EPSF-] %%BoundingBox: |(atend) %%CreationDate: %%Orientation: Portrait|Landscape|(atend) %%Pages: |(atend) %%PageOrder: Ascend|Descend|Special|(atend) %%Title: %%DocumentMedia: %%DocumentPageSizes: %%EndComments Preview section: %%BeginPreview %%EndPreview Defaults section: %%BeginDefaults %%PageBoundingBox: |(atend) %%PageOrientation: Portrait|Landscape %%PageMedia: %%EndDefaults Prolog section: %%BeginProlog %%EndProlog Setup section: %%BeginSetup %%PageBoundingBox: |(atend) %%PageOrientation: Portrait|Landscape %%PaperSize: %%EndSetup Page properties: %%Page: %%PageBoundingBox: |(atend) %%PageOrientation: Portrait|Landscape %%PageMedia: %%PaperSize: %%Trailer %%EOF Document section: %%BeginDocument: [[]] %%EndDocument Binary section: %%BeginBinary: %%EndBinary Data section: %%BeginData: [Hex|Binary|ASCII[Bytes|Lines]] %%EndData  File: gv.info, Node: Paper Keywords and paper size in points, Prev: Comments recognized by ghostview, Up: gv internals 7.3 Paper Keywords and paper size in points =========================================== Letter 612x792 LetterSmall 612x792 Tabloid 792x1224 Ledger 1224x792 Legal 612x1008 Statement 396x612 Executive 540x720 A0 2384x3371 A1 1685x2384 A2 1190x1684 A3 842x1190 A4 595x842 A4Small 595x842 A5 420x595 B4 729x1032 B5 516x729 Envelope ???x??? Folio 612x936 Quarto 610x780 10x14 720x1008  File: gv.info, Node: GNU General Public License, Prev: gv internals, Up: Top Anhang A GNU General Public License *********************************** Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. `http://fsf.org/' Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble ======== The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS ==================== 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a. The work must carry prominent notices stating that you modified it, and giving a relevant date. b. The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c. You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d. If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a. Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b. Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c. Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d. Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e. Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a. Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b. Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c. Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d. Limiting the use for publicity purposes of names of licensors or authors of the material; or e. Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f. Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS =========================== How to Apply These Terms to Your New Programs ============================================= If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES. Copyright (C) YEAR NAME OF AUTHOR This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see `http://www.gnu.org/licenses/'. Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: PROGRAM Copyright (C) YEAR NAME OF AUTHOR This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see `http://www.gnu.org/licenses/'. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read `http://www.gnu.org/philosophy/why-not-lgpl.html'. [index] * Menu:  Tag Table: Node: Top577 Node: Introduction1323 Node: Invoking gv1651 Node: Resources10675 Node: Resource files10845 Node: Resources of gv12014 Node: Mouse and key bindings22465 Node: Mouse bindings in the Main and the Zoom window22894 Node: Mouse bindings in the File Selection popup24485 Node: Mouse bindings in the Table of Contents25467 Node: Mouse bindings in the Panner widget26305 Node: Mouse bindings in the << and >> button windows27026 Node: Key Bindings27557 Node: Notation27934 Node: Miscellaneous keys28209 Node: Orientation29390 Node: Magnification29660 Node: Navigating30763 Node: Comments about the user interface32207 Node: Scales32492 Node: Scrolling34598 Node: Displaying new versions of a document35303 Node: Frequently asked questions36816 Node: What happened to the scroll bars?37183 Node: How can I make even more room for the image?37708 Node: Small characters are not very clear38308 Node: The output is not refreshed automatically38939 Node: gv internals39785 Node: Interface with ghostscript40056 Node: Ghostview interface to ghostscript40443 Node: Drawing on a Window40881 Node: Drawing on a Pixmap41407 Node: The GHOSTVIEW environment variable42022 Node: The GHOSTVIEW property42717 Node: Events from ghostscript44229 Node: Comments recognized by ghostview45462 Node: Paper Keywords and paper size in points46858 Node: GNU General Public License47423  End Tag Table gv-3.7.4/doc/Makefile.am0000664000076400007640000000102011735103745011674 00000000000000# Makefile.am for gv/doc/ # # Time-stamp: "2004-12-19 20:16:44 jemarch" # # Copyright (C) 2004 José E. Marchesi # File distribution EXTRA_DIST= gv.1 gv-update-userconfig.1 info_TEXINFOS = gv.texi gv_TEXINFOS = gpl.texi man_MANS = gv.1 gv-update-userconfig.1 $(srcdir)/gv.1: $(top_srcdir)/src/versionp.h $(top_srcdir)/src/gv_message.h help2man -n 'Postscript and PDF viewer' -o $(srcdir)/gv.1 ../src/gv # This hack allows building CVS without having to anable maintainer mode $(srcdir)/version.texi: $(srcdir)/stamp-vti gv-3.7.4/doc/gv.10000664000076400007640000000650112121323370010333 00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. .TH GV "1" "March 2013" "gv 3.7.4" "User Commands" .SH NAME gv \- Postscript and PDF viewer .SH SYNOPSIS .B gv [\fIOPTION\fR]... [\fIFILE\fR] .SH DESCRIPTION PostScript and PDF viewer. .TP [\-]\-monochrome display document using only black and white .TP [\-]\-grayscale display document without colors .TP [\-]\-color display document as usual .TP [\-]\-safer start ghostscript in safe mode .TP [\-]\-nosafer do not start ghostscript in safe mode .TP [\-]\-safedir start ghostscript from a safe diretory .TP [\-]\-nosafedir do not start ghostscript from a safe diretory .TP [\-]\-quiet start ghostscript with the \fB\-dQUIET\fR option .TP [\-]\-noquiet do not start ghostscript with the \fB\-dQUIET\fR option .TP [\-]\-infoSilent do not show any messages in the info popup window .TP [\-]\-infoErrors do not show warning messages in the info popup window .TP [\-]\-infoAll do show all messages in the info popup window .TP [\-]\-arguments=ARGS start ghostscript with additional options as specified by the string ARGS .TP [\-]\-page=LABEL display the page with label LABEL first .TP [\-]\-center the page should be centered automatically .TP [\-]\-nocenter the page should not be centered automatically .TP [\-]\-media=MEDIA selects the paper size to be used .TP [\-]\-orientation=ORIENTATION sets the orientation of the page .TP [\-]\-scale=N|f.f selects the scale N, or arbitrary scale f.f .TP [\-]\-scalebase=N selects the scale base N .TP [\-]\-swap interchange the meaning of the orientations landscape and seascape .TP [\-]\-noswap do not interchange the meaning of the orientation landscape and seascape .TP [\-]\-antialias use antialiasing .TP [\-]\-noantialias do not use antialiasing .TP [\-]\-dsc dsc comments are respected .TP [\-]\-nodsc dsc comments are not respected .TP [\-]\-eof ignore the postscript EOF comment while scanning documents .TP [\-]\-noeof do not ignore the postscript EOF comment while scanning documents .TP [\-]\-pixmap use backing pixmap .TP [\-]\-nopixmap do not use backing pixmap .TP [\-]\-watch watch the document file for changes .TP [\-]\-nowatch do not watch the document file for changes .TP [\-]\-help print a help message and exit .TP [\-]\-usage print a usage message and exit .TP [\-]\-resize fit the size of the window to the size of the page .TP [\-]\-noresize do not fit the size of the window to the size of the page .HP \fB\-geometry\fR [][x][{+\-}{+\-}] .TP [\-]\-ad=FILE read and use additional resources from FILE .TP [\-]\-style=FILE read and use additional resources from FILE. These resources have lower priority than those provided on the context of \fB\-\-ad\fR .TP [\-]\-password=PASSWORD Sets the password for opening encrypted PDF files .TP [\-]\-spartan shortcut for \fB\-\-style\fR=\fIgv_spartan\fR.dat .TP [\-]\-widgetless shortcut for \fB\-\-style\fR=\fIgv_widgetless\fR.dat .TP [\-]\-fullscreen start in fullscreen mode (needs support from WM) .TP [\-]\-presentation Presentation mode (fullscreen, Fit to window, widgetless and no resizing of window) .TP [\-]\-version show gv version and exit .SH "SEE ALSO" The full documentation for .B gv is maintained as a Texinfo manual. If the .B info and .B gv programs are properly installed at your site, the command .IP .B info gv .PP should give you access to the complete manual. gv-3.7.4/m4/0000775000076400007640000000000012121323370007466 500000000000000gv-3.7.4/m4/longlong.m40000664000076400007640000001120311735103745011500 00000000000000# longlong.m4 serial 16 dnl Copyright (C) 1999-2007, 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert. # Define HAVE_LONG_LONG_INT if 'long long int' works. # This fixes a bug in Autoconf 2.61, and can be faster # than what's in Autoconf 2.62 through 2.68. # Note: If the type 'long long int' exists but is only 32 bits large # (as on some very old compilers), HAVE_LONG_LONG_INT will not be # defined. In this case you can treat 'long long int' like 'long int'. AC_DEFUN([AC_TYPE_LONG_LONG_INT], [ AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], [ac_cv_type_long_long_int=yes if test "x${ac_cv_prog_cc_c99-no}" = xno; then ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int if test $ac_cv_type_long_long_int = yes; then dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. dnl If cross compiling, assume the bug is not important, since dnl nobody cross compiles for this platform as far as we know. AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[@%:@include @%:@ifndef LLONG_MAX @%:@ define HALF \ (1LL << (sizeof (long long int) * CHAR_BIT - 2)) @%:@ define LLONG_MAX (HALF - 1 + HALF) @%:@endif]], [[long long int n = 1; int i; for (i = 0; ; i++) { long long int m = n << i; if (m >> i != n) return 1; if (LLONG_MAX / 2 < m) break; } return 0;]])], [], [ac_cv_type_long_long_int=no], [:]) fi fi]) if test $ac_cv_type_long_long_int = yes; then AC_DEFINE([HAVE_LONG_LONG_INT], [1], [Define to 1 if the system has the type `long long int'.]) fi ]) # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. # This fixes a bug in Autoconf 2.61, and can be faster # than what's in Autoconf 2.62 through 2.68. # Note: If the type 'unsigned long long int' exists but is only 32 bits # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT # will not be defined. In this case you can treat 'unsigned long long int' # like 'unsigned long int'. AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], [ AC_CACHE_CHECK([for unsigned long long int], [ac_cv_type_unsigned_long_long_int], [ac_cv_type_unsigned_long_long_int=yes if test "x${ac_cv_prog_cc_c99-no}" = xno; then AC_LINK_IFELSE( [_AC_TYPE_LONG_LONG_SNIPPET], [], [ac_cv_type_unsigned_long_long_int=no]) fi]) if test $ac_cv_type_unsigned_long_long_int = yes; then AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], [Define to 1 if the system has the type `unsigned long long int'.]) fi ]) # Expands to a C program that can be used to test for simultaneous support # of 'long long' and 'unsigned long long'. We don't want to say that # 'long long' is available if 'unsigned long long' is not, or vice versa, # because too many programs rely on the symmetry between signed and unsigned # integer types (excluding 'bool'). AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], [ AC_LANG_PROGRAM( [[/* For now, do not test the preprocessor; as of 2007 there are too many implementations with broken preprocessors. Perhaps this can be revisited in 2012. In the meantime, code should not expect #if to work with literals wider than 32 bits. */ /* Test literals. */ long long int ll = 9223372036854775807ll; long long int nll = -9223372036854775807LL; unsigned long long int ull = 18446744073709551615ULL; /* Test constant expressions. */ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) ? 1 : -1)]; typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 ? 1 : -1)]; int i = 63;]], [[/* Test availability of runtime routines for shift and division. */ long long int llmax = 9223372036854775807ll; unsigned long long int ullmax = 18446744073709551615ull; return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | (llmax / ll) | (llmax % ll) | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | (ullmax / ull) | (ullmax % ull));]]) ]) gv-3.7.4/m4/inttypes-pri.m40000664000076400007640000000234511735103745012337 00000000000000# inttypes-pri.m4 serial 7 (gettext-0.18.2) dnl Copyright (C) 1997-2002, 2006, 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_PREREQ([2.53]) # Define PRI_MACROS_BROKEN if exists and defines the PRI* # macros to non-string values. This is the case on AIX 4.3.3. AC_DEFUN([gt_INTTYPES_PRI], [ AC_CHECK_HEADERS([inttypes.h]) if test $ac_cv_header_inttypes_h = yes; then AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], [gt_cv_inttypes_pri_broken], [ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ #include #ifdef PRId32 char *p = PRId32; #endif ]], [[]])], [gt_cv_inttypes_pri_broken=no], [gt_cv_inttypes_pri_broken=yes]) ]) fi if test "$gt_cv_inttypes_pri_broken" = yes; then AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], [1], [Define if exists and defines unusable PRI* macros.]) PRI_MACROS_BROKEN=1 else PRI_MACROS_BROKEN=0 fi AC_SUBST([PRI_MACROS_BROKEN]) ]) gv-3.7.4/m4/wchar_t.m40000664000076400007640000000146211735103745011316 00000000000000# wchar_t.m4 serial 4 (gettext-0.18.2) dnl Copyright (C) 2002-2003, 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Test whether has the 'wchar_t' type. dnl Prerequisite: AC_PROG_CC AC_DEFUN([gt_TYPE_WCHAR_T], [ AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include wchar_t foo = (wchar_t)'\0';]], [[]])], [gt_cv_c_wchar_t=yes], [gt_cv_c_wchar_t=no])]) if test $gt_cv_c_wchar_t = yes; then AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.]) fi ]) gv-3.7.4/m4/pathmax.m40000664000076400007640000000067111735103745011332 00000000000000# pathmax.m4 serial 8 dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_PATHMAX], [ dnl Prerequisites of lib/pathmax.h. AC_CHECK_FUNCS_ONCE([pathconf]) AC_CHECK_HEADERS_ONCE([sys/param.h]) ]) gv-3.7.4/m4/canonicalize.m40000664000076400007640000000565211735103745012333 00000000000000# canonicalize.m4 serial 17 dnl Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Provides canonicalize_file_name and canonicalize_filename_mode, but does # not provide or fix realpath. AC_DEFUN([gl_FUNC_CANONICALIZE_FILENAME_MODE], [ AC_LIBOBJ([canonicalize]) AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_CHECK_FUNCS_ONCE([canonicalize_file_name]) AC_REQUIRE([gl_DOUBLE_SLASH_ROOT]) AC_REQUIRE([gl_FUNC_REALPATH_WORKS]) if test $ac_cv_func_canonicalize_file_name = no; then HAVE_CANONICALIZE_FILE_NAME=0 elif test "$gl_cv_func_realpath_works" != yes; then REPLACE_CANONICALIZE_FILE_NAME=1 fi ]) # Provides canonicalize_file_name and realpath. AC_DEFUN([gl_CANONICALIZE_LGPL], [ AC_REQUIRE([gl_CANONICALIZE_LGPL_SEPARATE]) if test $ac_cv_func_canonicalize_file_name = no; then HAVE_CANONICALIZE_FILE_NAME=0 AC_LIBOBJ([canonicalize-lgpl]) if test $ac_cv_func_realpath = no; then HAVE_REALPATH=0 elif test "$gl_cv_func_realpath_works" != yes; then REPLACE_REALPATH=1 fi elif test "$gl_cv_func_realpath_works" != yes; then AC_LIBOBJ([canonicalize-lgpl]) REPLACE_REALPATH=1 REPLACE_CANONICALIZE_FILE_NAME=1 fi ]) # Like gl_CANONICALIZE_LGPL, except prepare for separate compilation # (no AC_LIBOBJ). AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE], [ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_CHECK_FUNCS_ONCE([canonicalize_file_name getcwd readlink]) AC_REQUIRE([gl_DOUBLE_SLASH_ROOT]) AC_REQUIRE([gl_FUNC_REALPATH_WORKS]) AC_CHECK_HEADERS_ONCE([sys/param.h]) ]) # Check whether realpath works. Assume that if a platform has both # realpath and canonicalize_file_name, but the former is broken, then # so is the latter. AC_DEFUN([gl_FUNC_REALPATH_WORKS], [ AC_CHECK_FUNCS_ONCE([realpath]) AC_CACHE_CHECK([whether realpath works], [gl_cv_func_realpath_works], [ touch conftest.a AC_RUN_IFELSE([ AC_LANG_PROGRAM([[ #include ]], [[ int result = 0; { char *name = realpath ("conftest.a", NULL); if (!(name && *name == '/')) result |= 1; } { char *name = realpath ("conftest.b/../conftest.a", NULL); if (name != NULL) result |= 2; } { char *name = realpath ("conftest.a/", NULL); if (name != NULL) result |= 4; } return result; ]]) ], [gl_cv_func_realpath_works=yes], [gl_cv_func_realpath_works=no], [gl_cv_func_realpath_works="guessing no"]) ]) if test "$gl_cv_func_realpath_works" = yes; then AC_DEFINE([FUNC_REALPATH_WORKS], [1], [Define to 1 if realpath() can malloc memory, always gives an absolute path, and handles trailing slash correctly.]) fi ]) gv-3.7.4/m4/double-slash-root.m40000664000076400007640000000312511735103745013230 00000000000000# double-slash-root.m4 serial 4 -*- Autoconf -*- dnl Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_DOUBLE_SLASH_ROOT], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_CACHE_CHECK([whether // is distinct from /], [gl_cv_double_slash_root], [ if test x"$cross_compiling" = xyes ; then # When cross-compiling, there is no way to tell whether // is special # short of a list of hosts. However, the only known hosts to date # that have a distinct // are Apollo DomainOS (too old to port to), # Cygwin, and z/OS. If anyone knows of another system for which // has # special semantics and is distinct from /, please report it to # . case $host in *-cygwin | i370-ibm-openedition) gl_cv_double_slash_root=yes ;; *) # Be optimistic and assume that / and // are the same when we # don't know. gl_cv_double_slash_root='unknown, assuming no' ;; esac else set x `ls -di / // 2>/dev/null` if test "$[2]" = "$[4]" && wc //dev/null >/dev/null 2>&1; then gl_cv_double_slash_root=no else gl_cv_double_slash_root=yes fi fi]) if test "$gl_cv_double_slash_root" = yes; then AC_DEFINE([DOUBLE_SLASH_IS_DISTINCT_ROOT], [1], [Define to 1 if // is a file system root distinct from /.]) fi ]) gv-3.7.4/m4/warn-on-use.m40000664000076400007640000000402711735103745012042 00000000000000# warn-on-use.m4 serial 2 dnl Copyright (C) 2010-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # gl_WARN_ON_USE_PREPARE(INCLUDES, NAMES) # --------------------------------------- # For each whitespace-separated element in the list of NAMES, define # HAVE_RAW_DECL_name if the function has a declaration among INCLUDES # even after being undefined as a macro. # # See warn-on-use.h for some hints on how to poison function names, as # well as ideas on poisoning global variables and macros. NAMES may # include global variables, but remember that only functions work with # _GL_WARN_ON_USE. Typically, INCLUDES only needs to list a single # header, but if the replacement header pulls in other headers because # some systems declare functions in the wrong header, then INCLUDES # should do likewise. # # If you assume C89, then it is generally safe to assume declarations # for functions declared in that standard (such as gets) without # needing gl_WARN_ON_USE_PREPARE. AC_DEFUN([gl_WARN_ON_USE_PREPARE], [ m4_foreach_w([gl_decl], [$2], [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])), [Define to 1 if ]m4_defn([gl_decl])[ is declared even after undefining macros.])])dnl for gl_func in m4_flatten([$2]); do AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl AC_CACHE_CHECK([whether $gl_func is declared without a macro], gl_Symbol, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1], [@%:@undef $gl_func (void) $gl_func;])], [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])]) AS_VAR_IF(gl_Symbol, [yes], [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1]) dnl shortcut - if the raw declaration exists, then set a cache dnl variable to allow skipping any later AC_CHECK_DECL efforts eval ac_cv_have_decl_$gl_func=yes]) AS_VAR_POPDEF([gl_Symbol])dnl done ]) gv-3.7.4/m4/gettimeofday.m40000664000076400007640000001034611735103745012351 00000000000000# serial 15 # Copyright (C) 2001-2003, 2005, 2007, 2009-2011 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. dnl From Jim Meyering. AC_DEFUN([gl_FUNC_GETTIMEOFDAY], [ AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_SYS_TIME_H]) AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([gettimeofday]) gl_gettimeofday_timezone=void if test $ac_cv_func_gettimeofday != yes; then HAVE_GETTIMEOFDAY=0 AC_LIBOBJ([gettimeofday]) gl_PREREQ_GETTIMEOFDAY else gl_FUNC_GETTIMEOFDAY_CLOBBER AC_CACHE_CHECK([for gettimeofday with POSIX signature], [gl_cv_func_gettimeofday_posix_signature], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include struct timeval c; int gettimeofday (struct timeval *restrict, void *restrict); ]], [[/* glibc uses struct timezone * rather than the POSIX void * if _GNU_SOURCE is defined. However, since the only portable use of gettimeofday uses NULL as the second parameter, and since the glibc definition is actually more typesafe, it is not worth wrapping this to get a compliant signature. */ int (*f) (struct timeval *restrict, void *restrict) = gettimeofday; int x = f (&c, 0); return !(x | c.tv_sec | c.tv_usec); ]])], [gl_cv_func_gettimeofday_posix_signature=yes], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include int gettimeofday (struct timeval *restrict, struct timezone *restrict); ]])], [gl_cv_func_gettimeofday_posix_signature=almost], [gl_cv_func_gettimeofday_posix_signature=no])])]) if test $gl_cv_func_gettimeofday_posix_signature = almost; then gl_gettimeofday_timezone='struct timezone' elif test $gl_cv_func_gettimeofday_posix_signature != yes; then REPLACE_GETTIMEOFDAY=1 AC_LIBOBJ([gettimeofday]) gl_PREREQ_GETTIMEOFDAY fi fi AC_DEFINE_UNQUOTED([GETTIMEOFDAY_TIMEZONE], [$gl_gettimeofday_timezone], [Define this to 'void' or 'struct timezone' to match the system's declaration of the second argument to gettimeofday.]) ]) dnl See if gettimeofday clobbers the static buffer that localtime uses dnl for its return value. The gettimeofday function from Mac OS X 10.0.4 dnl (i.e., Darwin 1.3.7) has this problem. dnl dnl If it does, then arrange to use gettimeofday and localtime only via dnl the wrapper functions that work around the problem. AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER], [ AC_REQUIRE([gl_HEADER_SYS_TIME_H]) AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer], [gl_cv_func_gettimeofday_clobber], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include #include #include #include ]], [[ time_t t = 0; struct tm *lt; struct tm saved_lt; struct timeval tv; lt = localtime (&t); saved_lt = *lt; gettimeofday (&tv, NULL); return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; ]])], [gl_cv_func_gettimeofday_clobber=no], [gl_cv_func_gettimeofday_clobber=yes], dnl When crosscompiling, assume it is broken. [gl_cv_func_gettimeofday_clobber=yes])]) if test $gl_cv_func_gettimeofday_clobber = yes; then REPLACE_GETTIMEOFDAY=1 gl_GETTIMEOFDAY_REPLACE_LOCALTIME AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1], [Define if gettimeofday clobbers the localtime buffer.]) fi ]) AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [ AC_LIBOBJ([gettimeofday]) gl_PREREQ_GETTIMEOFDAY AC_DEFINE([gmtime], [rpl_gmtime], [Define to rpl_gmtime if the replacement function should be used.]) AC_DEFINE([localtime], [rpl_localtime], [Define to rpl_localtime if the replacement function should be used.]) ]) # Prerequisites of lib/gettimeofday.c. AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [ AC_CHECK_HEADERS([sys/timeb.h]) AC_CHECK_FUNCS([_ftime]) ]) gv-3.7.4/m4/stat.m40000664000076400007640000000460411735103745010643 00000000000000# serial 7 # Copyright (C) 2009-2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STAT], [ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([lstat]) dnl mingw is the only known platform where stat(".") and stat("./") differ AC_CACHE_CHECK([whether stat handles trailing slashes on directories], [gl_cv_func_stat_dir_slash], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[struct stat st; return stat (".", &st) != stat ("./", &st);]])], [gl_cv_func_stat_dir_slash=yes], [gl_cv_func_stat_dir_slash=no], [case $host_os in mingw*) gl_cv_func_stat_dir_slash="guessing no";; *) gl_cv_func_stat_dir_slash="guessing yes";; esac])]) dnl AIX 7.1, Solaris 9 mistakenly succeed on stat("file/") dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/") AC_CACHE_CHECK([whether stat handles trailing slashes on files], [gl_cv_func_stat_file_slash], [touch conftest.tmp # Assume that if we have lstat, we can also check symlinks. if test $ac_cv_func_lstat = yes; then ln -s conftest.tmp conftest.lnk fi AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[int result = 0; struct stat st; if (!stat ("conftest.tmp/", &st)) result |= 1; #if HAVE_LSTAT if (!stat ("conftest.lnk/", &st)) result |= 2; #endif return result; ]])], [gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no], [gl_cv_func_stat_file_slash="guessing no"]) rm -f conftest.tmp conftest.lnk]) case $gl_cv_func_stat_dir_slash in *no) REPLACE_STAT=1 AC_DEFINE([REPLACE_FUNC_STAT_DIR], [1], [Define to 1 if stat needs help when passed a directory name with a trailing slash]);; esac case $gl_cv_func_stat_file_slash in *no) REPLACE_STAT=1 AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs help when passed a file name with a trailing slash]);; esac if test $REPLACE_STAT = 1; then AC_LIBOBJ([stat]) dnl Prerequisites of lib/stat.c. AC_REQUIRE([AC_C_INLINE]) fi ]) gv-3.7.4/m4/gnulib-common.m40000664000076400007640000002210611735103745012433 00000000000000# gnulib-common.m4 serial 24 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # gl_COMMON # is expanded unconditionally through gnulib-tool magic. AC_DEFUN([gl_COMMON], [ dnl Use AC_REQUIRE here, so that the code is expanded once only. AC_REQUIRE([gl_00GNULIB]) AC_REQUIRE([gl_COMMON_BODY]) ]) AC_DEFUN([gl_COMMON_BODY], [ AH_VERBATIM([isoc99_inline], [/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. __APPLE__ && __MACH__ test for MacOS X. __APPLE_CC__ tests for the Apple compiler and its version. __STDC_VERSION__ tests for the C99 mode. */ #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ # define __GNUC_STDC_INLINE__ 1 #endif]) AH_VERBATIM([unused_parameter], [/* Define as a marker that can be attached to declarations that might not be used. This helps to reduce warnings, such as from GCC -Wunused-parameter. */ #if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_UNUSED __attribute__ ((__unused__)) #else # define _GL_UNUSED #endif /* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name is a misnomer outside of parameter lists. */ #define _UNUSED_PARAMETER_ _GL_UNUSED ]) dnl Preparation for running test programs: dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not dnl to /dev/tty, so they can be redirected to log files. Such diagnostics dnl arise e.g., in the macros gl_PRINTF_DIRECTIVE_N, gl_SNPRINTF_DIRECTIVE_N. LIBC_FATAL_STDERR_=1 export LIBC_FATAL_STDERR_ ]) # gl_MODULE_INDICATOR_CONDITION # expands to a C preprocessor expression that evaluates to 1 or 0, depending # whether a gnulib module that has been requested shall be considered present # or not. AC_DEFUN([gl_MODULE_INDICATOR_CONDITION], [1]) # gl_MODULE_INDICATOR_SET_VARIABLE([modulename]) # sets the shell variable that indicates the presence of the given module to # a C preprocessor expression that will evaluate to 1. AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE], [ GNULIB_[]m4_translit([[$1]], [abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=gl_MODULE_INDICATOR_CONDITION ]) # gl_MODULE_INDICATOR([modulename]) # defines a C macro indicating the presence of the given module # in a location where it can be used. # | Value | Value | # | in lib/ | in tests/ | # --------------------------------------------+---------+-----------+ # Module present among main modules: | 1 | 1 | # --------------------------------------------+---------+-----------+ # Module present among tests-related modules: | 0 | 1 | # --------------------------------------------+---------+-----------+ # Module not present at all: | 0 | 0 | # --------------------------------------------+---------+-----------+ AC_DEFUN([gl_MODULE_INDICATOR], [ AC_DEFINE_UNQUOTED([GNULIB_]m4_translit([[$1]], [abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [gl_MODULE_INDICATOR_CONDITION], [Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module $1 shall be considered present.]) ]) # gl_MODULE_INDICATOR_FOR_TESTS([modulename]) # defines a C macro indicating the presence of the given module # in lib or tests. This is useful to determine whether the module # should be tested. # | Value | Value | # | in lib/ | in tests/ | # --------------------------------------------+---------+-----------+ # Module present among main modules: | 1 | 1 | # --------------------------------------------+---------+-----------+ # Module present among tests-related modules: | 1 | 1 | # --------------------------------------------+---------+-----------+ # Module not present at all: | 0 | 0 | # --------------------------------------------+---------+-----------+ AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], [ AC_DEFINE([GNULIB_TEST_]m4_translit([[$1]], [abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1], [Define to 1 when the gnulib module $1 should be tested.]) ]) # gl_ASSERT_NO_GNULIB_POSIXCHECK # asserts that there will never be a need to #define GNULIB_POSIXCHECK. # and thereby enables an optimization of configure and config.h. # Used by Emacs. AC_DEFUN([gl_ASSERT_NO_GNULIB_POSIXCHECK], [ dnl Override gl_WARN_ON_USE_PREPARE. dnl But hide this definition from 'aclocal'. AC_DEFUN([gl_W][ARN_ON_USE_PREPARE], []) ]) # gl_ASSERT_NO_GNULIB_TESTS # asserts that there will be no gnulib tests in the scope of the configure.ac # and thereby enables an optimization of config.h. # Used by Emacs. AC_DEFUN([gl_ASSERT_NO_GNULIB_TESTS], [ dnl Override gl_MODULE_INDICATOR_FOR_TESTS. AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], []) ]) # Test whether exists. # Set HAVE_FEATURES_H. AC_DEFUN([gl_FEATURES_H], [ AC_CHECK_HEADERS_ONCE([features.h]) if test $ac_cv_header_features_h = yes; then HAVE_FEATURES_H=1 else HAVE_FEATURES_H=0 fi AC_SUBST([HAVE_FEATURES_H]) ]) # m4_foreach_w # is a backport of autoconf-2.59c's m4_foreach_w. # Remove this macro when we can assume autoconf >= 2.60. m4_ifndef([m4_foreach_w], [m4_define([m4_foreach_w], [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])]) # AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH]) # ---------------------------------------------------- # Backport of autoconf-2.63b's macro. # Remove this macro when we can assume autoconf >= 2.64. m4_ifndef([AS_VAR_IF], [m4_define([AS_VAR_IF], [AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])]) # AC_PROG_MKDIR_P # is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix # for interoperability with automake-1.9.6 from autoconf-2.62. # Remove this macro when we can assume autoconf >= 2.62 or # autoconf >= 2.60 && automake >= 1.10. m4_ifdef([AC_PROG_MKDIR_P], [ dnl For automake-1.9.6 && autoconf < 2.62: Ensure MKDIR_P is AC_SUBSTed. m4_define([AC_PROG_MKDIR_P], m4_defn([AC_PROG_MKDIR_P])[ AC_SUBST([MKDIR_P])])], [ dnl For autoconf < 2.60: Backport of AC_PROG_MKDIR_P. AC_DEFUN_ONCE([AC_PROG_MKDIR_P], [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake MKDIR_P='$(mkdir_p)' AC_SUBST([MKDIR_P])])]) # AC_C_RESTRICT # This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61, # so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++ # works. # This definition can be removed once autoconf >= 2.62 can be assumed. m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.62]),[-1],[ AC_DEFUN([AC_C_RESTRICT], [AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict], [ac_cv_c_restrict=no # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[typedef int * int_ptr; int foo (int_ptr $ac_kw ip) { return ip[0]; }]], [[int s[1]; int * $ac_kw t = s; t[0] = 0; return foo(t)]])], [ac_cv_c_restrict=$ac_kw]) test "$ac_cv_c_restrict" != no && break done ]) AH_VERBATIM([restrict], [/* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict /* Work around a bug in Sun C++: it does not support _Restrict, even though the corresponding Sun C compiler does, which causes "#define restrict _Restrict" in the previous line. Perhaps some future version of Sun C++ will work with _Restrict; if so, it'll probably define __RESTRICT, just as Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict #endif]) case $ac_cv_c_restrict in restrict) ;; no) AC_DEFINE([restrict], []) ;; *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;; esac ]) ]) # gl_BIGENDIAN # is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd. # Note that AC_REQUIRE([AC_C_BIGENDIAN]) does not work reliably because some # macros invoke AC_C_BIGENDIAN with arguments. AC_DEFUN([gl_BIGENDIAN], [ AC_C_BIGENDIAN ]) # gl_CACHE_VAL_SILENT(cache-id, command-to-set-it) # is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not # output a spurious "(cached)" mark in the midst of other configure output. # This macro should be used instead of AC_CACHE_VAL when it is not surrounded # by an AC_MSG_CHECKING/AC_MSG_RESULT pair. AC_DEFUN([gl_CACHE_VAL_SILENT], [ saved_as_echo_n="$as_echo_n" as_echo_n=':' AC_CACHE_VAL([$1], [$2]) as_echo_n="$saved_as_echo_n" ]) gv-3.7.4/m4/inttypes.m40000664000076400007640000001361211735103745011546 00000000000000# inttypes.m4 serial 23 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Derek Price, Bruno Haible. dnl Test whether is supported or must be substituted. AC_DEFUN([gl_INTTYPES_H], [ AC_REQUIRE([gl_INTTYPES_INCOMPLETE]) gl_INTTYPES_PRI_SCN ]) AC_DEFUN([gl_INTTYPES_INCOMPLETE], [ AC_REQUIRE([gl_STDINT_H]) AC_CHECK_HEADERS_ONCE([inttypes.h]) dnl Override always, so that the portability warnings work. AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([inttypes.h]) AC_REQUIRE([gl_MULTIARCH]) dnl Ensure that defines the limit macros, since gnulib's dnl relies on them. This macro is only needed when a dnl C++ compiler is in use; it has no effect for a C compiler. dnl Also be careful to define __STDC_LIMIT_MACROS only when gnulib's dnl is going to be created, and to avoid redefinition warnings dnl if the __STDC_LIMIT_MACROS is already defined through the CPPFLAGS. AC_DEFINE([GL_TRIGGER_STDC_LIMIT_MACROS], [1], [Define to make the limit macros in visible.]) AH_VERBATIM([__STDC_LIMIT_MACROS_ZZZ], [/* Ensure that defines the limit macros, since gnulib's relies on them. */ #if defined __cplusplus && !defined __STDC_LIMIT_MACROS && GL_TRIGGER_STDC_LIMIT_MACROS # define __STDC_LIMIT_MACROS 1 #endif ]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include ]], [imaxabs imaxdiv strtoimax strtoumax]) ]) # Ensure that the PRI* and SCN* macros are defined appropriately. AC_DEFUN([gl_INTTYPES_PRI_SCN], [ AC_REQUIRE([gt_INTTYPES_PRI]) PRIPTR_PREFIX= if test -n "$STDINT_H"; then dnl Using the gnulib . It always defines intptr_t to 'long'. PRIPTR_PREFIX='"l"' else dnl Using the system's . for glpfx in '' l ll I64; do case $glpfx in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; I64) gltype1='__int64';; esac AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include extern intptr_t foo; extern $gltype1 foo;]])], [PRIPTR_PREFIX='"'$glpfx'"']) test -n "$PRIPTR_PREFIX" && break done fi AC_SUBST([PRIPTR_PREFIX]) gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( [INT32_MAX_LT_INTMAX_MAX], [defined INT32_MAX && defined INTMAX_MAX], [INT32_MAX < INTMAX_MAX], [sizeof (int) < sizeof (long long int)]) if test $APPLE_UNIVERSAL_BUILD = 0; then gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( [INT64_MAX_EQ_LONG_MAX], [defined INT64_MAX], [INT64_MAX == LONG_MAX], [sizeof (long long int) == sizeof (long int)]) else INT64_MAX_EQ_LONG_MAX=-1 fi gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( [UINT32_MAX_LT_UINTMAX_MAX], [defined UINT32_MAX && defined UINTMAX_MAX], [UINT32_MAX < UINTMAX_MAX], [sizeof (unsigned int) < sizeof (unsigned long long int)]) if test $APPLE_UNIVERSAL_BUILD = 0; then gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( [UINT64_MAX_EQ_ULONG_MAX], [defined UINT64_MAX], [UINT64_MAX == ULONG_MAX], [sizeof (unsigned long long int) == sizeof (unsigned long int)]) else UINT64_MAX_EQ_ULONG_MAX=-1 fi ]) # Define the symbol $1 to be 1 if the condition is true, 0 otherwise. # If $2 is true, the condition is $3; otherwise if long long int is supported # approximate the condition with $4; otherwise, assume the condition is false. # The condition should work on all C99 platforms; the approximations should be # good enough to work on all practical pre-C99 platforms. # $2 is evaluated by the C preprocessor, $3 and $4 as compile-time constants. AC_DEFUN([gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION], [ AC_CACHE_CHECK([whether $3], [gl_cv_test_$1], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[/* Work also in C++ mode. */ #define __STDC_LIMIT_MACROS 1 /* Work if build is not clean. */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H #include #if HAVE_STDINT_H #include #endif #if $2 #define CONDITION ($3) #elif HAVE_LONG_LONG_INT #define CONDITION ($4) #else #define CONDITION 0 #endif int test[CONDITION ? 1 : -1];]])], [gl_cv_test_$1=yes], [gl_cv_test_$1=no])]) if test $gl_cv_test_$1 = yes; then $1=1; else $1=0; fi AC_SUBST([$1]) ]) AC_DEFUN([gl_INTTYPES_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) ]) AC_DEFUN([gl_INTTYPES_H_DEFAULTS], [ GNULIB_IMAXABS=0; AC_SUBST([GNULIB_IMAXABS]) GNULIB_IMAXDIV=0; AC_SUBST([GNULIB_IMAXDIV]) GNULIB_STRTOIMAX=0; AC_SUBST([GNULIB_STRTOIMAX]) GNULIB_STRTOUMAX=0; AC_SUBST([GNULIB_STRTOUMAX]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_IMAXABS=1; AC_SUBST([HAVE_DECL_IMAXABS]) HAVE_DECL_IMAXDIV=1; AC_SUBST([HAVE_DECL_IMAXDIV]) HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX]) HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX]) INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX]) INT64_MAX_EQ_LONG_MAX='defined _LP64'; AC_SUBST([INT64_MAX_EQ_LONG_MAX]) PRI_MACROS_BROKEN=0; AC_SUBST([PRI_MACROS_BROKEN]) PRIPTR_PREFIX=__PRIPTR_PREFIX; AC_SUBST([PRIPTR_PREFIX]) UINT32_MAX_LT_UINTMAX_MAX=1; AC_SUBST([UINT32_MAX_LT_UINTMAX_MAX]) UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; AC_SUBST([UINT64_MAX_EQ_ULONG_MAX]) ]) gv-3.7.4/m4/lstat.m40000664000076400007640000000513411735103745011016 00000000000000# serial 21 # Copyright (C) 1997-2001, 2003-2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. dnl From Jim Meyering. AC_DEFUN([gl_FUNC_LSTAT], [ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) dnl If lstat does not exist, the replacement does dnl "#define lstat stat", and lstat.c is a no-op. AC_CHECK_FUNCS_ONCE([lstat]) if test $ac_cv_func_lstat = yes; then AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then dnl Note: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK does AC_LIBOBJ([lstat]). REPLACE_LSTAT=1 fi # Prerequisites of lib/lstat.c. AC_REQUIRE([AC_C_INLINE]) else HAVE_LSTAT=0 fi ]) # Redefine AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, because it is no longer # maintained in Autoconf. AC_DEFUN([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK], [ AC_CACHE_CHECK([whether lstat correctly handles trailing slash], [ac_cv_func_lstat_dereferences_slashed_symlink], [rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then AC_RUN_IFELSE( [AC_LANG_PROGRAM( [AC_INCLUDES_DEFAULT], [[struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ]])], [ac_cv_func_lstat_dereferences_slashed_symlink=yes], [ac_cv_func_lstat_dereferences_slashed_symlink=no], [# When cross-compiling, be pessimistic so we will end up using the # replacement version of lstat that checks for trailing slashes and # calls lstat a second time when necessary. ac_cv_func_lstat_dereferences_slashed_symlink=no ]) else # If the 'ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file ]) test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && AC_DEFINE_UNQUOTED([LSTAT_FOLLOWS_SLASHED_SYMLINK], [1], [Define to 1 if `lstat' dereferences a symlink specified with a trailing slash.]) if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then AC_LIBOBJ([lstat]) fi ]) gv-3.7.4/m4/signal_h.m40000664000076400007640000000433311735103745011453 00000000000000# signal_h.m4 serial 12 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_SIGNAL_H], [ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) gl_NEXT_HEADERS([signal.h]) # AIX declares sig_atomic_t to already include volatile, and C89 compilers # then choke on 'volatile sig_atomic_t'. C99 requires that it compile. AC_CHECK_TYPE([volatile sig_atomic_t], [], [HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0], [[ #include ]]) AC_REQUIRE([AC_TYPE_UID_T]) dnl Persuade glibc to define sighandler_t. AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_CHECK_TYPE([sighandler_t], [], [HAVE_SIGHANDLER_T=0], [[ #include ]]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include ]], [sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask]) ]) AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_SIGNAL_H_DEFAULTS], [ GNULIB_SIGNAL_H_SIGPIPE=0; AC_SUBST([GNULIB_SIGNAL_H_SIGPIPE]) GNULIB_SIGPROCMASK=0; AC_SUBST([GNULIB_SIGPROCMASK]) GNULIB_SIGACTION=0; AC_SUBST([GNULIB_SIGACTION]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_POSIX_SIGNALBLOCKING=1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING]) HAVE_SIGSET_T=1; AC_SUBST([HAVE_SIGSET_T]) HAVE_SIGINFO_T=1; AC_SUBST([HAVE_SIGINFO_T]) HAVE_SIGACTION=1; AC_SUBST([HAVE_SIGACTION]) HAVE_STRUCT_SIGACTION_SA_SIGACTION=1; AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION]) HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1; AC_SUBST([HAVE_TYPE_VOLATILE_SIG_ATOMIC_T]) HAVE_SIGHANDLER_T=1; AC_SUBST([HAVE_SIGHANDLER_T]) ]) gv-3.7.4/m4/sys_time_h.m40000664000076400007640000000443611735103745012036 00000000000000# Configure a replacement for . # serial 6 # Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Written by Paul Eggert and Martin Lambers. AC_DEFUN([gl_HEADER_SYS_TIME_H], [ dnl Use AC_REQUIRE here, so that the REPLACE_GETTIMEOFDAY=0 statement dnl below is expanded once only, before all REPLACE_GETTIMEOFDAY=1 dnl statements that occur in other macros. AC_REQUIRE([gl_HEADER_SYS_TIME_H_BODY]) ]) AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY], [ AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) AC_CHECK_HEADERS_ONCE([sys/time.h]) gl_CHECK_NEXT_HEADERS([sys/time.h]) if test $ac_cv_header_sys_time_h != yes; then HAVE_SYS_TIME_H=0 fi AC_CACHE_CHECK([for struct timeval], [gl_cv_sys_struct_timeval], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#if HAVE_SYS_TIME_H #include #endif #include ]], [[static struct timeval x; x.tv_sec = x.tv_usec;]])], [gl_cv_sys_struct_timeval=yes], [gl_cv_sys_struct_timeval=no])]) if test $gl_cv_sys_struct_timeval != yes; then HAVE_STRUCT_TIMEVAL=0 fi dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[ #if HAVE_SYS_TIME_H # include #endif #include ]], [gettimeofday]) ]) AC_DEFUN([gl_SYS_TIME_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_HEADER_SYS_TIME_H_DEFAULTS], [ GNULIB_GETTIMEOFDAY=0; AC_SUBST([GNULIB_GETTIMEOFDAY]) dnl Assume POSIX behavior unless another module says otherwise. HAVE_GETTIMEOFDAY=1; AC_SUBST([HAVE_GETTIMEOFDAY]) HAVE_STRUCT_TIMEVAL=1; AC_SUBST([HAVE_STRUCT_TIMEVAL]) HAVE_SYS_TIME_H=1; AC_SUBST([HAVE_SYS_TIME_H]) REPLACE_GETTIMEOFDAY=0; AC_SUBST([REPLACE_GETTIMEOFDAY]) ]) gv-3.7.4/m4/stdint.m40000664000076400007640000003671411735103745011204 00000000000000# stdint.m4 serial 40 dnl Copyright (C) 2001-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert and Bruno Haible. dnl Test whether is supported or must be substituted. AC_DEFUN([gl_STDINT_H], [ AC_PREREQ([2.59])dnl dnl Check for long long int and unsigned long long int. AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) if test $ac_cv_type_long_long_int = yes; then HAVE_LONG_LONG_INT=1 else HAVE_LONG_LONG_INT=0 fi AC_SUBST([HAVE_LONG_LONG_INT]) AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) if test $ac_cv_type_unsigned_long_long_int = yes; then HAVE_UNSIGNED_LONG_LONG_INT=1 else HAVE_UNSIGNED_LONG_LONG_INT=0 fi AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT]) dnl Check for , in the same way as gl_WCHAR_H does. AC_CHECK_HEADERS_ONCE([wchar.h]) if test $ac_cv_header_wchar_h = yes; then HAVE_WCHAR_H=1 else HAVE_WCHAR_H=0 fi AC_SUBST([HAVE_WCHAR_H]) dnl Check for . dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h. if test $ac_cv_header_inttypes_h = yes; then HAVE_INTTYPES_H=1 else HAVE_INTTYPES_H=0 fi AC_SUBST([HAVE_INTTYPES_H]) dnl Check for . dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_sys_types_h. if test $ac_cv_header_sys_types_h = yes; then HAVE_SYS_TYPES_H=1 else HAVE_SYS_TYPES_H=0 fi AC_SUBST([HAVE_SYS_TYPES_H]) gl_CHECK_NEXT_HEADERS([stdint.h]) if test $ac_cv_header_stdint_h = yes; then HAVE_STDINT_H=1 else HAVE_STDINT_H=0 fi AC_SUBST([HAVE_STDINT_H]) dnl Now see whether we need a substitute . if test $ac_cv_header_stdint_h = yes; then AC_CACHE_CHECK([whether stdint.h conforms to C99], [gl_cv_header_working_stdint_h], [gl_cv_header_working_stdint_h=no AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ #if !(defined WCHAR_MIN && defined WCHAR_MAX) #error "WCHAR_MIN, WCHAR_MAX not defined in " #endif ] gl_STDINT_INCLUDES [ #ifdef INT8_MAX int8_t a1 = INT8_MAX; int8_t a1min = INT8_MIN; #endif #ifdef INT16_MAX int16_t a2 = INT16_MAX; int16_t a2min = INT16_MIN; #endif #ifdef INT32_MAX int32_t a3 = INT32_MAX; int32_t a3min = INT32_MIN; #endif #ifdef INT64_MAX int64_t a4 = INT64_MAX; int64_t a4min = INT64_MIN; #endif #ifdef UINT8_MAX uint8_t b1 = UINT8_MAX; #else typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; #endif #ifdef UINT16_MAX uint16_t b2 = UINT16_MAX; #endif #ifdef UINT32_MAX uint32_t b3 = UINT32_MAX; #endif #ifdef UINT64_MAX uint64_t b4 = UINT64_MAX; #endif int_least8_t c1 = INT8_C (0x7f); int_least8_t c1max = INT_LEAST8_MAX; int_least8_t c1min = INT_LEAST8_MIN; int_least16_t c2 = INT16_C (0x7fff); int_least16_t c2max = INT_LEAST16_MAX; int_least16_t c2min = INT_LEAST16_MIN; int_least32_t c3 = INT32_C (0x7fffffff); int_least32_t c3max = INT_LEAST32_MAX; int_least32_t c3min = INT_LEAST32_MIN; int_least64_t c4 = INT64_C (0x7fffffffffffffff); int_least64_t c4max = INT_LEAST64_MAX; int_least64_t c4min = INT_LEAST64_MIN; uint_least8_t d1 = UINT8_C (0xff); uint_least8_t d1max = UINT_LEAST8_MAX; uint_least16_t d2 = UINT16_C (0xffff); uint_least16_t d2max = UINT_LEAST16_MAX; uint_least32_t d3 = UINT32_C (0xffffffff); uint_least32_t d3max = UINT_LEAST32_MAX; uint_least64_t d4 = UINT64_C (0xffffffffffffffff); uint_least64_t d4max = UINT_LEAST64_MAX; int_fast8_t e1 = INT_FAST8_MAX; int_fast8_t e1min = INT_FAST8_MIN; int_fast16_t e2 = INT_FAST16_MAX; int_fast16_t e2min = INT_FAST16_MIN; int_fast32_t e3 = INT_FAST32_MAX; int_fast32_t e3min = INT_FAST32_MIN; int_fast64_t e4 = INT_FAST64_MAX; int_fast64_t e4min = INT_FAST64_MIN; uint_fast8_t f1 = UINT_FAST8_MAX; uint_fast16_t f2 = UINT_FAST16_MAX; uint_fast32_t f3 = UINT_FAST32_MAX; uint_fast64_t f4 = UINT_FAST64_MAX; #ifdef INTPTR_MAX intptr_t g = INTPTR_MAX; intptr_t gmin = INTPTR_MIN; #endif #ifdef UINTPTR_MAX uintptr_t h = UINTPTR_MAX; #endif intmax_t i = INTMAX_MAX; uintmax_t j = UINTMAX_MAX; #include /* for CHAR_BIT */ #define TYPE_MINIMUM(t) \ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) #define TYPE_MAXIMUM(t) \ ((t) ((t) 0 < (t) -1 \ ? (t) -1 \ : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) struct s { int check_PTRDIFF: PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) ? 1 : -1; /* Detect bug in FreeBSD 6.0 / ia64. */ int check_SIG_ATOMIC: SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) ? 1 : -1; int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; int check_WCHAR: WCHAR_MIN == TYPE_MINIMUM (wchar_t) && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) ? 1 : -1; /* Detect bug in mingw. */ int check_WINT: WINT_MIN == TYPE_MINIMUM (wint_t) && WINT_MAX == TYPE_MAXIMUM (wint_t) ? 1 : -1; /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ int check_UINT8_C: (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; int check_UINT16_C: (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; /* Detect bugs in OpenBSD 3.9 stdint.h. */ #ifdef UINT8_MAX int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; #endif #ifdef UINT16_MAX int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; #endif #ifdef UINT32_MAX int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; #endif #ifdef UINT64_MAX int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; #endif int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; }; ]])], [dnl Determine whether the various *_MIN, *_MAX macros are usable dnl in preprocessor expression. We could do it by compiling a test dnl program for each of these macros. It is faster to run a program dnl that inspects the macro expansion. dnl This detects a bug on HP-UX 11.23/ia64. AC_RUN_IFELSE([ AC_LANG_PROGRAM([[ #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include ] gl_STDINT_INCLUDES [ #include #include #define MVAL(macro) MVAL1(macro) #define MVAL1(expression) #expression static const char *macro_values[] = { #ifdef INT8_MAX MVAL (INT8_MAX), #endif #ifdef INT16_MAX MVAL (INT16_MAX), #endif #ifdef INT32_MAX MVAL (INT32_MAX), #endif #ifdef INT64_MAX MVAL (INT64_MAX), #endif #ifdef UINT8_MAX MVAL (UINT8_MAX), #endif #ifdef UINT16_MAX MVAL (UINT16_MAX), #endif #ifdef UINT32_MAX MVAL (UINT32_MAX), #endif #ifdef UINT64_MAX MVAL (UINT64_MAX), #endif NULL }; ]], [[ const char **mv; for (mv = macro_values; *mv != NULL; mv++) { const char *value = *mv; /* Test whether it looks like a cast expression. */ if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 || strncmp (value, "((int)"/*)*/, 6) == 0 || strncmp (value, "((signed short)"/*)*/, 15) == 0 || strncmp (value, "((signed char)"/*)*/, 14) == 0) return mv - macro_values + 1; } return 0; ]])], [gl_cv_header_working_stdint_h=yes], [], [dnl When cross-compiling, assume it works. gl_cv_header_working_stdint_h=yes ]) ]) ]) fi if test "$gl_cv_header_working_stdint_h" = yes; then STDINT_H= else dnl Check for , and for dnl (used in Linux libc4 >= 4.6.7 and libc5). AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h]) if test $ac_cv_header_sys_inttypes_h = yes; then HAVE_SYS_INTTYPES_H=1 else HAVE_SYS_INTTYPES_H=0 fi AC_SUBST([HAVE_SYS_INTTYPES_H]) if test $ac_cv_header_sys_bitypes_h = yes; then HAVE_SYS_BITYPES_H=1 else HAVE_SYS_BITYPES_H=0 fi AC_SUBST([HAVE_SYS_BITYPES_H]) gl_STDINT_TYPE_PROPERTIES STDINT_H=stdint.h fi AC_SUBST([STDINT_H]) AM_CONDITIONAL([GL_GENERATE_STDINT_H], [test -n "$STDINT_H"]) ]) dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES) dnl Determine the size of each of the given types in bits. AC_DEFUN([gl_STDINT_BITSIZEOF], [ dnl Use a shell loop, to avoid bloating configure, and dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into dnl config.h.in, dnl - extra AC_SUBST calls, so that the right substitutions are made. m4_foreach_w([gltype], [$1], [AH_TEMPLATE([BITSIZEOF_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), [Define to the number of bits in type ']gltype['.])]) for gltype in $1 ; do AC_CACHE_CHECK([for bit size of $gltype], [gl_cv_bitsizeof_${gltype}], [AC_COMPUTE_INT([result], [sizeof ($gltype) * CHAR_BIT], [$2 #include ], [result=unknown]) eval gl_cv_bitsizeof_${gltype}=\$result ]) eval result=\$gl_cv_bitsizeof_${gltype} if test $result = unknown; then dnl Use a nonempty default, because some compilers, such as IRIX 5 cc, dnl do a syntax check even on unused #if conditions and give an error dnl on valid C code like this: dnl #if 0 dnl # if > 32 dnl # endif dnl #endif result=0 fi GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` AC_DEFINE_UNQUOTED([BITSIZEOF_${GLTYPE}], [$result]) eval BITSIZEOF_${GLTYPE}=\$result done m4_foreach_w([gltype], [$1], [AC_SUBST([BITSIZEOF_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) ]) dnl gl_CHECK_TYPES_SIGNED(TYPES, INCLUDES) dnl Determine the signedness of each of the given types. dnl Define HAVE_SIGNED_TYPE if type is signed. AC_DEFUN([gl_CHECK_TYPES_SIGNED], [ dnl Use a shell loop, to avoid bloating configure, and dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into dnl config.h.in, dnl - extra AC_SUBST calls, so that the right substitutions are made. m4_foreach_w([gltype], [$1], [AH_TEMPLATE([HAVE_SIGNED_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), [Define to 1 if ']gltype[' is a signed integer type.])]) for gltype in $1 ; do AC_CACHE_CHECK([whether $gltype is signed], [gl_cv_type_${gltype}_signed], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([$2[ int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];]])], result=yes, result=no) eval gl_cv_type_${gltype}_signed=\$result ]) eval result=\$gl_cv_type_${gltype}_signed GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` if test "$result" = yes; then AC_DEFINE_UNQUOTED([HAVE_SIGNED_${GLTYPE}], [1]) eval HAVE_SIGNED_${GLTYPE}=1 else eval HAVE_SIGNED_${GLTYPE}=0 fi done m4_foreach_w([gltype], [$1], [AC_SUBST([HAVE_SIGNED_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) ]) dnl gl_INTEGER_TYPE_SUFFIX(TYPES, INCLUDES) dnl Determine the suffix to use for integer constants of the given types. dnl Define t_SUFFIX for each such type. AC_DEFUN([gl_INTEGER_TYPE_SUFFIX], [ dnl Use a shell loop, to avoid bloating configure, and dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into dnl config.h.in, dnl - extra AC_SUBST calls, so that the right substitutions are made. m4_foreach_w([gltype], [$1], [AH_TEMPLATE(m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX], [Define to l, ll, u, ul, ull, etc., as suitable for constants of type ']gltype['.])]) for gltype in $1 ; do AC_CACHE_CHECK([for $gltype integer literal suffix], [gl_cv_type_${gltype}_suffix], [eval gl_cv_type_${gltype}_suffix=no eval result=\$gl_cv_type_${gltype}_signed if test "$result" = yes; then glsufu= else glsufu=u fi for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do case $glsuf in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; i64) gltype1='__int64';; u) gltype1='unsigned int';; ul) gltype1='unsigned long int';; ull) gltype1='unsigned long long int';; ui64)gltype1='unsigned __int64';; esac AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([$2[ extern $gltype foo; extern $gltype1 foo;]])], [eval gl_cv_type_${gltype}_suffix=\$glsuf]) eval result=\$gl_cv_type_${gltype}_suffix test "$result" != no && break done]) GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` eval result=\$gl_cv_type_${gltype}_suffix test "$result" = no && result= eval ${GLTYPE}_SUFFIX=\$result AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], [$result]) done m4_foreach_w([gltype], [$1], [AC_SUBST(m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])]) ]) dnl gl_STDINT_INCLUDES AC_DEFUN([gl_STDINT_INCLUDES], [[ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif ]]) dnl gl_STDINT_TYPE_PROPERTIES dnl Compute HAVE_SIGNED_t, BITSIZEOF_t and t_SUFFIX, for all the types t dnl of interest to stdint.in.h. AC_DEFUN([gl_STDINT_TYPE_PROPERTIES], [ AC_REQUIRE([gl_MULTIARCH]) if test $APPLE_UNIVERSAL_BUILD = 0; then gl_STDINT_BITSIZEOF([ptrdiff_t size_t], [gl_STDINT_INCLUDES]) fi gl_STDINT_BITSIZEOF([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES]) gl_CHECK_TYPES_SIGNED([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES]) gl_cv_type_ptrdiff_t_signed=yes gl_cv_type_size_t_signed=no if test $APPLE_UNIVERSAL_BUILD = 0; then gl_INTEGER_TYPE_SUFFIX([ptrdiff_t size_t], [gl_STDINT_INCLUDES]) fi gl_INTEGER_TYPE_SUFFIX([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES]) ]) dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. dnl Remove this when we can assume autoconf >= 2.61. m4_ifdef([AC_COMPUTE_INT], [], [ AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) ]) # Hey Emacs! # Local Variables: # indent-tabs-mode: nil # End: gv-3.7.4/m4/extensions.m40000664000076400007640000001052711735103745012070 00000000000000# serial 9 -*- Autoconf -*- # Enable extensions on systems that normally disable them. # Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS # Autoconf. Perhaps we can remove this once we can assume Autoconf # 2.62 or later everywhere, but since CVS Autoconf mutates rapidly # enough in this area it's likely we'll need to redefine # AC_USE_SYSTEM_EXTENSIONS for quite some time. # If autoconf reports a warning # warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS # or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS # the fix is # 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked # but always AC_REQUIREd, # 2) to ensure that for each occurrence of # AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) # or # AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) # the corresponding gnulib module description has 'extensions' among # its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS # invocation occurs in gl_EARLY, not in gl_INIT. # AC_USE_SYSTEM_EXTENSIONS # ------------------------ # Enable extensions on systems that normally disable them, # typically due to standards-conformance issues. # Remember that #undef in AH_VERBATIM gets replaced with #define by # AC_DEFINE. The goal here is to define all known feature-enabling # macros, then, if reports of conflicts are made, disable macros that # cause problems on some platforms (such as __EXTENSIONS__). AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS], [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl AC_BEFORE([$0], [AC_RUN_IFELSE])dnl AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) if test "$MINIX" = yes; then AC_DEFINE([_POSIX_SOURCE], [1], [Define to 1 if you need to in order for `stat' and other things to work.]) AC_DEFINE([_POSIX_1_SOURCE], [2], [Define to 2 if the system does not provide POSIX.1 features except with this defined.]) AC_DEFINE([_MINIX], [1], [Define to 1 if on MINIX.]) fi dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500, dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already dnl provided. case "$host_os" in hpux*) AC_DEFINE([_XOPEN_SOURCE], [500], [Define to 500 only on HP-UX.]) ;; esac AH_VERBATIM([__EXTENSIONS__], [/* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif ]) AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], [ac_cv_safe_to_define___extensions__], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[ # define __EXTENSIONS__ 1 ]AC_INCLUDES_DEFAULT])], [ac_cv_safe_to_define___extensions__=yes], [ac_cv_safe_to_define___extensions__=no])]) test $ac_cv_safe_to_define___extensions__ = yes && AC_DEFINE([__EXTENSIONS__]) AC_DEFINE([_ALL_SOURCE]) AC_DEFINE([_GNU_SOURCE]) AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) AC_DEFINE([_TANDEM_SOURCE]) ])# AC_USE_SYSTEM_EXTENSIONS # gl_USE_SYSTEM_EXTENSIONS # ------------------------ # Enable extensions on systems that normally disable them, # typically due to standards-conformance issues. AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS], [ dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS. dnl gnulib does not need it. But if it gets required by third-party macros dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS". dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE, dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck. AC_REQUIRE([AC_GNU_SOURCE]) AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) ]) gv-3.7.4/m4/multiarch.m40000664000076400007640000000367311735103745011665 00000000000000# multiarch.m4 serial 6 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Determine whether the compiler is or may be producing universal binaries. # # On MacOS X 10.5 and later systems, the user can create libraries and # executables that work on multiple system types--known as "fat" or # "universal" binaries--by specifying multiple '-arch' options to the # compiler but only a single '-arch' option to the preprocessor. Like # this: # # ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ # CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ # CPP="gcc -E" CXXCPP="g++ -E" # # Detect this situation and set APPLE_UNIVERSAL_BUILD accordingly. AC_DEFUN_ONCE([gl_MULTIARCH], [ dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN. gl_cv_c_multiarch=no AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; ]])], [ dnl Check for potential -arch flags. It is not universal unless dnl there are at least two -arch flags with different values. arch= prev= for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do if test -n "$prev"; then case $word in i?86 | x86_64 | ppc | ppc64) if test -z "$arch" || test "$arch" = "$word"; then arch="$word" else gl_cv_c_multiarch=yes fi ;; esac prev= else if test "x$word" = "x-arch"; then prev=arch fi fi done ]) if test $gl_cv_c_multiarch = yes; then APPLE_UNIVERSAL_BUILD=1 else APPLE_UNIVERSAL_BUILD=0 fi AC_SUBST([APPLE_UNIVERSAL_BUILD]) ]) gv-3.7.4/m4/mkdtemp.m40000664000076400007640000000105711735103745011330 00000000000000# mkdtemp.m4 serial 6 dnl Copyright (C) 2001-2003, 2006-2007, 2009-2011 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gt_FUNC_MKDTEMP], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_REPLACE_FUNCS([mkdtemp]) if test $ac_cv_func_mkdtemp = no; then HAVE_MKDTEMP=0 gl_PREREQ_MKDTEMP fi ]) # Prerequisites of lib/mkdtemp.c AC_DEFUN([gl_PREREQ_MKDTEMP], [: ]) gv-3.7.4/m4/gnulib-comp.m40000664000076400007640000002400011735103745012074 00000000000000# DO NOT EDIT! GENERATED AUTOMATICALLY! # Copyright (C) 2002-2011 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # # This file represents the compiled summary of the specification in # gnulib-cache.m4. It lists the computed macro invocations that need # to be invoked from configure.ac. # In projects that use version control, this file can be treated like # other built files. # This macro should be invoked from ./configure.ac, in the section # "Checks for programs", right after AC_PROG_CC, and certainly before # any checks for libraries, header files, types and library functions. AC_DEFUN([gl_EARLY], [ m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace m4_pattern_allow([^gl_ES$])dnl a valid locale name m4_pattern_allow([^gl_LIBOBJS$])dnl a variable m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable AC_REQUIRE([AC_PROG_RANLIB]) # Code from module alloca-opt: # Code from module arg-nonnull: # Code from module c++defs: # Code from module canonicalize-lgpl: # Code from module dosname: # Code from module errno: # Code from module extensions: AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) # Code from module getopt-gnu: # Code from module getopt-posix: # Code from module gettext-h: # Code from module gettimeofday: # Code from module include_next: # Code from module inttypes: # Code from module inttypes-incomplete: # Code from module lstat: # Code from module malloca: # Code from module mkdtemp: # Code from module mkstemp: # Code from module multiarch: # Code from module pathmax: # Code from module readlink: # Code from module signal: # Code from module stat: # Code from module stdbool: # Code from module stddef: # Code from module stdint: # Code from module stdlib: # Code from module sys_stat: # Code from module sys_time: # Code from module tempname: # Code from module time: # Code from module unistd: # Code from module verify: # Code from module warn-on-use: ]) # This macro should be invoked from ./configure.ac, in the section # "Check for header files, types and library functions". AC_DEFUN([gl_INIT], [ AM_CONDITIONAL([GL_COND_LIBTOOL], [false]) gl_cond_libtool=false gl_libdeps= gl_ltlibdeps= gl_m4_base='m4' m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ])) m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS])) m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES])) m4_pushdef([gl_LIBSOURCES_LIST], []) m4_pushdef([gl_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='lib' gl_FUNC_ALLOCA gl_CANONICALIZE_LGPL gl_MODULE_INDICATOR([canonicalize-lgpl]) gl_STDLIB_MODULE_INDICATOR([canonicalize_file_name]) gl_STDLIB_MODULE_INDICATOR([realpath]) gl_HEADER_ERRNO_H gl_FUNC_GETOPT_GNU gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu]) gl_FUNC_GETOPT_POSIX AC_SUBST([LIBINTL]) AC_SUBST([LTLIBINTL]) gl_FUNC_GETTIMEOFDAY gl_SYS_TIME_MODULE_INDICATOR([gettimeofday]) gl_INTTYPES_H gl_INTTYPES_INCOMPLETE gl_FUNC_LSTAT gl_SYS_STAT_MODULE_INDICATOR([lstat]) gl_MALLOCA gt_FUNC_MKDTEMP gl_STDLIB_MODULE_INDICATOR([mkdtemp]) gl_FUNC_MKSTEMP gl_STDLIB_MODULE_INDICATOR([mkstemp]) gl_MULTIARCH gl_PATHMAX gl_FUNC_READLINK gl_UNISTD_MODULE_INDICATOR([readlink]) gl_SIGNAL_H gl_FUNC_STAT gl_SYS_STAT_MODULE_INDICATOR([stat]) AM_STDBOOL_H gl_STDDEF_H gl_STDINT_H gl_STDLIB_H gl_HEADER_SYS_STAT_H AC_PROG_MKDIR_P gl_HEADER_SYS_TIME_H AC_PROG_MKDIR_P gl_FUNC_GEN_TEMPNAME gl_HEADER_TIME_H gl_UNISTD_H # End of code from modules m4_ifval(gl_LIBSOURCES_LIST, [ m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ || for gl_file in ]gl_LIBSOURCES_LIST[ ; do if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2 exit 1 fi done])dnl m4_if(m4_sysval, [0], [], [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) ]) m4_popdef([gl_LIBSOURCES_DIR]) m4_popdef([gl_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) m4_popdef([AC_REPLACE_FUNCS]) m4_popdef([AC_LIBOBJ]) AC_CONFIG_COMMANDS_PRE([ gl_libobjs= gl_ltlibobjs= if test -n "$gl_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gl_libobjs="$gl_libobjs $i.$ac_objext" gl_ltlibobjs="$gl_ltlibobjs $i.lo" done fi AC_SUBST([gl_LIBOBJS], [$gl_libobjs]) AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs]) ]) gltests_libdeps= gltests_ltlibdeps= m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ])) m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS])) m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES])) m4_pushdef([gltests_LIBSOURCES_LIST], []) m4_pushdef([gltests_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='tests' changequote(,)dnl gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS changequote([, ])dnl AC_SUBST([gltests_WITNESS]) gl_module_indicator_condition=$gltests_WITNESS m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition]) m4_popdef([gl_MODULE_INDICATOR_CONDITION]) m4_ifval(gltests_LIBSOURCES_LIST, [ m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ || for gl_file in ]gltests_LIBSOURCES_LIST[ ; do if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2 exit 1 fi done])dnl m4_if(m4_sysval, [0], [], [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) ]) m4_popdef([gltests_LIBSOURCES_DIR]) m4_popdef([gltests_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) m4_popdef([AC_REPLACE_FUNCS]) m4_popdef([AC_LIBOBJ]) AC_CONFIG_COMMANDS_PRE([ gltests_libobjs= gltests_ltlibobjs= if test -n "$gltests_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gltests_libobjs="$gltests_libobjs $i.$ac_objext" gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" done fi AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs]) AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs]) ]) LIBGNU_LIBDEPS="$gl_libdeps" AC_SUBST([LIBGNU_LIBDEPS]) LIBGNU_LTLIBDEPS="$gl_ltlibdeps" AC_SUBST([LIBGNU_LTLIBDEPS]) ]) # Like AC_LIBOBJ, except that the module name goes # into gl_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gl_LIBOBJ], [ AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext" ]) # Like AC_REPLACE_FUNCS, except that the module name goes # into gl_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gl_REPLACE_FUNCS], [ m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)]) ]) # Like AC_LIBSOURCES, except the directory where the source file is # expected is derived from the gnulib-tool parameterization, # and alloca is special cased (for the alloca-opt module). # We could also entirely rely on EXTRA_lib..._SOURCES. AC_DEFUN([gl_LIBSOURCES], [ m4_foreach([_gl_NAME], [$1], [ m4_if(_gl_NAME, [alloca.c], [], [ m4_define([gl_LIBSOURCES_DIR], [lib]) m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ]) ]) ]) ]) # Like AC_LIBOBJ, except that the module name goes # into gltests_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gltests_LIBOBJ], [ AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext" ]) # Like AC_REPLACE_FUNCS, except that the module name goes # into gltests_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gltests_REPLACE_FUNCS], [ m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)]) ]) # Like AC_LIBSOURCES, except the directory where the source file is # expected is derived from the gnulib-tool parameterization, # and alloca is special cased (for the alloca-opt module). # We could also entirely rely on EXTRA_lib..._SOURCES. AC_DEFUN([gltests_LIBSOURCES], [ m4_foreach([_gl_NAME], [$1], [ m4_if(_gl_NAME, [alloca.c], [], [ m4_define([gltests_LIBSOURCES_DIR], [tests]) m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ]) ]) ]) ]) # This macro records the list of files which have been installed by # gnulib-tool and may be removed by future gnulib-tool invocations. AC_DEFUN([gl_FILE_LIST], [ build-aux/arg-nonnull.h build-aux/c++defs.h build-aux/warn-on-use.h lib/alloca.in.h lib/canonicalize-lgpl.c lib/dosname.h lib/errno.in.h lib/getopt.c lib/getopt.in.h lib/getopt1.c lib/getopt_int.h lib/gettext.h lib/gettimeofday.c lib/inttypes.in.h lib/lstat.c lib/malloca.c lib/malloca.h lib/malloca.valgrind lib/mkdtemp.c lib/mkstemp.c lib/pathmax.h lib/readlink.c lib/signal.in.h lib/stat.c lib/stdbool.in.h lib/stddef.in.h lib/stdint.in.h lib/stdlib.in.h lib/sys_stat.in.h lib/sys_time.in.h lib/tempname.c lib/tempname.h lib/time.in.h lib/unistd.in.h lib/verify.h m4/00gnulib.m4 m4/alloca.m4 m4/canonicalize.m4 m4/double-slash-root.m4 m4/eealloc.m4 m4/errno_h.m4 m4/extensions.m4 m4/getopt.m4 m4/gettimeofday.m4 m4/gnulib-common.m4 m4/include_next.m4 m4/inttypes-pri.m4 m4/inttypes.m4 m4/longlong.m4 m4/lstat.m4 m4/malloca.m4 m4/mkdtemp.m4 m4/mkstemp.m4 m4/multiarch.m4 m4/onceonly.m4 m4/pathmax.m4 m4/readlink.m4 m4/signal_h.m4 m4/stat.m4 m4/stdbool.m4 m4/stddef_h.m4 m4/stdint.m4 m4/stdlib_h.m4 m4/sys_stat_h.m4 m4/sys_time_h.m4 m4/tempname.m4 m4/time_h.m4 m4/unistd_h.m4 m4/warn-on-use.m4 m4/wchar_t.m4 ]) gv-3.7.4/m4/readlink.m40000664000076400007640000000425211735103745011460 00000000000000# readlink.m4 serial 9 dnl Copyright (C) 2003, 2007, 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_READLINK], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([readlink]) if test $ac_cv_func_readlink = no; then HAVE_READLINK=0 AC_LIBOBJ([readlink]) gl_PREREQ_READLINK else AC_CACHE_CHECK([whether readlink signature is correct], [gl_cv_decl_readlink_works], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include /* Cause compilation failure if original declaration has wrong type. */ ssize_t readlink (const char *, char *, size_t);]])], [gl_cv_decl_readlink_works=yes], [gl_cv_decl_readlink_works=no])]) dnl Solaris 9 ignores trailing slash. dnl FreeBSD 7.2 dereferences only one level of links with trailing slash. AC_CACHE_CHECK([whether readlink handles trailing slash correctly], [gl_cv_func_readlink_works], [# We have readlink, so assume ln -s works. ln -s conftest.no-such conftest.link ln -s conftest.link conftest.lnk2 AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[char buf[20]; return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;]])], [gl_cv_func_readlink_works=yes], [gl_cv_func_readlink_works=no], [gl_cv_func_readlink_works="guessing no"]) rm -f conftest.link conftest.lnk2]) if test "$gl_cv_func_readlink_works" != yes; then AC_DEFINE([READLINK_TRAILING_SLASH_BUG], [1], [Define to 1 if readlink fails to recognize a trailing slash.]) REPLACE_READLINK=1 AC_LIBOBJ([readlink]) elif test "$gl_cv_decl_readlink_works" != yes; then REPLACE_READLINK=1 AC_LIBOBJ([readlink]) fi fi ]) # Like gl_FUNC_READLINK, except prepare for separate compilation (no AC_LIBOBJ). AC_DEFUN([gl_FUNC_READLINK_SEPARATE], [ AC_CHECK_FUNCS_ONCE([readlink]) gl_PREREQ_READLINK ]) # Prerequisites of lib/readlink.c. AC_DEFUN([gl_PREREQ_READLINK], [ : ]) gv-3.7.4/m4/mkstemp.m40000664000076400007640000000505011735103745011344 00000000000000#serial 20 # Copyright (C) 2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # On some hosts (e.g., HP-UX 10.20, SunOS 4.1.4, Solaris 2.5.1), mkstemp has a # silly limit that it can create no more than 26 files from a given template. # Other systems lack mkstemp altogether. # On OSF1/Tru64 V4.0F, the system-provided mkstemp function can create # only 32 files per process. # On some hosts, mkstemp creates files with mode 0666, which is a security # problem and a violation of POSIX 2008. # On systems like the above, arrange to use the replacement function. AC_DEFUN([gl_FUNC_MKSTEMP], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_REQUIRE([AC_SYS_LARGEFILE]) AC_CHECK_FUNCS_ONCE([mkstemp]) if test $ac_cv_func_mkstemp = yes; then AC_CACHE_CHECK([for working mkstemp], [gl_cv_func_working_mkstemp], [ mkdir conftest.mkstemp AC_RUN_IFELSE( [AC_LANG_PROGRAM( [AC_INCLUDES_DEFAULT], [[int result = 0; int i; off_t large = (off_t) 4294967295u; if (large < 0) large = 2147483647; umask (0); for (i = 0; i < 70; i++) { char templ[] = "conftest.mkstemp/coXXXXXX"; int (*mkstemp_function) (char *) = mkstemp; int fd = mkstemp_function (templ); if (fd < 0) result |= 1; else { struct stat st; if (lseek (fd, large, SEEK_SET) != large) result |= 2; if (fstat (fd, &st) < 0) result |= 4; else if (st.st_mode & 0077) result |= 8; if (close (fd)) result |= 16; } } return result;]])], [gl_cv_func_working_mkstemp=yes], [gl_cv_func_working_mkstemp=no], [gl_cv_func_working_mkstemp="guessing no"]) rm -rf conftest.mkstemp ]) if test "$gl_cv_func_working_mkstemp" != yes; then REPLACE_MKSTEMP=1 AC_LIBOBJ([mkstemp]) gl_PREREQ_MKSTEMP fi else HAVE_MKSTEMP=0 AC_LIBOBJ([mkstemp]) gl_PREREQ_MKSTEMP fi ]) # Prerequisites of lib/mkstemp.c. AC_DEFUN([gl_PREREQ_MKSTEMP], [ ]) gv-3.7.4/m4/getopt.m40000664000076400007640000002445111735103745011174 00000000000000# getopt.m4 serial 34 dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Request a POSIX compliant getopt function. AC_DEFUN([gl_FUNC_GETOPT_POSIX], [ m4_divert_text([DEFAULTS], [gl_getopt_required=POSIX]) AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) gl_GETOPT_IFELSE([ gl_REPLACE_GETOPT ], []) ]) # Request a POSIX compliant getopt function with GNU extensions (such as # options with optional arguments) and the functions getopt_long, # getopt_long_only. AC_DEFUN([gl_FUNC_GETOPT_GNU], [ m4_divert_text([INIT_PREPARE], [gl_getopt_required=GNU]) AC_REQUIRE([gl_FUNC_GETOPT_POSIX]) ]) # Request the gnulib implementation of the getopt functions unconditionally. # argp.m4 uses this. AC_DEFUN([gl_REPLACE_GETOPT], [ dnl Arrange for getopt.h to be created. gl_GETOPT_SUBSTITUTE_HEADER dnl Arrange for unistd.h to include getopt.h. GNULIB_UNISTD_H_GETOPT=1 dnl Arrange to compile the getopt implementation. AC_LIBOBJ([getopt]) AC_LIBOBJ([getopt1]) gl_PREREQ_GETOPT ]) # emacs' configure.in uses this. AC_DEFUN([gl_GETOPT_IFELSE], [ AC_REQUIRE([gl_GETOPT_CHECK_HEADERS]) AS_IF([test -n "$gl_replace_getopt"], [$1], [$2]) ]) # Determine whether to replace the entire getopt facility. AC_DEFUN([gl_GETOPT_CHECK_HEADERS], [ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([AC_PROG_AWK]) dnl for awk that supports ENVIRON dnl Persuade Solaris to declare optarg, optind, opterr, optopt. AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) gl_CHECK_NEXT_HEADERS([getopt.h]) if test $ac_cv_header_getopt_h = yes; then HAVE_GETOPT_H=1 else HAVE_GETOPT_H=0 fi AC_SUBST([HAVE_GETOPT_H]) gl_replace_getopt= dnl Test whether is available. if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then AC_CHECK_HEADERS([getopt.h], [], [gl_replace_getopt=yes]) fi dnl Test whether the function getopt_long is available. if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then AC_CHECK_FUNCS([getopt_long_only], [], [gl_replace_getopt=yes]) fi dnl mingw's getopt (in libmingwex.a) does weird things when the options dnl strings starts with '+' and it's not the first call. Some internal state dnl is left over from earlier calls, and neither setting optind = 0 nor dnl setting optreset = 1 get rid of this internal state. dnl POSIX is silent on optind vs. optreset, so we allow either behavior. dnl POSIX 2008 does not specify leading '+' behavior, but see dnl http://austingroupbugs.net/view.php?id=191 for a recommendation on dnl the next version of POSIX. For now, we only guarantee leading '+' dnl behavior with getopt-gnu. if test -z "$gl_replace_getopt"; then AC_CACHE_CHECK([whether getopt is POSIX compatible], [gl_cv_func_getopt_posix], [ dnl BSD getopt_long uses an incompatible method to reset dnl option processing. Existence of the variable, in and of dnl itself, is not a reason to replace getopt, but knowledge dnl of the variable is needed to determine how to reset and dnl whether a reset reparses the environment. Solaris dnl supports neither optreset nor optind=0, but keeps no state dnl that needs a reset beyond setting optind=1; detect Solaris dnl by getopt_clip. AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[int *p = &optreset; return optreset;]])], [gl_optind_min=1], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[return !getopt_clip;]])], [gl_optind_min=1], [gl_optind_min=0])]) dnl This test fails on mingw and succeeds on many other platforms. gl_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min" AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include int main () { { int argc = 0; char *argv[10]; int c; argv[argc++] = "program"; argv[argc++] = "-a"; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = OPTIND_MIN; opterr = 0; c = getopt (argc, argv, "ab"); if (!(c == 'a')) return 1; c = getopt (argc, argv, "ab"); if (!(c == -1)) return 2; if (!(optind == 2)) return 3; } /* Some internal state exists at this point. */ { int argc = 0; char *argv[10]; int c; argv[argc++] = "program"; argv[argc++] = "donald"; argv[argc++] = "-p"; argv[argc++] = "billy"; argv[argc++] = "duck"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = OPTIND_MIN; opterr = 0; c = getopt (argc, argv, "+abp:q:"); if (!(c == -1)) return 4; if (!(strcmp (argv[0], "program") == 0)) return 5; if (!(strcmp (argv[1], "donald") == 0)) return 6; if (!(strcmp (argv[2], "-p") == 0)) return 7; if (!(strcmp (argv[3], "billy") == 0)) return 8; if (!(strcmp (argv[4], "duck") == 0)) return 9; if (!(strcmp (argv[5], "-a") == 0)) return 10; if (!(strcmp (argv[6], "bar") == 0)) return 11; if (!(optind == 1)) return 12; } /* Detect MacOS 10.5, AIX 7.1 bug. */ { char *argv[3] = { "program", "-ab", NULL }; optind = OPTIND_MIN; opterr = 0; if (getopt (2, argv, "ab:") != 'a') return 13; if (getopt (2, argv, "ab:") != '?') return 14; if (optopt != 'b') return 15; if (optind != 2) return 16; } return 0; } ]])], [gl_cv_func_getopt_posix=yes], [gl_cv_func_getopt_posix=no], [case "$host_os" in mingw*) gl_cv_func_getopt_posix="guessing no";; darwin* | aix*) gl_cv_func_getopt_posix="guessing no";; *) gl_cv_func_getopt_posix="guessing yes";; esac ]) CPPFLAGS=$gl_save_CPPFLAGS ]) case "$gl_cv_func_getopt_posix" in *no) gl_replace_getopt=yes ;; esac fi if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_getopt_gnu], [# Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the # optstring is necessary for programs like m4 that have POSIX-mandated # semantics for supporting options interspersed with files. # Also, since getopt_long is a GNU extension, we require optind=0. # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; # so take care to revert to the correct (non-)export state. dnl GNU Coding Standards currently allow awk but not env; besides, env dnl is ambiguous with environment values that contain newlines. gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" #include #include ]], [[ int result = 0; /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10. */ { char *myargv[3]; myargv[0] = "conftest"; myargv[1] = "-+"; myargv[2] = 0; opterr = 0; if (getopt (2, myargv, "+a") != '?') result |= 1; } /* This code succeeds on glibc 2.8, mingw, and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ { char *argv[] = { "program", "-p", "foo", "bar", NULL }; optind = 1; if (getopt (4, argv, "p::") != 'p') result |= 2; else if (optarg != NULL) result |= 4; else if (getopt (4, argv, "p::") != -1) result |= 6; else if (optind != 2) result |= 8; } /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ { char *argv[] = { "program", "foo", "-p", NULL }; optind = 0; if (getopt (3, argv, "-p") != 1) result |= 16; else if (getopt (3, argv, "-p") != 'p') result |= 32; } /* This code fails on glibc 2.11. */ { char *argv[] = { "program", "-b", "-a", NULL }; optind = opterr = 0; if (getopt (3, argv, "+:a:b") != 'b') result |= 64; else if (getopt (3, argv, "+:a:b") != ':') result |= 64; } return result; ]])], [gl_cv_func_getopt_gnu=yes], [gl_cv_func_getopt_gnu=no], [dnl Cross compiling. Guess based on host and declarations. case $host_os:$ac_cv_have_decl_optreset in *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;; *:yes) gl_cv_func_getopt_gnu=no;; *) gl_cv_func_getopt_gnu=yes;; esac ]) case $gl_had_POSIXLY_CORRECT in exported) ;; yes) AS_UNSET([POSIXLY_CORRECT]); POSIXLY_CORRECT=1 ;; *) AS_UNSET([POSIXLY_CORRECT]) ;; esac ]) if test "$gl_cv_func_getopt_gnu" = "no"; then gl_replace_getopt=yes fi fi ]) # emacs' configure.in uses this. AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER], [ GETOPT_H=getopt.h AC_DEFINE([__GETOPT_PREFIX], [[rpl_]], [Define to rpl_ if the getopt replacement functions and variables should be used.]) AC_SUBST([GETOPT_H]) ]) # Prerequisites of lib/getopt*. # emacs' configure.in uses this. AC_DEFUN([gl_PREREQ_GETOPT], [ AC_CHECK_DECLS_ONCE([getenv]) ]) gv-3.7.4/m4/stdbool.m40000664000076400007640000000637111735103745011341 00000000000000# Check for stdbool.h that conforms to C99. dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. #serial 5 # Prepare for substituting if it is not supported. AC_DEFUN([AM_STDBOOL_H], [ AC_REQUIRE([AC_CHECK_HEADER_STDBOOL]) # Define two additional variables used in the Makefile substitution. if test "$ac_cv_header_stdbool_h" = yes; then STDBOOL_H='' else STDBOOL_H='stdbool.h' fi AC_SUBST([STDBOOL_H]) AM_CONDITIONAL([GL_GENERATE_STDBOOL_H], [test -n "$STDBOOL_H"]) if test "$ac_cv_type__Bool" = yes; then HAVE__BOOL=1 else HAVE__BOOL=0 fi AC_SUBST([HAVE__BOOL]) ]) # AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future. AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H]) # This version of the macro is needed in autoconf <= 2.68. AC_DEFUN([AC_CHECK_HEADER_STDBOOL], [AC_CACHE_CHECK([for stdbool.h that conforms to C99], [ac_cv_header_stdbool_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; ]], [[ bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ]])], [ac_cv_header_stdbool_h=yes], [ac_cv_header_stdbool_h=no])]) AC_CHECK_TYPES([_Bool]) ]) gv-3.7.4/m4/tempname.m40000664000076400007640000000112411735103745011470 00000000000000#serial 3 # Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # glibc provides __gen_tempname as a wrapper for mk[ds]temp. Expose # it as a public API, and provide it on systems that are lacking. AC_DEFUN([gl_FUNC_GEN_TEMPNAME], [ AC_REQUIRE([AC_SYS_LARGEFILE]) AC_LIBOBJ([tempname]) gl_PREREQ_TEMPNAME ]) # Prerequisites of lib/tempname.c. AC_DEFUN([gl_PREREQ_TEMPNAME], [ : ]) gv-3.7.4/m4/include_next.m40000664000076400007640000002312411735103745012347 00000000000000# include_next.m4 serial 18 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert and Derek Price. dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER. dnl dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to dnl 'include' otherwise. dnl dnl INCLUDE_NEXT_AS_FIRST_DIRECTIVE expands to 'include_next' if the compiler dnl supports it in the special case that it is the first include directive in dnl the given file, or to 'include' otherwise. dnl dnl PRAGMA_SYSTEM_HEADER can be used in files that contain #include_next, dnl so as to avoid GCC warnings when the gcc option -pedantic is used. dnl '#pragma GCC system_header' has the same effect as if the file was found dnl through the include search path specified with '-isystem' options (as dnl opposed to the search path specified with '-I' options). Namely, gcc dnl does not warn about some things, and on some systems (Solaris and Interix) dnl __STDC__ evaluates to 0 instead of to 1. The latter is an undesired side dnl effect; we are therefore careful to use 'defined __STDC__' or '1' instead dnl of plain '__STDC__'. dnl dnl PRAGMA_COLUMNS can be used in files that override system header files, so dnl as to avoid compilation errors on HP NonStop systems when the gnulib file dnl is included by a system header file that does a "#pragma COLUMNS 80" (which dnl has the effect of truncating the lines of that file and all files that it dnl includes to 80 columns) and the gnulib file has lines longer than 80 dnl columns. AC_DEFUN([gl_INCLUDE_NEXT], [ AC_LANG_PREPROC_REQUIRE() AC_CACHE_CHECK([whether the preprocessor supports include_next], [gl_cv_have_include_next], [rm -rf conftestd1a conftestd1b conftestd2 mkdir conftestd1a conftestd1b conftestd2 dnl IBM C 9.0, 10.1 (original versions, prior to the 2009-01 updates) on dnl AIX 6.1 support include_next when used as first preprocessor directive dnl in a file, but not when preceded by another include directive. Check dnl for this bug by including . dnl Additionally, with this same compiler, include_next is a no-op when dnl used in a header file that was included by specifying its absolute dnl file name. Despite these two bugs, include_next is used in the dnl compiler's . By virtue of the second bug, we need to use dnl include_next as well in this case. cat < conftestd1a/conftest.h #define DEFINED_IN_CONFTESTD1 #include_next #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat < conftestd1b/conftest.h #define DEFINED_IN_CONFTESTD1 #include #include_next #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat < conftestd2/conftest.h #ifndef DEFINED_IN_CONFTESTD1 #error "include_next test doesn't work" #endif #define DEFINED_IN_CONFTESTD2 EOF gl_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" dnl We intentionally avoid using AC_LANG_SOURCE here. AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include ]], [gl_cv_have_include_next=yes], [CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include ]], [gl_cv_have_include_next=buggy], [gl_cv_have_include_next=no]) ]) CPPFLAGS="$gl_save_CPPFLAGS" rm -rf conftestd1a conftestd1b conftestd2 ]) PRAGMA_SYSTEM_HEADER= if test $gl_cv_have_include_next = yes; then INCLUDE_NEXT=include_next INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next if test -n "$GCC"; then PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' fi else if test $gl_cv_have_include_next = buggy; then INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next else INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include fi fi AC_SUBST([INCLUDE_NEXT]) AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE]) AC_SUBST([PRAGMA_SYSTEM_HEADER]) AC_CACHE_CHECK([whether system header files limit the line length], [gl_cv_pragma_columns], [dnl HP NonStop systems, which define __TANDEM, have this misfeature. AC_EGREP_CPP([choke me], [ #ifdef __TANDEM choke me #endif ], [gl_cv_pragma_columns=yes], [gl_cv_pragma_columns=no]) ]) if test $gl_cv_pragma_columns = yes; then PRAGMA_COLUMNS="#pragma COLUMNS 10000" else PRAGMA_COLUMNS= fi AC_SUBST([PRAGMA_COLUMNS]) ]) # gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...) # ------------------------------------------ # For each arg foo.h, if #include_next works, define NEXT_FOO_H to be # ''; otherwise define it to be # '"///usr/include/foo.h"', or whatever other absolute file name is suitable. # Also, if #include_next works as first preprocessing directive in a file, # define NEXT_AS_FIRST_DIRECTIVE_FOO_H to be ''; otherwise define it to # be # '"///usr/include/foo.h"', or whatever other absolute file name is suitable. # That way, a header file with the following line: # #@INCLUDE_NEXT@ @NEXT_FOO_H@ # or # #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_FOO_H@ # behaves (after sed substitution) as if it contained # #include_next # even if the compiler does not support include_next. # The three "///" are to pacify Sun C 5.8, which otherwise would say # "warning: #include of /usr/include/... may be non-portable". # Use `""', not `<>', so that the /// cannot be confused with a C99 comment. # Note: This macro assumes that the header file is not empty after # preprocessing, i.e. it does not only define preprocessor macros but also # provides some type/enum definitions or function/variable declarations. # # This macro also checks whether each header exists, by invoking # AC_CHECK_HEADERS_ONCE or AC_CHECK_HEADERS on each argument. AC_DEFUN([gl_CHECK_NEXT_HEADERS], [ gl_NEXT_HEADERS_INTERNAL([$1], [check]) ]) # gl_NEXT_HEADERS(HEADER1 HEADER2 ...) # ------------------------------------ # Like gl_CHECK_NEXT_HEADERS, except do not check whether the headers exist. # This is suitable for headers like that are standardized by C89 # and therefore can be assumed to exist. AC_DEFUN([gl_NEXT_HEADERS], [ gl_NEXT_HEADERS_INTERNAL([$1], [assume]) ]) # The guts of gl_CHECK_NEXT_HEADERS and gl_NEXT_HEADERS. AC_DEFUN([gl_NEXT_HEADERS_INTERNAL], [ AC_REQUIRE([gl_INCLUDE_NEXT]) AC_REQUIRE([AC_CANONICAL_HOST]) m4_if([$2], [check], [AC_CHECK_HEADERS_ONCE([$1]) ]) m4_foreach_w([gl_HEADER_NAME], [$1], [AS_VAR_PUSHDEF([gl_next_header], [gl_cv_next_]m4_defn([gl_HEADER_NAME])) if test $gl_cv_have_include_next = yes; then AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) else AC_CACHE_CHECK( [absolute name of <]m4_defn([gl_HEADER_NAME])[>], m4_defn([gl_next_header]), [m4_if([$2], [check], [AS_VAR_PUSHDEF([gl_header_exists], [ac_cv_header_]m4_defn([gl_HEADER_NAME])) if test AS_VAR_GET(gl_header_exists) = yes; then AS_VAR_POPDEF([gl_header_exists]) ]) AC_LANG_CONFTEST( [AC_LANG_SOURCE( [[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]] )]) dnl AIX "xlc -E" and "cc -E" omit #line directives for header dnl files that contain only a #include of other header files and dnl no non-comment tokens of their own. This leads to a failure dnl to detect the absolute name of , , dnl and others. The workaround is to force preservation dnl of comments through option -C. This ensures all necessary dnl #line directives are present. GCC supports option -C as well. case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac dnl eval is necessary to expand gl_absname_cpp. dnl Ultrix and Pyramid sh refuse to redirect output of eval, dnl so use subshell. AS_VAR_SET([gl_next_header], ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{ s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1# s#^/[^/]#//&# p q }'`'"']) m4_if([$2], [check], [else AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) fi ]) ]) fi AC_SUBST( AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])), [AS_VAR_GET([gl_next_header])]) if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'gl_HEADER_NAME'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=AS_VAR_GET([gl_next_header]) fi AC_SUBST( AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])), [$gl_next_as_first_directive]) AS_VAR_POPDEF([gl_next_header])]) ]) # Autoconf 2.68 added warnings for our use of AC_COMPILE_IFELSE; # this fallback is safe for all earlier autoconf versions. m4_define_default([AC_LANG_DEFINES_PROVIDED]) gv-3.7.4/m4/malloca.m40000664000076400007640000000110111735103745011265 00000000000000# malloca.m4 serial 1 dnl Copyright (C) 2003-2004, 2006-2007, 2009-2011 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_MALLOCA], [ dnl Use the autoconf tests for alloca(), but not the AC_SUBSTed variables dnl @ALLOCA@ and @LTALLOCA@. dnl gl_FUNC_ALLOCA dnl Already brought in by the module dependencies. AC_REQUIRE([gl_EEMALLOC]) AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) ]) gv-3.7.4/m4/errno_h.m40000664000076400007640000000567011735103745011330 00000000000000# errno_h.m4 serial 9 dnl Copyright (C) 2004, 2006, 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN_ONCE([gl_HEADER_ERRNO_H], [ AC_REQUIRE([AC_PROG_CC]) AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [ AC_EGREP_CPP([booboo],[ #include #if !defined ENOMSG booboo #endif #if !defined EIDRM booboo #endif #if !defined ENOLINK booboo #endif #if !defined EPROTO booboo #endif #if !defined EMULTIHOP booboo #endif #if !defined EBADMSG booboo #endif #if !defined EOVERFLOW booboo #endif #if !defined ENOTSUP booboo #endif #if !defined ESTALE booboo #endif #if !defined EDQUOT booboo #endif #if !defined ECANCELED booboo #endif ], [gl_cv_header_errno_h_complete=no], [gl_cv_header_errno_h_complete=yes]) ]) if test $gl_cv_header_errno_h_complete = yes; then ERRNO_H='' else gl_NEXT_HEADERS([errno.h]) ERRNO_H='errno.h' fi AC_SUBST([ERRNO_H]) AM_CONDITIONAL([GL_GENERATE_ERRNO_H], [test -n "$ERRNO_H"]) gl_REPLACE_ERRNO_VALUE([EMULTIHOP]) gl_REPLACE_ERRNO_VALUE([ENOLINK]) gl_REPLACE_ERRNO_VALUE([EOVERFLOW]) ]) # Assuming $1 = EOVERFLOW. # The EOVERFLOW errno value ought to be defined in , according to # POSIX. But some systems (like OpenBSD 4.0 or AIX 3) don't define it, and # some systems (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined. # Check for the value of EOVERFLOW. # Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE. AC_DEFUN([gl_REPLACE_ERRNO_VALUE], [ if test -n "$ERRNO_H"; then AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [ AC_EGREP_CPP([yes],[ #include #ifdef ]$1[ yes #endif ], [gl_cv_header_errno_h_]$1[=yes], [gl_cv_header_errno_h_]$1[=no]) if test $gl_cv_header_errno_h_]$1[ = no; then AC_EGREP_CPP([yes],[ #define _XOPEN_SOURCE_EXTENDED 1 #include #ifdef ]$1[ yes #endif ], [gl_cv_header_errno_h_]$1[=hidden]) if test $gl_cv_header_errno_h_]$1[ = hidden; then dnl The macro exists but is hidden. dnl Define it to the same value. AC_COMPUTE_INT([gl_cv_header_errno_h_]$1, $1, [ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include ]) fi fi ]) case $gl_cv_header_errno_h_]$1[ in yes | no) ]$1[_HIDDEN=0; ]$1[_VALUE= ;; *) ]$1[_HIDDEN=1; ]$1[_VALUE="$gl_cv_header_errno_h_]$1[" ;; esac AC_SUBST($1[_HIDDEN]) AC_SUBST($1[_VALUE]) fi ]) dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. dnl Remove this when we can assume autoconf >= 2.61. m4_ifdef([AC_COMPUTE_INT], [], [ AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) ]) gv-3.7.4/m4/00gnulib.m40000664000076400007640000000252211735103745011305 00000000000000# 00gnulib.m4 serial 2 dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This file must be named something that sorts before all other dnl gnulib-provided .m4 files. It is needed until such time as we can dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics. # AC_DEFUN_ONCE([NAME], VALUE) # ---------------------------- # Define NAME to expand to VALUE on the first use (whether by direct # expansion, or by AC_REQUIRE), and to nothing on all subsequent uses. # Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier. This # definition is slower than the version in Autoconf 2.64, because it # can only use interfaces that existed since 2.59; but it achieves the # same effect. Quoting is necessary to avoid confusing Automake. m4_version_prereq([2.63.263], [], [m4_define([AC][_DEFUN_ONCE], [AC][_DEFUN([$1], [AC_REQUIRE([_gl_DEFUN_ONCE([$1])], [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl [AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])]) # gl_00GNULIB # ----------- # Witness macro that this file has been included. Needed to force # Automake to include this file prior to all other gnulib .m4 files. AC_DEFUN([gl_00GNULIB]) gv-3.7.4/m4/stddef_h.m40000664000076400007640000000275511735103745011455 00000000000000dnl A placeholder for POSIX 2008 , for platforms that have issues. # stddef_h.m4 serial 4 dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_STDDEF_H], [ AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) AC_REQUIRE([gt_TYPE_WCHAR_T]) STDDEF_H= if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 STDDEF_H=stddef.h fi AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions], [gl_cv_decl_null_works], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include int test[2 * (sizeof NULL == sizeof (void *)) -1]; ]])], [gl_cv_decl_null_works=yes], [gl_cv_decl_null_works=no])]) if test $gl_cv_decl_null_works = no; then REPLACE_NULL=1 STDDEF_H=stddef.h fi AC_SUBST([STDDEF_H]) AM_CONDITIONAL([GL_GENERATE_STDDEF_H], [test -n "$STDDEF_H"]) if test -n "$STDDEF_H"; then gl_NEXT_HEADERS([stddef.h]) fi ]) AC_DEFUN([gl_STDDEF_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) ]) AC_DEFUN([gl_STDDEF_H_DEFAULTS], [ dnl Assume proper GNU behavior unless another module says otherwise. REPLACE_NULL=0; AC_SUBST([REPLACE_NULL]) HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T]) ]) gv-3.7.4/m4/alloca.m40000664000076400007640000000301111735103745011112 00000000000000# alloca.m4 serial 11 dnl Copyright (C) 2002-2004, 2006-2007, 2009-2011 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_ALLOCA], [ AC_REQUIRE([AC_FUNC_ALLOCA]) if test $ac_cv_func_alloca_works = no; then gl_PREREQ_ALLOCA fi # Define an additional variable used in the Makefile substitution. if test $ac_cv_working_alloca_h = yes; then AC_CACHE_CHECK([for alloca as a compiler built-in], [gl_cv_rpl_alloca], [ AC_EGREP_CPP([Need own alloca], [ #if defined __GNUC__ || defined _AIX || defined _MSC_VER Need own alloca #endif ], [gl_cv_rpl_alloca=yes], [gl_cv_rpl_alloca=no]) ]) if test $gl_cv_rpl_alloca = yes; then dnl OK, alloca can be implemented through a compiler built-in. AC_DEFINE([HAVE_ALLOCA], [1], [Define to 1 if you have 'alloca' after including , a header that may be supplied by this distribution.]) ALLOCA_H=alloca.h else dnl alloca exists as a library function, i.e. it is slow and probably dnl a memory leak. Don't define HAVE_ALLOCA in this case. ALLOCA_H= fi else ALLOCA_H=alloca.h fi AC_SUBST([ALLOCA_H]) AM_CONDITIONAL([GL_GENERATE_ALLOCA_H], [test -n "$ALLOCA_H"]) ]) # Prerequisites of lib/alloca.c. # STACK_DIRECTION is already handled by AC_FUNC_ALLOCA. AC_DEFUN([gl_PREREQ_ALLOCA], [:]) gv-3.7.4/m4/sys_stat_h.m40000664000076400007640000000631611735103745012052 00000000000000# sys_stat_h.m4 serial 24 -*- Autoconf -*- dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Eric Blake. dnl Provide a GNU-like . AC_DEFUN([gl_HEADER_SYS_STAT_H], [ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) dnl For the mkdir substitute. AC_REQUIRE([AC_C_INLINE]) dnl Check for broken stat macros. AC_REQUIRE([AC_HEADER_STAT]) gl_CHECK_NEXT_HEADERS([sys/stat.h]) dnl Define types that are supposed to be defined in or dnl . AC_CHECK_TYPE([nlink_t], [], [AC_DEFINE([nlink_t], [int], [Define to the type of st_nlink in struct stat, or a supertype.])], [#include #include ]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include ]], [fchmodat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat]) ]) # gl_HEADER_SYS_STAT_H AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_SYS_STAT_H_DEFAULTS], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR GNULIB_FCHMODAT=0; AC_SUBST([GNULIB_FCHMODAT]) GNULIB_FSTATAT=0; AC_SUBST([GNULIB_FSTATAT]) GNULIB_FUTIMENS=0; AC_SUBST([GNULIB_FUTIMENS]) GNULIB_LCHMOD=0; AC_SUBST([GNULIB_LCHMOD]) GNULIB_LSTAT=0; AC_SUBST([GNULIB_LSTAT]) GNULIB_MKDIRAT=0; AC_SUBST([GNULIB_MKDIRAT]) GNULIB_MKFIFO=0; AC_SUBST([GNULIB_MKFIFO]) GNULIB_MKFIFOAT=0; AC_SUBST([GNULIB_MKFIFOAT]) GNULIB_MKNOD=0; AC_SUBST([GNULIB_MKNOD]) GNULIB_MKNODAT=0; AC_SUBST([GNULIB_MKNODAT]) GNULIB_STAT=0; AC_SUBST([GNULIB_STAT]) GNULIB_UTIMENSAT=0; AC_SUBST([GNULIB_UTIMENSAT]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_FCHMODAT=1; AC_SUBST([HAVE_FCHMODAT]) HAVE_FSTATAT=1; AC_SUBST([HAVE_FSTATAT]) HAVE_FUTIMENS=1; AC_SUBST([HAVE_FUTIMENS]) HAVE_LCHMOD=1; AC_SUBST([HAVE_LCHMOD]) HAVE_LSTAT=1; AC_SUBST([HAVE_LSTAT]) HAVE_MKDIRAT=1; AC_SUBST([HAVE_MKDIRAT]) HAVE_MKFIFO=1; AC_SUBST([HAVE_MKFIFO]) HAVE_MKFIFOAT=1; AC_SUBST([HAVE_MKFIFOAT]) HAVE_MKNOD=1; AC_SUBST([HAVE_MKNOD]) HAVE_MKNODAT=1; AC_SUBST([HAVE_MKNODAT]) HAVE_UTIMENSAT=1; AC_SUBST([HAVE_UTIMENSAT]) REPLACE_FSTAT=0; AC_SUBST([REPLACE_FSTAT]) REPLACE_FSTATAT=0; AC_SUBST([REPLACE_FSTATAT]) REPLACE_FUTIMENS=0; AC_SUBST([REPLACE_FUTIMENS]) REPLACE_LSTAT=0; AC_SUBST([REPLACE_LSTAT]) REPLACE_MKDIR=0; AC_SUBST([REPLACE_MKDIR]) REPLACE_MKFIFO=0; AC_SUBST([REPLACE_MKFIFO]) REPLACE_MKNOD=0; AC_SUBST([REPLACE_MKNOD]) REPLACE_STAT=0; AC_SUBST([REPLACE_STAT]) REPLACE_UTIMENSAT=0; AC_SUBST([REPLACE_UTIMENSAT]) ]) gv-3.7.4/m4/onceonly.m40000664000076400007640000000754611735103745011526 00000000000000# onceonly.m4 serial 7 dnl Copyright (C) 2002-2003, 2005-2006, 2008-2011 Free Software Foundation, dnl Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl This file defines some "once only" variants of standard autoconf macros. dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS dnl AC_REQUIRE([AC_FUNC_STRCOLL]) like AC_FUNC_STRCOLL dnl The advantage is that the check for each of the headers/functions/decls dnl will be put only once into the 'configure' file. It keeps the size of dnl the 'configure' file down, and avoids redundant output when 'configure' dnl is run. dnl The drawback is that the checks cannot be conditionalized. If you write dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to dnl empty, and the check will be inserted before the body of the AC_DEFUNed dnl function. dnl The original code implemented AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE dnl in terms of AC_DEFUN and AC_REQUIRE. This implementation uses diversions to dnl named sections DEFAULTS and INIT_PREPARE in order to check all requested dnl headers at once, thus reducing the size of 'configure'. It is known to work dnl with autoconf 2.57..2.62 at least . The size reduction is ca. 9%. dnl Autoconf version 2.59 plus gnulib is required; this file is not needed dnl with Autoconf 2.60 or greater. But note that autoconf's implementation of dnl AC_CHECK_DECLS_ONCE expects a comma-separated list of symbols as first dnl argument! AC_PREREQ([2.59]) # AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of # AC_CHECK_HEADERS(HEADER1 HEADER2 ...). AC_DEFUN([AC_CHECK_HEADERS_ONCE], [ : m4_foreach_w([gl_HEADER_NAME], [$1], [ AC_DEFUN([gl_CHECK_HEADER_]m4_quote(m4_translit(gl_HEADER_NAME, [./-], [___])), [ m4_divert_text([INIT_PREPARE], [gl_header_list="$gl_header_list gl_HEADER_NAME"]) gl_HEADERS_EXPANSION AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_HEADER_NAME])), [Define to 1 if you have the <]m4_defn([gl_HEADER_NAME])[> header file.]) ]) AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(m4_translit(gl_HEADER_NAME, [./-], [___]))) ]) ]) m4_define([gl_HEADERS_EXPANSION], [ m4_divert_text([DEFAULTS], [gl_header_list=]) AC_CHECK_HEADERS([$gl_header_list]) m4_define([gl_HEADERS_EXPANSION], []) ]) # AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of # AC_CHECK_FUNCS(FUNC1 FUNC2 ...). AC_DEFUN([AC_CHECK_FUNCS_ONCE], [ : m4_foreach_w([gl_FUNC_NAME], [$1], [ AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [ m4_divert_text([INIT_PREPARE], [gl_func_list="$gl_func_list gl_FUNC_NAME"]) gl_FUNCS_EXPANSION AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_FUNC_NAME])), [Define to 1 if you have the `]m4_defn([gl_FUNC_NAME])[' function.]) ]) AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME])) ]) ]) m4_define([gl_FUNCS_EXPANSION], [ m4_divert_text([DEFAULTS], [gl_func_list=]) AC_CHECK_FUNCS([$gl_func_list]) m4_define([gl_FUNCS_EXPANSION], []) ]) # AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of # AC_CHECK_DECLS(DECL1, DECL2, ...). AC_DEFUN([AC_CHECK_DECLS_ONCE], [ : m4_foreach_w([gl_DECL_NAME], [$1], [ AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [ AC_CHECK_DECLS(m4_defn([gl_DECL_NAME])) ]) AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME])) ]) ]) gv-3.7.4/m4/time_h.m40000664000076400007640000001022711735103745011133 00000000000000# Configure a more-standard replacement for . # Copyright (C) 2000-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. # serial 4 # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Written by Paul Eggert and Jim Meyering. AC_DEFUN([gl_HEADER_TIME_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_HEADER_TIME_H_BODY]) ]) AC_DEFUN([gl_HEADER_TIME_H_BODY], [ AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) gl_NEXT_HEADERS([time.h]) AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC]) ]) dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared dnl in time.h, sys/time.h, or pthread.h. AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], [ AC_CHECK_HEADERS_ONCE([sys/time.h]) AC_CACHE_CHECK([for struct timespec in ], [gl_cv_sys_struct_timespec_in_time_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], [gl_cv_sys_struct_timespec_in_time_h=yes], [gl_cv_sys_struct_timespec_in_time_h=no])]) TIME_H_DEFINES_STRUCT_TIMESPEC=0 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then TIME_H_DEFINES_STRUCT_TIMESPEC=1 else AC_CACHE_CHECK([for struct timespec in ], [gl_cv_sys_struct_timespec_in_sys_time_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], [gl_cv_sys_struct_timespec_in_sys_time_h=yes], [gl_cv_sys_struct_timespec_in_sys_time_h=no])]) if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 else AC_CACHE_CHECK([for struct timespec in ], [gl_cv_sys_struct_timespec_in_pthread_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], [gl_cv_sys_struct_timespec_in_pthread_h=yes], [gl_cv_sys_struct_timespec_in_pthread_h=no])]) if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 fi fi fi AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC]) AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC]) AC_SUBST([PTHREAD_H_DEFINES_STRUCT_TIMESPEC]) ]) AC_DEFUN([gl_TIME_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS], [ GNULIB_MKTIME=0; AC_SUBST([GNULIB_MKTIME]) GNULIB_NANOSLEEP=0; AC_SUBST([GNULIB_NANOSLEEP]) GNULIB_STRPTIME=0; AC_SUBST([GNULIB_STRPTIME]) GNULIB_TIMEGM=0; AC_SUBST([GNULIB_TIMEGM]) GNULIB_TIME_R=0; AC_SUBST([GNULIB_TIME_R]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_LOCALTIME_R=1; AC_SUBST([HAVE_DECL_LOCALTIME_R]) HAVE_NANOSLEEP=1; AC_SUBST([HAVE_NANOSLEEP]) HAVE_STRPTIME=1; AC_SUBST([HAVE_STRPTIME]) HAVE_TIMEGM=1; AC_SUBST([HAVE_TIMEGM]) dnl If another module says to replace or to not replace, do that. dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK; dnl this lets maintainers check for portability. REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R]) REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME]) REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP]) REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM]) ]) gv-3.7.4/m4/eealloc.m40000664000076400007640000000172311735103745011273 00000000000000# eealloc.m4 serial 2 dnl Copyright (C) 2003, 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_EEALLOC], [ AC_REQUIRE([gl_EEMALLOC]) AC_REQUIRE([gl_EEREALLOC]) AC_REQUIRE([AC_C_INLINE]) ]) AC_DEFUN([gl_EEMALLOC], [ _AC_FUNC_MALLOC_IF( [gl_cv_func_malloc_0_nonnull=1], [gl_cv_func_malloc_0_nonnull=0]) AC_DEFINE_UNQUOTED([MALLOC_0_IS_NONNULL], [$gl_cv_func_malloc_0_nonnull], [If malloc(0) is != NULL, define this to 1. Otherwise define this to 0.]) ]) AC_DEFUN([gl_EEREALLOC], [ _AC_FUNC_REALLOC_IF( [gl_cv_func_realloc_0_nonnull=1], [gl_cv_func_realloc_0_nonnull=0]) AC_DEFINE_UNQUOTED([REALLOC_0_IS_NONNULL], [$gl_cv_func_realloc_0_nonnull], [If realloc(NULL,0) is != NULL, define this to 1. Otherwise define this to 0.]) ]) gv-3.7.4/m4/stdlib_h.m40000664000076400007640000001160311735103745011455 00000000000000# stdlib_h.m4 serial 37 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_STDLIB_H], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) gl_NEXT_HEADERS([stdlib.h]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use, and which is not dnl guaranteed by C89. gl_WARN_ON_USE_PREPARE([[#include #if HAVE_SYS_LOADAVG_H # include #endif #if HAVE_RANDOM_H # include #endif ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt unsetenv]) ]) AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_STDLIB_H_DEFAULTS], [ GNULIB__EXIT=0; AC_SUBST([GNULIB__EXIT]) GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL]) GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX]) GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME]) GNULIB_GETLOADAVG=0; AC_SUBST([GNULIB_GETLOADAVG]) GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT]) GNULIB_GRANTPT=0; AC_SUBST([GNULIB_GRANTPT]) GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX]) GNULIB_MBTOWC=0; AC_SUBST([GNULIB_MBTOWC]) GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP]) GNULIB_MKOSTEMP=0; AC_SUBST([GNULIB_MKOSTEMP]) GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS]) GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP]) GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS]) GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME]) GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV]) GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R]) GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH]) GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH]) GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV]) GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD]) GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL]) GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL]) GNULIB_SYSTEM_POSIX=0; AC_SUBST([GNULIB_SYSTEM_POSIX]) GNULIB_UNLOCKPT=0; AC_SUBST([GNULIB_UNLOCKPT]) GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV]) GNULIB_WCTOMB=0; AC_SUBST([GNULIB_WCTOMB]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE__EXIT=1; AC_SUBST([HAVE__EXIT]) HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL]) HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST([HAVE_CANONICALIZE_FILE_NAME]) HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT]) HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP]) HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS]) HAVE_MKSTEMP=1; AC_SUBST([HAVE_MKSTEMP]) HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS]) HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME]) HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H]) HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH]) HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV]) HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL]) HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL]) HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA]) HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H]) HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT]) HAVE_DECL_UNSETENV=1; AC_SUBST([HAVE_DECL_UNSETENV]) REPLACE_CALLOC=0; AC_SUBST([REPLACE_CALLOC]) REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME]) REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC]) REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC]) REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC]) REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH]) REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV]) REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD]) REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV]) REPLACE_WCTOMB=0; AC_SUBST([REPLACE_WCTOMB]) ]) gv-3.7.4/m4/unistd_h.m40000664000076400007640000001764711735103745011520 00000000000000# unistd_h.m4 serial 55 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Simon Josefsson, Bruno Haible. AC_DEFUN([gl_UNISTD_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([AC_C_INLINE]) gl_CHECK_NEXT_HEADERS([unistd.h]) if test $ac_cv_header_unistd_h = yes; then HAVE_UNISTD_H=1 else HAVE_UNISTD_H=0 fi AC_SUBST([HAVE_UNISTD_H]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include /* Some systems declare various items in the wrong headers. */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include # include # include # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include # endif #endif ]], [chown dup2 dup3 environ euidaccess faccessat fchdir fchownat fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat usleep]) ]) AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_UNISTD_H_DEFAULTS], [ GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN]) GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE]) GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2]) GNULIB_DUP3=0; AC_SUBST([GNULIB_DUP3]) GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON]) GNULIB_EUIDACCESS=0; AC_SUBST([GNULIB_EUIDACCESS]) GNULIB_FACCESSAT=0; AC_SUBST([GNULIB_FACCESSAT]) GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR]) GNULIB_FCHOWNAT=0; AC_SUBST([GNULIB_FCHOWNAT]) GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC]) GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE]) GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD]) GNULIB_GETDOMAINNAME=0; AC_SUBST([GNULIB_GETDOMAINNAME]) GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE]) GNULIB_GETGROUPS=0; AC_SUBST([GNULIB_GETGROUPS]) GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME]) GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN]) GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R]) GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE]) GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL]) GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN]) GNULIB_LINK=0; AC_SUBST([GNULIB_LINK]) GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT]) GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK]) GNULIB_PIPE=0; AC_SUBST([GNULIB_PIPE]) GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2]) GNULIB_PREAD=0; AC_SUBST([GNULIB_PREAD]) GNULIB_PWRITE=0; AC_SUBST([GNULIB_PWRITE]) GNULIB_READ=0; AC_SUBST([GNULIB_READ]) GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK]) GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT]) GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR]) GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP]) GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK]) GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT]) GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R]) GNULIB_UNISTD_H_GETOPT=0; AC_SUBST([GNULIB_UNISTD_H_GETOPT]) GNULIB_UNISTD_H_NONBLOCKING=0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING]) GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK]) GNULIB_UNLINKAT=0; AC_SUBST([GNULIB_UNLINKAT]) GNULIB_USLEEP=0; AC_SUBST([GNULIB_USLEEP]) GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN]) HAVE_DUP2=1; AC_SUBST([HAVE_DUP2]) HAVE_DUP3=1; AC_SUBST([HAVE_DUP3]) HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS]) HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT]) HAVE_FCHDIR=1; AC_SUBST([HAVE_FCHDIR]) HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT]) HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC]) HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE]) HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE]) HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS]) HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN]) HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN]) HAVE_LINK=1; AC_SUBST([HAVE_LINK]) HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT]) HAVE_PIPE=1; AC_SUBST([HAVE_PIPE]) HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2]) HAVE_PREAD=1; AC_SUBST([HAVE_PREAD]) HAVE_PWRITE=1; AC_SUBST([HAVE_PWRITE]) HAVE_READLINK=1; AC_SUBST([HAVE_READLINK]) HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT]) HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK]) HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT]) HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT]) HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP]) HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON]) HAVE_DECL_FCHDIR=1; AC_SUBST([HAVE_DECL_FCHDIR]) HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME]) HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE]) HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL]) HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R]) HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2]) REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT]) REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME]) REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R]) REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) REPLACE_LINK=0; AC_SUBST([REPLACE_LINK]) REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT]) REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK]) REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD]) REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE]) REPLACE_READ=0; AC_SUBST([REPLACE_READ]) REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK]) REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR]) REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP]) REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK]) REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R]) REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK]) REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT]) REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP]) REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE]) UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H]) UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS]) ]) gv-3.7.4/config.sub0000755000076400007640000010316712121323352011057 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-11-20' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, 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 General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | ubicom32 \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gv-3.7.4/missing0000755000076400007640000002623312121323352010471 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU 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 General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gv-3.7.4/Makefile.in0000664000076400007640000010450012121323352011133 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Makefile.am for gv/ # # Time-stamp: "07/06/25 19:48:00 jemarch" # # Copyrigh (C) 2004 José E. Marchesi # Process this file with automake to get Makefile.in VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ ChangeLog INSTALL NEWS config.guess config.sub depcomp \ install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/canonicalize.m4 \ $(top_srcdir)/m4/double-slash-root.m4 \ $(top_srcdir)/m4/eealloc.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/getopt.m4 \ $(top_srcdir)/m4/gettimeofday.m4 \ $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 \ $(top_srcdir)/m4/include_next.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mkdtemp.m4 \ $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/multiarch.m4 \ $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/pathmax.m4 \ $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/signal_h.m4 \ $(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/stdbool.m4 \ $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/sys_stat_h.m4 \ $(top_srcdir)/m4/sys_time_h.m4 $(top_srcdir)/m4/tempname.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/wchar_t.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/ac_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEPS_CFLAGS = @DEPS_CFLAGS@ DEPS_LIBS = @DEPS_LIBS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ GETOPT_H = @GETOPT_H@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_READ = @GNULIB_READ@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ LDFLAGS = @LDFLAGS@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANUALEDITION = @MANUALEDITION@ MKDIR_P = @MKDIR_P@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PAPERSIZE = @PAPERSIZE@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRINT_COMMAND = @PRINT_COMMAND@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WRITE = @REPLACE_WRITE@ SAVE_DIR = @SAVE_DIR@ SCRATCH_DIR = @SCRATCH_DIR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_BACKING_PIXMAP = @USE_BACKING_PIXMAP@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = lib src doc EXTRA_DIST = README.I18N README.TRANSLATION all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \ distclean distclean-generic distclean-tags distcleancheck \ distdir distuninstallcheck dvi dvi-am html html-am info \ info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gv-3.7.4/config.guess0000755000076400007640000012761512121323352011420 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-11-20' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, 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 # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner. Please send patches (context # diff format) to and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gv-3.7.4/install-sh0000755000076400007640000003253712121323352011102 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gv-3.7.4/INSTALL0000644000076400007640000003633212121323352010124 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. gv-3.7.4/warn-on-use.h0000664000076400007640000001201611735103746011427 00000000000000/* A C macro for emitting warnings if a function is used. Copyright (C) 2010-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration for FUNCTION which will then trigger a compiler warning containing the text of "literal string" anywhere that function is called, if supported by the compiler. If the compiler does not support this feature, the macro expands to an unused extern declaration. This macro is useful for marking a function as a potential portability trap, with the intent that "literal string" include instructions on the replacement function that should be used instead. However, one of the reasons that a function is a portability trap is if it has the wrong signature. Declaring FUNCTION with a different signature in C is a compilation error, so this macro must use the same type as any existing declaration so that programs that avoid the problematic FUNCTION do not fail to compile merely because they included a header that poisoned the function. But this implies that _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already have a declaration. Use of this macro implies that there must not be any other macro hiding the declaration of FUNCTION; but undefining FUNCTION first is part of the poisoning process anyway (although for symbols that are provided only via a macro, the result is a compilation error rather than a warning containing "literal string"). Also note that in C++, it is only safe to use if FUNCTION has no overloads. For an example, it is possible to poison 'getline' by: - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], [getline]) in configure.ac, which potentially defines HAVE_RAW_DECL_GETLINE - adding this code to a header that wraps the system : #undef getline #if HAVE_RAW_DECL_GETLINE _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" "not universally present; use the gnulib module getline"); #endif It is not possible to directly poison global variables. But it is possible to write a wrapper accessor function, and poison that (less common usage, like &environ, will cause a compilation error rather than issue the nice warning, but the end result of informing the developer about their portability problem is still achieved): #if HAVE_RAW_DECL_ENVIRON static inline char ***rpl_environ (void) { return &environ; } _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); # undef environ # define environ (*rpl_environ ()) #endif */ #ifndef _GL_WARN_ON_USE # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ extern __typeof__ (function) function __attribute__ ((__warning__ (message))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ extern __typeof__ (function) function # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif /* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") is like _GL_WARN_ON_USE (function, "string"), except that the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ extern rettype function parameters_and_attributes \ __attribute__ ((__warning__ (msg))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ extern rettype function parameters_and_attributes # else /* Unsupported. */ # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif /* _GL_WARN_EXTERN_C declaration; performs the declaration with C linkage. */ #ifndef _GL_WARN_EXTERN_C # if defined __cplusplus # define _GL_WARN_EXTERN_C extern "C" # else # define _GL_WARN_EXTERN_C extern # endif #endif gv-3.7.4/configure.ac0000664000076400007640000002456712117144345011402 00000000000000dnl configure.ac for gv dnl Time-stamp: "07/06/28 15:57:39 jemarch" dnl Copyright (C) 2004 José E. Marchesi dnl Please process this file with `autoconf' to get a configure script AC_INIT(src/ps.c) AM_INIT_AUTOMAKE(gv,3.7.4) AM_CONFIG_HEADER(src/ac_config.h) dnl AM_CONFIG_HEADER(src/ac_config.h) AM_MAINTAINER_MODE dnl gv version VERSION=3.7.4 dnl manual edition MANUALEDITION=First AC_SUBST(VERSION) AC_SUBST(MANUALEDITION) AC_PROG_MKDIR_P dnl DEFUNS AC_DEFUN([AC_XT_VERSION6], [AC_MSG_CHECKING([For Xt Revision > 4]) AC_CACHE_VAL(XT_cv_version,[ AC_TRY_LINK([#include ], [#if XtSpecificationRelease < 5 fail; #endif ], XT_cv_version="yes", [AC_MSG_RESULT(no)]) ]) ]) dnl Check for programs AC_PROG_CC AC_PROG_RANLIB gl_EARLY gl_INIT dnl Search for libraries LIBS="$X_LIBS" AC_CHECK_LIB(m, sqrt) AC_CHECK_LIB(fl, yywrap) # Needed e. g. on Mac OS AC_CHECK_LIB(iconv, iconv_open) AC_ARG_WITH(libzio, AC_HELP_STRING([--without-libzio],[Do not probe for libzio]), opt_zio=$withval, opt_zio=yes) if test "$opt_zio" != "no" ; then # # Check for zlib and libbz2 libraries to use this together # with SuSE's libzio to open compressed files. # savedLIBS=$LIBS AC_CHECK_HEADER(zlib.h,[ for lib in z gz do AC_CHECK_LIB($lib, gzopen, [LIBS="$LIBS -l$lib" ; break]) done]) AC_CHECK_HEADER(bzlib.h,[ for lib in bz2 bzip2 do AC_CHECK_LIB($lib, BZ2_bzopen, [LIBS="$LIBS -l$lib" ; break]) done]) AC_CHECK_HEADER(zio.h,[ AC_CHECK_LIB(zio, fzopen, [LIBS="$LIBS -lzio" ; AC_DEFINE(HAVE_ZIO, 1, [Have ZIO Library])],[LIBS=$savedLIBS]) ],[LIBS=$savedLIBS]) fi dnl WITH options AC_ARG_WITH(default-papersize, AC_HELP_STRING([--with-default-papersize=PSIZE],[The default papersize (can be changed at runtime). Defaults to `A4']), opt_default_papersize=$withval, opt_default_papersize=A4) test "$opt_default_papersize" = "yes" && { opt_default_papersize=A4 } PAPERSIZE=$opt_default_papersize AC_SUBST(PAPERSIZE) AC_ARG_WITH(print-command, AC_HELP_STRING([--with-print-command=COMMAND],[Command for spool a print job. Defaults for `lpr']), opt_print_command=$withval, opt_print_command=lpr) test "$opt_print_command" = "yes" && { opt_print_command=\"lpr\" } PRINT_COMMAND=$opt_print_command AC_SUBST(PRINT_COMMAND) AC_ARG_WITH(user-defaults-file, AC_HELP_STRING([--with-user-defaults-file=PATH],[The file containing your preferences. It defaults to `~/.gv'.]), opt_user_defaults_file=$withval, opt_user_defaults_file="~/.gv") test "$opt_user_defaults_file" = "yes" && { opt_user_defaults_file="~/.gv" } AC_DEFINE_UNQUOTED(USER_DEFAULTS,"$opt_user_defaults_file", "Define USER_DEFAULTS") AC_ARG_WITH(scratch-dir,AC_HELP_STRING([--with-scratch-dir=PATH],[Temporary directory. Must be terminated with a trailing `/'. Defaults to `/tmp/']), opt_scratch_dir=$withval, opt_scratch_dir="/tmp/") test "$opt_scratch_dir" = "yes" && { opt_scratch_dir="/tmp/" } SCRATCH_DIR=$opt_scratch_dir AC_SUBST(SCRATCH_DIR) AC_ARG_WITH(save-dir,AC_HELP_STRING([--with-save-dir=PATH],[The default directory for saving. Must be terminated with a trailing `/'. Defaults to `~/']), opt_save_dir=$withval, opt_save_dir="~/") test "$opt_save_dir" = "yes" && { opt_save_dir="~/" } SAVE_DIR=$opt_save_dir AC_SUBST(SAVE_DIR) dnl ENABLE options AC_ARG_ENABLE(ps-level-one, AC_HELP_STRING([--enable-ps-level-one],[Produce Level 1 PostScript]), opt_ps_level_one=$enableval, opt_ps_level_one=no) test "$opt_ps_level_one" = "yes" && { AC_DEFINE(PSLevel1,[], [Define PRODUCE_PS_LEVEL_ONE]) } dnl TESTED AC_ARG_ENABLE(signal-handler, AC_HELP_STRING([--enable-signal-handler],[Use a signal handler intercepting SIGTERM,SIGQUIT, SIGHUP snd SIGINT signals. It requires X11R6. Defaults to `yes']), opt_signal_handler=$enableval, opt_signal_handler=yes) test "x$opt_signal_handler" = "xyes" && { AC_DEFINE(USE_SIGNAL_HANDLER,[],[Define USE_SIGNAL_HANDLER]) } AC_ARG_ENABLE(backing-pixmap, AC_HELP_STRING([--enable-backing-pixmap],[Use a backing pixmap and not rely on the XServer to maintain backing store (can be changed at runtime). Defaults to `yes']), opt_backing_pixmap=$enableval, opt_backing_pixmap=yes) test "$opt_backing_pixmap" = "yes" && { dnl AC_DEFINE(USE_BACKING_PIXMAP, True, [Define USE_BACKING_PIXMAP]) USE_BACKING_PIXMAP=True } test "$opt_backing_pixmap" = "no" && { USE_BACKING_PIXMAP=False } AC_SUBST(USE_BACKING_PIXMAP) AC_ARG_ENABLE(scrollbar-code, AC_HELP_STRING([--enable-scrollbar-code],[Use gv's own Motif like scrollbar. It defaults to `yes']), [case "${enableval}" in yes) opt_scrollbar_code=true ;; no) opt_scrollbar_code=false ;; *) AC_MSG_ERROR([bad value ${enableval} for --enable-scrollbar-code]) ;; esac], [opt_scrollbar_code=true]) AM_CONDITIONAL(USE_SCROLLBAR_CODE, test x$opt_scrollbar_code = xtrue) AC_ARG_ENABLE(memmove-code, AC_HELP_STRING([--enable-memmove-code],[Use gv's own memmove. It defaults to `yes']), opt_memmove_code=$enableval, opt_memmove_code=yes) test "$opt_memmove_code" = "yes" && { AC_DEFINE(USE_MEMMOVE_CODE,[],[Define USE_MEMMOVE_CODE]) } AC_ARG_ENABLE(runtime-messages, AC_HELP_STRING([--enable-runtime-messages],[Generate informative messages at runtime. It defaults to `no']), opt_runtime_messages=$enableval, opt_runtime_messages=no) test "$opt_runtime_messages" = "yes" && { AC_DEFINE(MESSAGES,[],[Define MESSAGES]) AC_DEFINE(MESSAGE_NO_ESC,[],[Define MESSAGE_NO_ESC]) } AC_ARG_ENABLE(fallback-styles, AC_HELP_STRING([--enable-fallback-styles],[Compile X resource files into the executable. Defaults to `yes']), opt_fallback_styles=$enableval, opt_fallback_styles=yes) test "$opt_fallback_styles" = "yes" && { dnl USE_FALLBACK_STYLES=-DUSE_FALLBACK_STYLES AC_DEFINE(USE_FALLBACK_STYLES,[],[Define USE_FALLBACK_STYLES]) } AM_CONDITIONAL(ENABLE_FALLBACK_STYLES, test x$opt_fallback_styles = xyes) AC_ARG_ENABLE(memmove-code, AC_HELP_STRING([--enable-memmove-code],[Use gv's own memmove. It defaults to `yes']), opt_memmove_code=$enableval, opt_memmove_code=yes) test "$opt_memmove_code" = "yes" && { AC_DEFINE(USE_MEMMOVE_CODE,[],[Define USE_MEMMOVE_CODE]) } AC_ARG_ENABLE(international, AC_HELP_STRING([--enable-international],[Enable international by default. It defaults to `no']), opt_international=$enableval, opt_international=no) AM_CONDITIONAL(ENABLE_INTERNATIONAL, test x$opt_international = xyes) AC_MSG_CHECKING([for SIGCLD]) AC_EGREP_CPP(we_have_sigcld, [#include #ifdef SIGCLD we_have_sigcld #endif ], AC_DEFINE([HAVE_SIGCLD], [1], [Define to 1 if you have the sigcld signal.]) haveSIGCLD=yes, haveSIGCLD=no) AC_MSG_RESULT([$haveSIGCLD]) AC_MSG_CHECKING([for SIGCHLD]) AC_EGREP_CPP(we_have_sigchld, [#include #ifdef SIGCHLD we_have_sigchld #endif ], AC_DEFINE([HAVE_SIGCHLD], [1], [Define to 1 if you have the sigchld signal.]) haveSIGCHLD=yes, haveSIGCHLD=no) AC_MSG_RESULT([$haveSIGCHLD]) AC_ARG_ENABLE(SIGCHLD-fallback, AC_HELP_STRING([--enable-SIGCHLD-fallback],[Use SIGCHLD as a fallback to SIGCLD. Defaults to 'no']), [case "${enableval}" in yes) opt_sigchld=true ;; no) opt_sigchld=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-SIGCHLD-fallback) ;; esac],[opt_sigchld=false]) if test "x$haveSIGCLD" = "xno" then if test x$opt_sigchld = xfalse then AC_ERROR([SIGCLD is needed. You can try --enable-SIGCHLD-fallback. It's secure on MacOS X, but on FreeBSD the fallback creates zombies.]) else AC_DEFINE([SIGCLD], [SIGCHLD], [Use SIGCHLD as fallback for SIGCLD.]) fi fi opt_setenv_code=unknown AC_ARG_ENABLE(setenv-code, AC_HELP_STRING([--enable-setenv-code],[Use extra code for setenv() and getenv(). Defaults to `no']), [case "${enableval}" in yes) opt_setenv_code=true ;; no) opt_setenv_code=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-setenv-code) ;; esac],[opt_setenv_code=unknown]) if test x$opt_setenv_code = xunknown then AC_CHECK_FUNCS([setenv unsetenv],[],[AC_MSG_ERROR(The configure option --disable-setenv-code or --enable-setenv-code should help.)]) fi AM_CONDITIONAL(USE_SETENV_CODE, test x$opt_setenv_code = xtrue) AC_ARG_ENABLE(off_t, AC_HELP_STRING([--enable-off_t],[Use code with off_t and fopen, ftello, fseeko, stat for potential large file support. It defaults to auto detection. largefile only has effects if this option is turned on.]), [case "${enableval}" in yes) opt_off_t=true ;; no) opt_off_t=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-off_t) ;; esac],[ AC_CHECK_FUNCS([ftello fseeko], [opt_off_t=true], [opt_off_t=false]) ]) test "$opt_off_t" = "true" && { AC_SYS_LARGEFILE AC_FUNC_FSEEKO echo Enabling LFS. AC_DEFINE(HAVE_OFF_T, [], [Use fopen, ftello, fseeko, ...]) } AM_CONDITIONAL(USE_OFF_T, test x$opt_off_t = xtrue) #################### X11 related stuff ###################### AC_PATH_XTRA() AC_CHECK_LIB(X11, XOpenDisplay, , , $X_LIBS) AC_CHECK_LIB(ICE, main, , , $X_LIBS) AC_CHECK_LIB(SM, main, , , $X_LIBS) AC_CHECK_LIB(Xext, main, , , $X_LIBS) AC_CHECK_LIB(Xt, XtOpenDisplay, , , $X_LIBS) AC_CHECK_LIB(Xmu, main, , , $X_LIBS) AC_CHECK_LIB(Xpm, main, , , $X_LIBS) PKG_CHECK_MODULES([DEPS], [xaw3d], [true], [DEPS_CFLAGS=""; DEPS_LIB=""]) AC_CHECK_LIB([Xaw3d], XawInitializeWidgetSet,, AC_ERROR([Unable to find a valid Xaw3d library. Please install it and rerun configure.]), $X_LIBS) CFLAGS="$CFLAGS $DEPS_CFLAGS" LIBS="$LIBS $DEPS_LIBS" myCPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS" ## AC_CHECK_MEMBER(SimplePart.international,,[AC_MSG_ERROR([Xaw3d misses internationalisation support])],[#include ]) AC_CHECK_MEMBER(SimplePart.international,[opt_xaw3d_international=true],[opt_xaw3d_international=false],[#include ]) test x$opt_xaw3d_international = xtrue && { AC_DEFINE(HAVE_XAW3D_INTERNATIONAL,[],[Define USE_XAW3D_INTERNATIONAL]) } test x$opt_xaw3d_international = xfalse && { echo echo "****************************************************" echo "WARNING: international support has not been detected" echo " in your version of Xaw3d. The UTF8-Support" echo " of GNU gv has been disabled." echo "****************************************************" echo } CPPFLAGS="$myCPPFLAGS" AC_CHECK_LIB(Xinerama, main, , , $X_LIBS) #################### END: X11 related stuff ###################### dnl Generate output files AC_OUTPUT(Makefile lib/Makefile src/Makefile doc/Makefile) gv-3.7.4/src/0000775000076400007640000000000012121323370007735 500000000000000gv-3.7.4/src/version.c0000664000076400007640000001720411735103746011527 00000000000000/* ** ** version.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include "config.h" #include #include "paths.h" #include INC_X11(IntrinsicP.h) #include INC_X11(StringDefs.h) #include INC_XMU(Misc.h) #include INC_XMU(Converters.h) #include INC_XAW(Form.h) #include INC_XAW(Label.h) #include INC_X11(Shell.h) #include "AaaP.h" #include "Button.h" #include "types.h" #include "main_resources.h" #include "main_globals.h" #include "popup.h" #include "resource.h" /*### local declarations and application dependencies ##################*/ #include "versionp.h" static void makeVersionPopup(Widget, String); static Bool versionPanelCreated = False; static Bool version_up = False; /*############################################################################### cb_popdownVersionPopup Pop down the version information panel. ###############################################################################*/ void cb_popdownVersionPopup(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { BEGINMESSAGE(cb_popdownVersionPopup) if (version_up) { XtPopdown(versionpopup); version_up = False; } if (versionPanelCreated==True) { INFMESSAGE(destroying versionpopup) XtDestroyWidget(versionpopup); versionpopup=NULL; versionPanelCreated = False; } ENDMESSAGE(cb_popdownVersionPopup) } /*############################################################################### cb_popupVersionPopup Pop up the version information panel. ###############################################################################*/ void cb_popupVersionPopup(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { BEGINMESSAGE(cb_popupVersionPopup) if (!version_up) { if (versionPanelCreated==False) { makeVersionPopup(VERSION_TOPLEVEL,"versionPopup"); popup_positionPopup(versionpopup,viewFrame,POPUP_POSITION_POS,4,4); } XtPopup(versionpopup,XtGrabExclusive); version_up=True; } ENDMESSAGE(cb_popupVersionPopup) } /*######################################################################## SetVersionPopupLayout ########################################################################*/ /* static char *VersionPopup_layout = etc. etc. static void SetVersionPopupLayout(Widget l) { static XrmValue from,to; static Bool success=False; static BoxPtr layout; Arg args[5]; Cardinal n; BEGINMESSAGE(SetVersionPopupLayout) SMESSAGE(XtName(l)) from.size = strlen(VersionPopup_layout)+1; from.addr = VersionPopup_layout; to.size = sizeof(BoxPtr *); to.addr = (char*) ((BoxPtr *) &layout); if (success==False) { INFMESSAGE(converting) success = XtConvertAndStore ( l, XtRString, (XrmValuePtr) &(from), XtRLayout, (XrmValuePtr) &(to) ); } if (success) { n=0; XtSetArg(args[n],XtNlayout,(BoxPtr) layout); ++n; XtSetValues(l,args,n); ENDMESSAGE(SetVersionPopupLayout) return; } XtError("Version Popup cannot set internal Layout."); } */ /*############################################################################### makeVersionPopup create the X panel to display version info ###############################################################################*/ void makeVersionPopup(Widget parent, String name) { char **line; Arg args[10]; Cardinal n; Widget versionControl; Widget versionDone; Dimension w, h; BEGINMESSAGE(makeVersionPopup) if (versionPanelCreated==True) { INFMESSAGE(version popup already exists) ENDMESSAGE(makeVersionPopup) } n=0; XtSetArg(args[n], XtNtitle, VERSION_SHELL_TITLE); n++; versionpopup = XtCreatePopupShell(name,transientShellWidgetClass,parent,args,n); n=0; versionControl = XtCreateManagedWidget("versionControl",aaaWidgetClass,versionpopup,args,n); /* SetVersionPopupLayout(versionControl); */ line = versionIdentification; n=0; XtSetArg(args[n], XtNborderWidth, 0); n++; XtSetArg(args[n], XtNjustify, XtJustifyCenter); n++; { char i = 'a'; char widgetName[15]; while (*line != NULL) { sprintf(widgetName,"versionText%c",i); XtSetArg(args[n], XtNlabel, *line); XtCreateManagedWidget(widgetName,labelWidgetClass,versionControl,args,(n+1)); line++; i++; } } n=0; XtSetArg(args[n], XtNborderWidth, 0); n++; XtSetArg(args[n], XtNjustify, XtJustifyCenter); n++; XtSetArg(args[n], XtNlabel, copyright); n++; XtCreateManagedWidget("license",labelWidgetClass,versionControl,args,n); n=0; versionDone = XtCreateManagedWidget("versionDone",buttonWidgetClass,versionControl, args, n); XtAddCallback(versionDone, XtNcallback, cb_popdownVersionPopup, NULL); line = author; n=0; XtSetArg(args[n], XtNborderWidth, 0); n++; XtSetArg(args[n], XtNjustify, XtJustifyCenter); n++; { char i = 'a'; char widgetName[10]; while (*line != NULL) { char tmp[1000]; sprintf(widgetName,"author%c",i); if ( strcmp(copyrightTranslationLabel, "N/A") ) { char tmp2[1000]; strcpy(tmp2, "Translation: "); strcat(tmp2, copyrightTranslationLabel); sprintf(tmp, *line, tmp2); } else { sprintf(tmp, *line, ""); } XtSetArg(args[n], XtNlabel, tmp); XtCreateManagedWidget(widgetName,labelWidgetClass,versionControl,args,(n+1)); line++; i++; } } XtRealizeWidget(versionpopup); AaaWidgetGetNaturalSize((AaaWidget)versionControl,&w,&h); INFIMESSAGE(natural width:,w) INFIMESSAGE(natural height:,h) n=0; XtSetArg(args[n], XtNminWidth, w); ++n; XtSetArg(args[n], XtNminHeight, h); ++n; XtSetArg(args[n], XtNmaxWidth, w); ++n; XtSetArg(args[n], XtNmaxHeight, h); ++n; XtSetValues(versionpopup, args, n); XSetWMProtocols(XtDisplay(versionpopup),XtWindow(versionpopup),&wm_delete_window,1); versionPanelCreated = True; ENDMESSAGE(makeVersionPopup) } gv-3.7.4/src/gv_unmark.xbm0000664000076400007640000000056711437764362012411 00000000000000#define unmark_width 13 #define unmark_height 23 static unsigned char unmark_bits[] = { 0xff, 0x1f, 0x7f, 0x10, 0x7f, 0x17, 0x7f, 0x10, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0x7f, 0x10, 0x7f, 0x17, 0x7f, 0x10, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0x7f, 0x10, 0x7f, 0x17, 0x7f, 0x10, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0x7f, 0x10, 0x7f, 0x17, 0x7f, 0x10, 0xff, 0x1f, }; gv-3.7.4/src/file.c0000664000076400007640000002002711735103745010755 00000000000000/* ** ** file.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** ** Changes submitted by Maurizio Loreti distributed on the public ** domain: ** ** - Code for handle bzip2 compressed files. ** */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include #include #include #include #include #include #include #include #include #include #include "paths.h" #include INC_X11(Intrinsic.h) #include "types.h" #include "config.h" #include "file.h" #include "main_resources.h" #include "main_globals.h" #ifndef ENODATA #define ENODATA ENOMSG #endif /*############################################################*/ /* file_getDirOfPath */ /*############################################################*/ char * file_getDirOfPath(char *path) { char *dir=NULL; char *pos; BEGINMESSAGE(file_getDirOfPath) if (path) { dir=XtNewString(path); pos = strrchr(dir,'/'); if (pos) { pos++; *pos='\0'; } } #ifdef MESSAGES if (!dir) { INFMESSAGE (### Warning: returning NULL) } else { INFSMESSAGE(returning, dir) } #endif ENDMESSAGE(file_getDirOfPath) return(dir); } /*############################################################*/ /* file_locateFilename */ /*############################################################*/ char * file_locateFilename(char *path) { char *tmp=NULL; BEGINMESSAGE(file_locateFileName) if (path) { tmp = strrchr(path,'/'); if (!tmp) tmp=path; else tmp++; INFSMESSAGE(found,tmp) } ENDMESSAGE(file_locateFilename) return(tmp); } /*############################################################*/ /* file_getTmpFilename */ /* provide some temporary file name */ /*############################################################*/ char * file_getTmpFilename(const char *baseDirectory, const char *baseFilename, int *filed) { char tempFilename[256]; char *tempFilenameP; char tmpNameBuf[256]; char *tmpName; char *tmpExt; char *pos; int len; BEGINMESSAGE(file_getTmpFilename) if (baseDirectory) pos = strrchr(baseDirectory, '/'); else pos = NULL; if (pos) { len = pos - baseDirectory; } else { baseDirectory = app_res.scratch_dir; len = strlen(baseDirectory); if (len > 0 && baseDirectory[len-1] == '/') len--; } if (!baseFilename) baseFilename= "."; strcpy(tmpNameBuf,baseFilename); pos = file_locateFilename(tmpNameBuf); if (pos) tmpName = pos; else tmpName = tmpNameBuf; pos = strrchr(tmpName,'.'); if (pos) { *pos='\0'; tmpExt = pos+1; } else tmpExt = ""; /* Limit filename to 39 characters (excluding dir and .tmp). This is required for VMS, but is also reasonable for Unix. */ if (strlen(tmpName)+strlen(tmpExt)>23) { if (strlen(tmpExt)>11) tmpExt[11] = '\0'; /* allow .ps_page_nnn */ if (strlen(tmpName)+strlen(tmpExt)>23) tmpName[23-strlen(tmpExt)] = '\0'; } { int done = 0; int i=1; do { int fd, l; mode_t oldumask; l = snprintf(tempFilename, sizeof(tempFilename), "%.*s/gv_%s_%s.XXXXXX", len, baseDirectory, tmpName, tmpExt); if (l < 0 || l >= (int)sizeof(tempFilename) ) break; file_translateTildeInPath(tempFilename, sizeof(tempFilename)); oldumask = umask(0077); fd = mkstemp(tempFilename); umask(oldumask); if (fd < 0) break; if (fd >= 0) { if (filed) *filed = fd; else close(fd); done = 1; } i++; } while (!done && i <= 10000); if (!done) { ENDMESSAGE(file_getTmpFilename) return NULL; } } SMESSAGE(tempFilename) tempFilenameP = XtNewString(tempFilename); ENDMESSAGE(file_getTmpFilename) return(tempFilenameP); } /*############################################################*/ /* file_translateTildeInPath */ /* Replaces tilde in string by user's home directory. */ /*############################################################*/ void file_translateTildeInPath(char *path, size_t s) { BEGINMESSAGE(file_translateTildeInPath) if (path[0] == '~' && (path[1] == '/' || path[1] == '\0')) { char *home = getenv("HOME"); if (home != NULL) { size_t pl = strlen(path); size_t hl = strlen(home); if (pl + hl - 1 < s - 1) { memmove(path + hl, path + 1, pl - 1 + 1); memcpy(path, home, hl); } } } ENDMESSAGE(file_translateTildeInPath) } /*############################################################*/ /* file_fileIsDir */ /*############################################################*/ int file_fileIsDir(char *fn) { struct stat s; int r=0; char *c; BEGINMESSAGE(file_fileIsNotUseful) if (fn) { c = strrchr(fn,'/'); if (c && (!*(c+1) || isspace(*(c+1)))) r = 1; if (!r && !stat(fn,&s) && (S_ISDIR(s.st_mode))) r=1; } IMESSAGE(r) ENDMESSAGE(file_fileIsDir) return(r); } /*############################################################*/ /* file_fileIsNotUseful */ /*############################################################*/ int file_fileIsNotUseful(char *fn) { struct stat s; int r=0; BEGINMESSAGE(file_fileIsNotUseful) if (!fn || stat(fn, &s)) r = 1; else if (S_ISDIR(s.st_mode)) { r = 1; errno = EISDIR; } else if (s.st_size == 0) { r = 1; #ifdef EFTYPE errno = EFTYPE; #else errno = ENODATA; #endif } IMESSAGE(r) ENDMESSAGE(file_fileIsNotUseful) return(r); } /*############################################################*/ /* file_pdfname2psname */ /* If the file ends in .pdf, change this to .ps.*/ /* Return pointer to temp copy if changed, else to input string. */ /*############################################################*/ char * file_pdfname2psname(char *name) { char *e; if (!name) { return(name); } e = name+strlen(name); if ((e-name)-4 >= 0) { e -= 4; if (!strcasecmp(e,".pdf")) { strcpy(e,".ps"); } } return(name); } /*############################################################*/ /* file_getUsefulName */ /*############################################################*/ char * file_getUsefulName(char *name) { char *e,*c; String mext,ext; BEGINMESSAGE(file_getUsefulName) if (!name) { ENDMESSAGE(file_getUsefulName) return(name); } INFSMESSAGE(in,name) c = e = strrchr(name,'.'); if (!e) { ENDMESSAGE(file_getUsefulName) return(name); } mext = ext = XtNewString(e); while (*ext) { *ext = tolower(*ext); ext++; } if (!strncmp(mext,".gz",3)) ext = ""; else if (!strncmp(mext,".bz2",4)) ext = ""; else if (!strncmp(mext,".z",2)) ext = ""; else if (!strncmp(mext,".ps",3)) ext = ".ps"; else if (!strncmp(mext,".pdf",4)) ext = ".pdf"; else ext = e; if (e == name && !(*ext)) { ENDMESSAGE(file_getUsefulName) return(name); } strcpy(mext,ext); ext=mext; while (*ext && *e) *ext++=*e++; strcpy(c,mext); XtFree(mext); INFSMESSAGE(out,name) ENDMESSAGE(file_getUsefulName) return(name); } gv-3.7.4/src/Vlist.h0000664000076400007640000000601511736064614011147 00000000000000/* ** ** Vlist.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _Vlist_h_ #define _Vlist_h_ #include "paths.h" #include INC_XAW(Label.h) #include INC_XAW(Reports.h) #define XawVlistAll -13 #define XawVlistEven -12 #define XawVlistOdd -11 #define XawVlistCurrent -10 #define XawVlistInvalid -1 #define XawVlistSet 1 #define XawVlistUnset 2 #define XawVlistToggle 3 #define XtNvlist "vlist" #define XtCVlist "Vlist" #define XtNmarkShadowWidth "markShadowWidth" #define XtNselectedShadowWidth "selectedShadowWidth" #define XtNhighlightedShadowWidth "highlightedShadowWidth" #define XtNmarkBackground "markBackground" #define XtCMarkBackground "MarkBackground" #define XtNselectedBackground "selectedBackground" #define XtCSelectedBackground "SelectedBackground" #define XtNhighlightedBackground "highlightedBackground" #define XtCHighlightedBackground "HighlightedBackground" #define XtNhighlightedGeometry "highlightedGeometry" #define XtCHighlightedGeometry "HighlightedGeometry" #define XtNselectedGeometry "selectedGeometry" #define XtCSelectedGeometry "SelectedGeometry" #define XtNallowMarks "allowMarks" #define XtCAllowMarks "AllowMarks" extern WidgetClass vlistWidgetClass; typedef struct _VlistClassRec *VlistWidgetClass; typedef struct _VlistRec *VlistWidget; extern int VlistHighlighted (Widget); extern int VlistSelected (Widget); extern int VlistEntries (Widget); extern char* VlistVlist (Widget); extern int VlistEntryOfPosition (Widget, int); extern void VlistPositionOfEntry (Widget, int, int*, int*); extern void VlistChangeMark (Widget, int, int); extern void VlistChangeSelected (Widget, int, int); extern void VlistChangeHighlighted (Widget, int, int); extern int VlistGetFirstVisible(Widget); extern void VlistSetFirstVisible(Widget, int); extern void VlistMoveFirstVisible(Widget, int, int); extern float VlistScrollPosition(Widget); extern float VlistVisibleLength(Widget, unsigned int); extern int VlistMaxEntriesVisible (Widget, int); #endif /* _Vlist_h_ */ gv-3.7.4/src/gv-update-userconfig.in0000664000076400007640000001616311735103745014266 00000000000000#! /usr/bin/perl # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU gv; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # # Author: Markus Steinborn (see CONTRIBUTORS for the e-mail address) # This program updates ~/.gv by removing all incompatible entries. @res = (); %res = (); %resDefault = (); $saveUnchanged = 1; $help = 0; $altNavigation = 0; $replaceNavigation = 0; $i18n = 0; for $i (@ARGV) { $saveUnchanged = 0 if $i eq "-r"; $altNavigation = $replaceNavigation = 1 if $i eq "-n"; $altNavigation = $replaceNavigation = 2 if $i eq "-N"; $replaceNavigation = 1 if $i eq "-s"; $i18n = 1 if $i eq "-i"; $help = 1 if $i eq "-h"; $help = 1 if $i eq "--help"; $help = 1 if $i eq "--usage"; print "Ignoring further filename $i\n" if $i !~ /^-/ && defined $filename; $filename = $i if $i !~ /^-/ && !defined $filename; } if ($help) { print "Syntax: gv-update-userconfig [-r] [-n] [-N] [-s] [filename]\n\n"; print "filename: specifies file to update. Defaults to '~/.gv'\n"; print "-r : Remove resources that have default value, too\n"; print "-n : Switch to alternative navigation\n"; print "-N : Switch to standard navigation\n"; print "-s : Remove navigation resources\n\n"; print "gv-update-userconfig is a simple script to update an .gv config file to\n"; print "the current version of gv by removing all entries known to cause problems\n"; print "with the current version of gv.\n\n"; exit(0); } $filename = "$ENV{HOME}/.gv" unless defined $filename; open ($file, "<", $filename) or die "Cannot open $filename for reading.\n"; while (<$file>) { chomp; $read = $_; $line = $read; while ( $read =~ /\\$/ ) { $read = <$file>; chomp $read; $line .= "\n$read"; } push (@res, $line); if ($line =~ /^([^:]+):/ ) { $res{$1} = $line; } } close $file; while () { chomp; $read = $_; $line = $read; while ( $read =~ /\\$/ ) { $read = ; chomp $read; $line .= "\n$read"; } if ($line =~ /^([^:]+):/ ) { $resDefault{$1} = $line; } } $VER = "gv 3.5.8"; if (defined $res{"GV.version"}) { $res{"GV.version"} =~ m/(gv [\.0-9]+$)/ ; $VER = $1; } %remove = (); sub compare { my $a1 = $_[0]; my $a2 = $_[1]; my $b1 = substr($a1,3); my $b2 = substr($a2,3); my @c1 = split(/\./, $b1); my @c2 = split(/\./, $b2); push (@c1, "0") while @c1 < @c2; push (@c2, "0") while @c1 > @c2; for (my $i = 0; $i < @c1; $i++) { return 1 if $c1[$i] < $c2[$i]; return 0 if $c1[$i] > $c2[$i]; } return 0; } $remove{"GV.version"} = 1; $remove{"GV.scales"} = 1 if compare($VER, "gv 3.6.4.90"); $remove{"GV.gsCmdConvPDF"} = 1 if compare($VER, "gv 3.6.5.91"); $remove{"GV.scales"} = 1 if compare($VER, "gv 3.6.7.90"); $remove{"GV.control.baseTranslations"} = 1 if $replaceNavigation; $remove{"GV.control.prevPage.baseTranslations"} = 1 if $replaceNavigation; $remove{"GV.control.nextPage.baseTranslations"} = 1 if $replaceNavigation; $newfile = ""; for $line (@res) { if ($line =~ /^([^:]+):/ ) { $name = $1; $changed = 0; $tmp1 = $resDefault{$name}; $tmp2 = $line; $tmp1 =~ s/\t+/ /g; $tmp1 =~ s/\x09+/ /g; $tmp1 =~ s/: +/: /g; $tmp1 =~ s/^[\t ]+/\t/mg; $tmp1 =~ s/[\t ]+\\n/\\n/g; $tmp2 =~ s/\t+/ /g; $tmp2 =~ s/\x09+/ /g; $tmp2 =~ s/: +/: /g; $tmp2 =~ s/^[\t ]+/\t/mg; $tmp2 =~ s/[\t ]+\\n/\\m/g; $changed = 1 if $tmp1 ne $tmp2; $newfile .= "$line\n" if !defined $remove{$name} and ($saveUnchanged or $changed); if (defined $remove{$name} && $name ne "GV.version") { print "Removing resource $name\n"; } else { if (!$saveUnchanged and !$changed) { print "Removing default resource $name\n"; } } } else { $newfile .= $line."\n"; } } $newfile .= "GV.version:\t\tgv 3.6.7.90\n" unless $i18n; if ($i18n) { for $i (keys %resDefault) { $ok = 0; $ok = 1 if $i =~ /\.label$/i ; $ok = 1 if $i =~ /\.title$/i ; $ok = 1 if $i =~ /^GV\*scales/i ; $ok = 1 if $i =~ /^GV\*strings\./i ; next unless $ok; next if defined $res{$i}; $newfile .= $resDefault{$i} . "\n"; } } if ($altNavigation == 1) { $res = $resDefault{"GV.control.prevPage.baseTranslations"}; $res = $res{"GV.control.prevPage.baseTranslations"} if defined $res{"GV.control.prevPage.baseTranslations"}; $res =~ s/(:[^\n]+GV_Page\().*?\)/\1!page-1,bottom)/ ; $res =~ s/(:[^\n]+GV_Page\().*?\)/\1!page-5,bottom)/ ; $res =~ s/(:[^\n]+GV_Page\().*?\)/\1!page-10,bottom)/ ; $newfile .= "$res\n"; $res = $resDefault{"GV.control.nextPage.baseTranslations"}; $res = $res{"GV.control.nextPage.baseTranslations"} if defined $res{"GV.control.nextPage.baseTranslations"}; $res =~ s/(:[^\n]+GV_Page\().*?\)/\1!page+1,top)/ ; $res =~ s/(:[^\n]+GV_Page\().*?\)/\1!page+5,top)/ ; $res =~ s/(:[^\n]+GV_Page\().*?\)/\1!page+10,top)/ ; $newfile .= "$res\n"; $res = $resDefault{"GV.control.baseTranslations"}; $res = $res{"GV.control.baseTranslations"} if defined $res{"GV.control.baseTranslations"}; $res =~ s/(Prior:[^\n]+GV_Page\().*?\)/\1!page-1,bottom)/ ; $res =~ s/(Next:[^\n]+GV_Page\().*?\)/\1!page+1,top)/ ; $newfile .= "$res\n"; } elsif ($altNavigation == 2) { $res = $resDefault{"GV.control.prevPage.baseTranslations"}; $res = $res{"GV.control.prevPage.baseTranslations"} if defined $res{"GV.control.prevPage.baseTranslations"}; $res =~ s/(:[^\n]+GV_Page\().*?\)/\1!page-1)/ ; $res =~ s/(:[^\n]+GV_Page\().*?\)/\1!page-5)/ ; $res =~ s/(:[^\n]+GV_Page\().*?\)/\1!page-10)/ ; $newfile .= "$res\n"; $res = $resDefault{"GV.control.nextPage.baseTranslations"}; $res = $res{"GV.control.nextPage.baseTranslations"} if defined $res{"GV.control.nextPage.baseTranslations"}; $res =~ s/(:[^\n]+GV_Page\().*?\)/\1!page+1)/ ; $res =~ s/(:[^\n]+GV_Page\().*?\)/\1!page+5)/ ; $res =~ s/(:[^\n]+GV_Page\().*?\)/\1!page+10)/ ; $newfile .= "$res\n"; $res = $resDefault{"GV.control.baseTranslations"}; $res = $res{"GV.control.baseTranslations"} if defined $res{"GV.control.baseTranslations"}; $res =~ s/(Prior:[^\n]+GV_Page\().*?\)/\1!page-1)/ ; $res =~ s/(Next:[^\n]+GV_Page\().*?\)/\1!page+1)/ ; $newfile .= "$res\n"; } open ($file, ">", $filename) or die "Cannot open $filename for writing.\n"; print $file $newfile; close $file; gv-3.7.4/src/MButtonP.h0000664000076400007640000000366411735103745011563 00000000000000/* ** ** MButtonP.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _MButtonP_h_ #define _MButtonP_h_ #include "paths.h" #include "MButton.h" #include "ButtonP.h" typedef struct _MButtonClass { int makes_compiler_happy; /* not used */ } MButtonClassPart; typedef struct _MenuButtonClassRec { CoreClassPart core_class; SimpleClassPart simple_class; ThreeDClassPart threeD_class; LabelClassPart label_class; CommandClassPart command_class; ButtonClassPart button_class; MButtonClassPart mbutton_class; } MButtonClassRec; extern MButtonClassRec mButtonClassRec; typedef struct { String menu_name; } MButtonPart; typedef struct _MButtonRec { CorePart core; SimplePart simple; ThreeDPart threeD; LabelPart label; CommandPart command; ButtonPart button; MButtonPart mbutton; } MButtonRec; #endif /* _MButtonP_h_ */ gv-3.7.4/src/gv_doc.xbm0000664000076400007640000000040211437764362011645 00000000000000#define DOC_width 11 #define DOC_height 11 #define DOC_x_hot 0 #define DOC_y_hot 0 static unsigned char DOC_bits[] = { 0x00, 0x00, 0xfc, 0x01, 0x04, 0x01, 0x74, 0x01, 0x04, 0x01, 0x74, 0x01, 0x04, 0x01, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; gv-3.7.4/src/Clip.h0000664000076400007640000000456411735103745010742 00000000000000/* ** ** Clip.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Authors: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _XawClip_h #define _XawClip_h #include INC_XAW(Reports.h) /***************************************************************************** * * Clip Widget (subclass of Composite) * * This widget is similar to a viewport without scrollbars. Child movement * is done by external panners or scrollbars. * * Parameters: * * Name Class Type Default * ---- ----- ---- ------- * * background Background Pixel XtDefaultBackground * border BorderColor Pixel XtDefaultForeground * borderWidth BorderWidth Dimension 1 * height Height Dimension 0 * reportCallback ReportCallback Pointer NULL * width Width Dimension 0 * x Position Position 0 * y Position Position 0 * *****************************************************************************/ #define XtNchildX "childX" #define XtCChildX "ChildX" #define XtNchildY "childY" #define XtCChildY "ChildY" extern WidgetClass clipWidgetClass; typedef struct _ClipClassRec *ClipWidgetClass; typedef struct _ClipRec *ClipWidget; extern void ClipWidgetCheckCoordinates ( Widget /* w */, int /* x */, int /* y */, int* /* xP */, int* /* yP */ ); extern void ClipWidgetSetCoordinates ( Widget /* w */, int /* x */, int /* y */ ); #endif /* _XawClip_h */ gv-3.7.4/src/MButton.h0000664000076400007640000000261611735103745011437 00000000000000/* ** ** MButton.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org9 ** GNU Project ** */ #ifndef _MButton_h_ #define _MButton_h_ #include "paths.h" #include "Button.h" #define XtNmenuName "menuName" #define XtCMenuName "MenuName" extern WidgetClass mbuttonWidgetClass; typedef struct _MButtonClassRec *MButtonWidgetClass; typedef struct _MButtonRec *MButtonWidget; #endif /* _MButton_h_ */ gv-3.7.4/src/doc_misc.h0000664000076400007640000000351211735103745011623 00000000000000/* ** ** doc_misc.h ** ** Copyright (C) 1996-1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_DOC_MISC_H_ #define _GV_DOC_MISC_H_ extern int doc_scanFile ( FILE **, Document*, String, String, String*, String, String*, String, int, /* scanstyle */ int /* gv_gs_safeDir */ ); extern int doc_putPageInRange (Document, int); extern int doc_mediaIsOk (Document, int, int); extern int doc_boundingBoxOfPage (Document, int, int*, int*, int*, int*); extern int doc_preferredMediaOfPage (Document, int, int*, int*, int*, int*); extern int doc_preferredOrientationOfPage (Document, int); extern int doc_convStringToPage (Document, String); extern XtPageOrientation doc_convDocOrientToXtOrient (int, int); extern int doc_convStringToDocOrient (String); extern int doc_convStringToPageMedia (Document, String); #endif /* _GV_DOC_MISC_H_ */ gv-3.7.4/src/actions.h0000664000076400007640000000654711735103745011516 00000000000000/* ** ** actions.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Authors: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_ACTIONS_H_ #define _GV_ACTIONS_H_ extern void action_shellConfigureNotify (Widget,XEvent*,String*,Cardinal*); extern void action_page (Widget, XEvent *, String *, Cardinal *); extern void action_menuPopdown (Widget, XEvent *, String *, Cardinal *); extern void action_toc (Widget, XEvent *, String *, Cardinal *); extern void action_otherPage (Widget, XEvent *, String *, Cardinal *); extern void action_movePage (Widget, XEvent *, String *, Cardinal *); extern void action_panner (Widget, XEvent *, String *, Cardinal *); extern void action_antialias (Widget, XEvent *, String *, Cardinal *); extern void action_quit (Widget, XEvent *, String *, Cardinal *); extern void action_handleDSC (Widget, XEvent *, String *, Cardinal *); extern void action_handleEOF (Widget, XEvent *, String *, Cardinal *); extern void action_open (Widget, XEvent *, String *, Cardinal *); extern void action_reopen (Widget, XEvent *, String *, Cardinal *); extern void action_savepos (Widget, XEvent *, String *, Cardinal *); extern void action_presentation (Widget, XEvent *, String *, Cardinal *); extern void action_save (Widget, XEvent *, String *, Cardinal *); extern void action_print (Widget, XEvent *, String *, Cardinal *); extern void action_print_pos (Widget, XEvent *, String *, Cardinal *); extern void action_center (Widget, XEvent *, String *, Cardinal *); extern void action_setPageMark (Widget, XEvent *, String *, Cardinal *); extern void action_autoResize (Widget, XEvent *, String *, Cardinal *); extern void action_setScale (Widget, XEvent *, String *, Cardinal *); extern void action_setOrientation (Widget, XEvent *, String *, Cardinal *); extern void action_setPagemedia (Widget, XEvent *, String *, Cardinal *); extern void action_dismissPopup (Widget, XEvent *, String *, Cardinal *); extern void action_deleteWindow (Widget, XEvent *, String *, Cardinal *); extern void action_eraseLocator (Widget, XEvent *, String *, Cardinal *); extern void action_checkFile (Widget, XEvent *, String *, Cardinal *); extern void action_watchFile (Widget, XEvent *, String *, Cardinal *); extern void clean_safe_tempdir (void); #endif /* _GV_ACTIONS_H_ */ gv-3.7.4/src/Frame.h0000664000076400007640000000502511735103745011076 00000000000000/* ** ** Frame.h ** ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _XawFrame_h #define _XawFrame_h #include "paths.h" #include INC_X11(Xfuncproto.h) #define XtNshadowWidth "shadowWidth" #define XtCShadowWidth "ShadowWidth" #define XtNtopShadowPixel "topShadowPixel" #define XtCTopShadowPixel "TopShadowPixel" #define XtNbottomShadowPixel "bottomShadowPixel" #define XtCBottomShadowPixel "BottomShadowPixel" #define XtNuserData "userData" #define XtCUserData "UserData" typedef enum { XawRAISED, XawSUNKEN, XawCHISELED, XawLEDGED, XawFrameMassiveRaised } XawFrameType; #define XtNframeType "frameType" #define XtCFrameType "FrameType" #define XtRFrameType "FrameType" #ifndef XtNhSpace #define XtNhSpace "hSpace" #endif #ifndef XtNvSpace #define XtNvSpace "vSpace" #endif #ifndef XtCHSpace #define XtCHSpace "HSpace" #endif #ifndef XtCVSpace #define XtCVSpace "VSpace" #endif /* Class record constants */ extern WidgetClass frameWidgetClass; typedef struct _FrameClassRec *FrameWidgetClass; typedef struct _FrameRec *FrameWidget; _XFUNCPROTOBEGIN extern Boolean FrameConvertStringToFrameType ( Display* /* dpy */, XrmValue* /* args */, Cardinal* /* num_args */, XrmValuePtr /* fromVal */, XrmValuePtr /* toVal */, XtPointer* /* converter_data */ ); extern void FrameDrawFrame ( Widget, /* widget */ int, /* x */ int, /* y */ int, /* width */ int, /* height */ XawFrameType, /* frame_type */ int, /* shadow width */ GC, /* light GC */ GC /* dark GC */ ); _XFUNCPROTOEND #endif /* _XawFrame_h */ gv-3.7.4/src/error.h0000664000076400007640000000234711735103745011201 00000000000000/* ** ** error.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_ERROR_H_ #define _GV_ERROR_H_ #include extern char* open_fail_error (int, char *, char *, int); #endif /*_GV_ERROR_H_*/ gv-3.7.4/src/Scrollbar.c0000664000076400007640000014504311736064614011771 00000000000000/* ** ** Scrollbar.c ** ** Copyright (C) 1994, 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include #include #include #include #include "paths.h" #include INC_X11(IntrinsicP.h) #include INC_X11(StringDefs.h) #include INC_XAW(XawInit.h) #include INC_XMU(Drawing.h) #include "ScrollbarP.h" #include "actions.h" /* Private definitions. */ static char defaultTranslations[] = ": NotifyScroll()\n\ : MoveThumb() NotifyThumb() \n\ : NotifyScroll()\n\ : HandleThumb() HandleAutoscroll() \n\ : MoveThumb() NotifyThumb() \n\ : HandleThumb() \n\ : EndScroll()"; static float floatZero = 0.0; #define Offset(field) XtOffsetOf(ScrollbarRec, scrollbar.field) static XtResource resources[] = { {XtNlength, XtCLength, XtRDimension, sizeof(Dimension), Offset(length), XtRImmediate, (XtPointer) 1}, {XtNthickness, XtCThickness, XtRDimension, sizeof(Dimension), Offset(thickness), XtRImmediate, (XtPointer) 14}, {XtNorientation, XtCOrientation, XtROrientation, sizeof(XtOrientation), Offset(orientation), XtRImmediate, (XtPointer) XtorientVertical}, {XtNscrollProc, XtCCallback, XtRCallback, sizeof(XtPointer), Offset(scrollProc), XtRCallback, NULL}, {XtNthumbProc, XtCCallback, XtRCallback, sizeof(XtPointer), Offset(thumbProc), XtRCallback, NULL}, {XtNjumpProc, XtCCallback, XtRCallback, sizeof(XtPointer), Offset(jumpProc), XtRCallback, NULL}, {XtNtopOfThumb, XtCTopOfThumb, XtRFloat, sizeof(float), Offset(top), XtRFloat, (XtPointer)&floatZero}, {XtNthumb, XtCThumb, XtRBitmap, sizeof(Pixmap), Offset(thumb), XtRImmediate, (XtPointer) None}, {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), Offset(foreground), XtRString, XtDefaultForeground}, {XtNshown, XtCShown, XtRFloat, sizeof(float), Offset(shown), XtRFloat, (XtPointer)&floatZero}, {XtNminimumThumb, XtCMinimumThumb, XtRDimension, sizeof(Dimension), Offset(min_thumb), XtRImmediate, (XtPointer) 7}, {XtNshowArrows, XtCShowArrows, XtRBoolean, sizeof(Boolean), Offset(show_arrows), XtRImmediate, (XtPointer) TRUE}, {XtNthumbTopIndent, XtCThumbTopIndent, XtRDimension, sizeof(Dimension), Offset(thumb_top_indent), XtRImmediate, (XtPointer) 1}, {XtNthumbSideIndent, XtCThumbSideIndent, XtRDimension, sizeof(Dimension), Offset(thumb_side_indent), XtRImmediate, (XtPointer) 0}, {XtNarrowTopIndent, XtCArrowTopIndent, XtRDimension, sizeof(Dimension), Offset(arrow_top_indent), XtRImmediate, (XtPointer) 0}, {XtNarrowSideIndent, XtCArrowSideIndent, XtRDimension, sizeof(Dimension), Offset(arrow_side_indent), XtRImmediate, (XtPointer) 0}, {XtNuseDynamic, XtCUseDynamic, XtRBoolean, sizeof(Boolean), Offset(use_dynamic), XtRImmediate, (XtPointer) TRUE}, {XtNinterval, XtCInterval, XtRInt, sizeof(int), Offset(interval), XtRImmediate, (XtPointer) 100}, {XtNdelay, XtCDelay, XtRInt, sizeof(int), Offset(delay), XtRImmediate, (XtPointer) 300}, }; #undef Offset static void ClassInitialize(void); static void Initialize(Widget,Widget,ArgList,Cardinal*); static void Destroy(Widget); static void Realize(Widget,XtValueMask*,XSetWindowAttributes*); static void Resize(Widget); static void Redisplay(Widget,XEvent*,Region); static Boolean SetValues(Widget,Widget,Widget,ArgList,Cardinal*); static void HandleThumb(Widget,XEvent*,String*,Cardinal*); static void HandleAutoscroll(Widget,XEvent*,String*,Cardinal*); static void MoveThumb(Widget,XEvent*,String*,Cardinal*); static void NotifyThumb(Widget,XEvent*,String*,Cardinal*); static void NotifyScroll(Widget,XEvent*,String*,Cardinal*); static void EndScroll(Widget,XEvent*,String*,Cardinal*); static XtActionsRec actions[] = { {"HandleThumb", HandleThumb}, {"HandleAutoscroll",HandleAutoscroll}, {"MoveThumb", MoveThumb}, {"NotifyThumb", NotifyThumb}, {"NotifyScroll", NotifyScroll}, {"EndScroll", EndScroll} }; ScrollbarClassRec scrollbarClassRec = { { /* core fields */ /* superclass */ (WidgetClass) &threeDClassRec, /* class_name */ "Scrollbar", /* size */ sizeof(ScrollbarRec), /* class_initialize */ ClassInitialize, /* class_part_init */ NULL, /* class_inited */ FALSE, /* initialize */ Initialize, /* initialize_hook */ NULL, /* realize */ Realize, /* actions */ actions, /* num_actions */ XtNumber(actions), /* resources */ resources, /* num_resources */ XtNumber(resources), /* xrm_class */ NULLQUARK, /* compress_motion */ TRUE, /* compress_exposure*/ TRUE, /* compress_enterleave*/ TRUE, /* visible_interest */ FALSE, /* destroy */ Destroy, /* resize */ Resize, /* expose */ Redisplay, /* set_values */ SetValues, /* set_values_hook */ NULL, /* set_values_almost*/ XtInheritSetValuesAlmost, /* get_values_hook */ NULL, /* accept_focus */ NULL, /* version */ XtVersion, /* callback_private */ NULL, /* tm_table */ defaultTranslations, /* query_geometry */ XtInheritQueryGeometry, /* display_accelerator*/ XtInheritDisplayAccelerator, /* extension */ NULL }, { /* simple fields */ /* change_sensitive */ XtInheritChangeSensitive }, { /* threeD fields */ /* shadowdraw */ XtInheritXaw3dShadowDraw }, { /* scrollbar fields */ /* ignore */ 0 /*###jp### changed 21.10.94*/ } }; WidgetClass scrollbarWidgetClass = (WidgetClass)&scrollbarClassRec; /*############################################################################### PREPROCESSOR INSTRUCTIONS ###############################################################################*/ #if defined(MIN) # undef MIN #endif #if defined(MAX) # undef MAX #endif #define MIN(_x_,_y_) ((_x_)<(_y_)?(_x_):(_y_)) #define MAX(_x_,_y_) ((_x_)>(_y_)?(_x_):(_y_)) #define PUT_IN_RANGE(min,num,max) MAX((min),MIN((num),(max))) #define SCROLLBARWIDGET ScrollbarWidget sbw = (ScrollbarWidget) #define IS_REALIZED (XtIsRealized((Widget)sbw)) /*###jp### changed 21.10.94*/ #define IS_HORIZONTAL (sbw->scrollbar.orientation == XtorientHorizontal) #define IS_VERTICAL (sbw->scrollbar.orientation == XtorientVertical) #define DISPLAY XtDisplay(sbw) #define WINDOW XtWindow(sbw) #define SBW sbw /* public */ #define WIDTH sbw->core.width #define HEIGHT sbw->core.height #define BACKGROUND_PIXEL sbw->core.background_pixel #define CURSOR_NAME sbw->simple.cursor_name #define SHADOW sbw->threeD.shadow_width #define BOT_SHADOW_GC sbw->threeD.bot_shadow_GC #define TOP_SHADOW_GC sbw->threeD.top_shadow_GC #define FOREGROUND sbw->scrollbar.foreground #define MIN_THUMB sbw->scrollbar.min_thumb #define SCROLLBAR_GC sbw->scrollbar.gc #define THUMB sbw->scrollbar.thumb #define LENGTH sbw->scrollbar.length #define SHOWN sbw->scrollbar.shown #define SHOWNLENGTH sbw->scrollbar.shownLength #define TOP sbw->scrollbar.top #define TOPLOC sbw->scrollbar.topLoc #define THICKNESS sbw->scrollbar.thickness #define THUMB_SIDE_INDENT sbw->scrollbar.thumb_side_indent #define THUMB_TOP_INDENT sbw->scrollbar.thumb_top_indent #define SHOW_ARROWS sbw->scrollbar.show_arrows #define ARROW_TOP_INDENT sbw->scrollbar.arrow_top_indent #define ARROW_SIDE_INDENT sbw->scrollbar.arrow_side_indent #define INTERVAL sbw->scrollbar.interval #define DELAY sbw->scrollbar.delay /* private */ #define TIMER sbw->scrollbar.timer_id #define DYNAMIC sbw->scrollbar.dynamic #define SCROLLMODE sbw->scrollbar.scroll_mode #define SHADOW_BASE sbw->scrollbar.shadow_base #define ARROW_WIDTH sbw->scrollbar.arrow_width #define ARROW_HEIGHT sbw->scrollbar.arrow_height #define ARROW_TOP_TO_BORDER sbw->scrollbar.arrow_top_to_border #define ARROW_TO_BORDER sbw->scrollbar.arrow_to_border #define ARROW_SHADOW sbw->scrollbar.arrow_shadow #define THUMB_SHADOW sbw->scrollbar.thumb_shadow #define THUMB_TO_ARROW sbw->scrollbar.thumb_to_arrow #define THUMB_TO_BORDER sbw->scrollbar.thumb_to_border #define USE_DYNAMIC sbw->scrollbar.use_dynamic #define USE_FILL Display *dpy = DISPLAY; Window wndw = WINDOW #define FILL(point,count,gc) XFillPolygon(dpy,wndw,gc,point,count,Complex,CoordModeOrigin) #define FILLrect(xc,yc,wid,hei,gc) XFillRectangle(dpy,wndw,gc,(int)(xc),(int)(yc),(unsigned int)(wid),(unsigned int)(hei)) #define DRAWline(xs,ys,xe,ye,gc) XDrawLine(dpy,wndw,gc,(int)(xs),(int)(ys),(int)(xe),(int)(ye)) #define DRAWlines(point,count,gc) XDrawLines(dpy,wndw,gc,point,count,CoordModeOrigin) #define CLEAR(xc,yc,wid,hei) XClearArea(dpy,wndw,(int)(xc),(int)(yc),(unsigned int)(wid),(unsigned int)(hei),FALSE) #define SET_TIMER(widget,interval) \ TIMER = XtAppAddTimeOut ( \ XtWidgetToApplicationContext(((Widget)(widget))), \ ((unsigned long)(interval)), \ RepeatNotify, \ ((XtPointer)((Widget)(widget))) \ ) #define DISABLED ((XtIntervalId) 0) #define DESTROY_TIMER if (TIMER) { XtRemoveTimeOut(TIMER); TIMER = DISABLED; } #define CALLscrollProc(widget,data) \ XtCallCallbacks ( ((Widget)(widget)),XtNscrollProc,((XtPointer)(intptr_t)(data))) #define POINT(name,xcoord,ycoord) name.x=(short)(xcoord);name.y=(short)(ycoord) /*### Definitions related to the Scrollbar Geometry ###########################*/ #define NICE_DIMENSION 5 #define _SCROLL_THICKNESS_ ((int)THICKNESS-2*THUMB_TO_BORDER) #define _SCROLL_LENGTH_ ((int)LENGTH-2*(ARROW_TOP_TO_BORDER+ARROW_HEIGHT+THUMB_TO_ARROW)-1) #define _RIGHT_END_OF_SCROLL_REGION_ ((int)THICKNESS-1-THUMB_TO_BORDER) #define _LEFT_START_OF_SCROLL_REGION_ (THUMB_TO_BORDER) #define _START_OF_SCROLL_REGION_ (ARROW_TOP_TO_BORDER+ARROW_HEIGHT+THUMB_TO_ARROW) #define _END_OF_SCROLL_REGION_ ((int)LENGTH-1-ARROW_TOP_TO_BORDER-ARROW_HEIGHT-THUMB_TO_ARROW) /*### Identificational Definitions ############################################*/ /* Scroll Mode */ #define NOSCROLL 0 #define CONTINUOUS 2 #define ARROW_UP 1 #define ARROW_DOWN 3 #define PAGE_UP 4 #define PAGE_DOWN 5 /* identifies upper/left, lower/right */ #define UPPER_PART 1 #define LOWER_PART 0 /* arrow identifier */ #define UPPER_ARROW 0 #define LOWER_ARROW 1 #define BOTH_ARROWS 2 #define NORMAL_ARROW 1 #define INVERTED_ARROW 0 #define _SC_INIT_VALUE_ 9999 /*### Options at Compiling Time ###############################################*/ #define MIN_INTERVAL 8 #define MAX_INTERVAL 800 #define DYNAMIC_REGION 40.0 #define MIN_DELAY 10 /* the minimum delay between clicking on an arrow and */ /* the start of the autoscroll action */ #define ARROW_SCROLL_AMOUNT (MAX(100,LENGTH)/20) #define PAGE_SCROLL_AMOUNT LENGTH /*############################################################################### EraseThumbRegion ###############################################################################*/ static void EraseThumbRegion(ScrollbarWidget SBW, Dimension yt, Dimension yb, Dimension xl, Dimension xr) { USE_FILL; BEGINMESSAGE(EraseThumbRegion) if (IS_VERTICAL) { CLEAR(xl,yt,xr-xl+1,yb-yt+1); } else { CLEAR(yt,xl,yb-yt+1,xr-xl+1); } ENDMESSAGE(EraseThumbRegion) } /*############################################################################### PaintThumbCover ###############################################################################*/ static void PaintThumbCover(ScrollbarWidget SBW, Dimension yt, Dimension yb,Dimension xl,Dimension xr) { USE_FILL; BEGINMESSAGE(PaintThumbCover) if (IS_VERTICAL) FILLrect(xl,yt,xr+1-xl,yb-yt+1,SCROLLBAR_GC); else FILLrect(yt,xl,yb-yt+1,xr+1-xl,SCROLLBAR_GC); ENDMESSAGE(PaintThumbCover) } /*############################################################################### PaintShadowAtSidesOfThumb ###############################################################################*/ static void PaintShadowAtSidesOfThumb(ScrollbarWidget SBW, Dimension yt, Dimension yb, Dimension xl, Dimension xr, Dimension s) { USE_FILL; BEGINMESSAGE(PaintShadowAtSidesOfThumb) if (IS_VERTICAL) { FILLrect(xl,yt,s+1,yb-yt+1,TOP_SHADOW_GC); FILLrect(xr+1-s,yt,s,yb-yt+1,BOT_SHADOW_GC); } else { FILLrect(yt,xl,yb-yt+1,s+1,TOP_SHADOW_GC); FILLrect(yt,xr+1-s,yb-yt+1,s,BOT_SHADOW_GC); } ENDMESSAGE(PaintShadowAtSidesOfThumb) } /*############################################################################### PaintShadowAtEndOfThumb ###############################################################################*/ static void PaintShadowAtEndOfThumb(ScrollbarWidget SBW, Dimension yt, Dimension yb, Dimension xl, Dimension xr, Dimension s, int part) { XPoint shadowPT[4]; USE_FILL; BEGINMESSAGE(PaintShadowAtEndOfThumb) if (IS_VERTICAL) { if (part==UPPER_PART) { POINT(shadowPT[3],xl,yt); POINT(shadowPT[2],xr+1,yt); POINT(shadowPT[0],xl+s,yb); POINT(shadowPT[1],xr-s+1,yb); } else { POINT(shadowPT[3],xl+s,yt+1); POINT(shadowPT[2],xr-s+1,yt+1); POINT(shadowPT[0],xl,yb+1); POINT(shadowPT[1],xr+1,yb+1); } } else { if (part==UPPER_PART) { POINT(shadowPT[0],yt,xl); POINT(shadowPT[1],yb,xl+s); POINT(shadowPT[2],yb,xr-s+1); POINT(shadowPT[3],yt,xr+1); } else { POINT(shadowPT[0],yb+1,xl); POINT(shadowPT[1],yt+1,xl+s); POINT(shadowPT[2],yt+1,xr-s+1); POINT(shadowPT[3],yb+1,xr+1); } } if (part==UPPER_PART) { FILL(shadowPT,4,TOP_SHADOW_GC); } else { FILL(shadowPT,4,BOT_SHADOW_GC); } ENDMESSAGE(PaintShadowAtEndOfThumb) } /*############################################################################### PaintWholeThumb ###############################################################################*/ static void PaintWholeThumb(ScrollbarWidget SBW, Dimension yt, Dimension yb, Dimension xl, Dimension xr, Dimension s) { BEGINMESSAGE(PaintWholeThumb) if (s) { PaintShadowAtSidesOfThumb(SBW,yt,yb,xl,xr,s); PaintShadowAtEndOfThumb(SBW,yt,yt+s,xl,xr,s,UPPER_PART); PaintShadowAtEndOfThumb(SBW,yb-s,yb,xl,xr,s,LOWER_PART); } PaintThumbCover(SBW,yt+s,yb-s,xl+s,xr-s); ENDMESSAGE(PaintWholeThumb) } /*############################################################################### PaintMiddleOfThumb ###############################################################################*/ static void PaintMiddleOfThumb(ScrollbarWidget SBW, Dimension yt, Dimension yb, Dimension xl, Dimension xr, Dimension s) { BEGINMESSAGE(PaintMiddleOfThumb) if ((int)s) PaintShadowAtSidesOfThumb(SBW,yt,yb,xl,xr,s); PaintThumbCover(SBW,yt,yb,xl+s,xr-s); ENDMESSAGE(PaintMiddleOfThumb) } /*############################################################################### PaintEndOfThumb ###############################################################################*/ static void PaintEndOfThumb(ScrollbarWidget SBW, Dimension yt, Dimension yb, Dimension xl, Dimension xr, Dimension s, int part) { BEGINMESSAGE(PaintEndOfThumb) if (part==UPPER_PART) { if (s) { PaintShadowAtSidesOfThumb(SBW,yt,yb,xl,xr,s); PaintShadowAtEndOfThumb(SBW,yt,yt+s,xl,xr,s,UPPER_PART); } PaintThumbCover(SBW,yt+s,yb,xl+s,xr-s); } else { if (s) { PaintShadowAtSidesOfThumb(SBW,yt,yb,xl,xr,s); PaintShadowAtEndOfThumb(SBW,yb-s,yb,xl,xr,s,LOWER_PART); } PaintThumbCover(SBW,yt,yb-s,xl+s,xr-s); } ENDMESSAGE(PaintEndOfThumb) } /*############################################################################### GetRelativeThumbLocation ###############################################################################*/ static void GetRelativeThumbLocation(ScrollbarWidget SBW, Dimension *newtop, Dimension *newbot) { Dimension scroll_length = (Dimension) _SCROLL_LENGTH_-MIN_THUMB; Dimension end_of_scroll_region = (Dimension) _END_OF_SCROLL_REGION_; BEGINMESSAGE(GetRelativeThumbLocation) *newtop = (Dimension) (_START_OF_SCROLL_REGION_+scroll_length*TOP); *newtop = MIN(*newtop,end_of_scroll_region); *newbot = (Dimension)(*newtop+scroll_length*SHOWN); *newbot = MAX(*newbot,(Dimension)(*newtop+MIN_THUMB)); *newbot = MIN(*newbot,end_of_scroll_region); IIMESSAGE(*newtop,*newbot) ENDMESSAGE(GetRelativeThumbLocation) } /*############################################################################### AdjustThumbShadow ###############################################################################*/ static Boolean AdjustThumbShadow(ScrollbarWidget SBW, Dimension newtop, Dimension newbot) { Dimension xl = (Dimension) _LEFT_START_OF_SCROLL_REGION_; Dimension xr = (Dimension) _RIGHT_END_OF_SCROLL_REGION_; int s; Boolean changed = False; BEGINMESSAGE(AdjustThumbShadow) IIMESSAGE(newtop,newbot) IIMESSAGE(xl,xr) IMESSAGE(THUMB_SHADOW) s = MIN((int)(newbot-newtop+1),(int)(xr-xl+1))/2; s = MAX(0,s); s = MIN(s,(int)SHADOW); if (s != THUMB_SHADOW) { THUMB_SHADOW = s; INFIMESSAGE(had to adjust thumb shadow:,THUMB_SHADOW) changed = True; } else { INFMESSAGE(thumb shadow is just nice) } ENDMESSAGE(AdjustThumbShadow) return changed; } /*############################################################################### PaintThumb ###############################################################################*/ static void PaintThumb(ScrollbarWidget SBW) { Dimension xl = (Dimension) _LEFT_START_OF_SCROLL_REGION_; Dimension xr = (Dimension) _RIGHT_END_OF_SCROLL_REGION_; Dimension oldtop, oldbot, newtop, newbot; BEGINMESSAGE(PaintThumb) if (!IS_REALIZED) { INFMESSAGE(not realized) ENDMESSAGE(PaintThumb) return; } if ((LENGTH<1) || (THICKNESS<1)) { INFMESSAGE(not enough space) ENDMESSAGE(PaintThumb) return; } GetRelativeThumbLocation(SBW,&newtop,&newbot); oldtop = TOPLOC; oldbot = oldtop + SHOWNLENGTH-1; IIMESSAGE(newtop,oldtop) IIMESSAGE(newbot,oldbot) IIMESSAGE(xr,xl) IMESSAGE(THUMB_SHADOW) if (AdjustThumbShadow(SBW,newtop,newbot)) { INFMESSAGE(doing full repaint with adjusted thumb shadow) if (oldbot>oldtop) EraseThumbRegion(SBW,oldtop,oldbot,xl,xr); if (newbot>newtop) PaintWholeThumb(SBW,newtop,newbot,xl,xr,(Dimension)THUMB_SHADOW); } else { Dimension s = (Dimension) THUMB_SHADOW; if ((newtop >= oldbot) || (newbot <= oldtop)) { INFMESSAGE(doing full repaint) if (oldbot>oldtop) EraseThumbRegion(SBW,oldtop,oldbot,xl,xr); if (newbot>newtop) PaintWholeThumb(SBW,newtop,newbot,xl,xr,s); } else { INFMESSAGE(doing partial repaint) if (newtop > oldtop) EraseThumbRegion(SBW,oldtop,newtop-1,xl,xr); if (newbot < oldbot) EraseThumbRegion(SBW,newbot+1,oldbot,xl,xr); if (newtop < oldtop) PaintMiddleOfThumb(SBW,newtop,MIN(newbot,oldtop+s),xl,xr,s); if (newbot > oldbot) PaintMiddleOfThumb(SBW,MAX(newtop,oldbot-s),newbot,xl,xr,s); if ((newtop!=oldtop)&&(s)) PaintShadowAtEndOfThumb(SBW,newtop,newtop+s,xl,xr,s,UPPER_PART); if ((newbot!=oldbot)&&(s)) PaintShadowAtEndOfThumb(SBW,newbot-s,newbot,xl,xr,s,LOWER_PART); } } TOPLOC = newtop; SHOWNLENGTH = newbot-newtop+1; ENDMESSAGE(PaintThumb) } /*############################################################################### PaintArrows ###############################################################################*/ #define vPOLY_4(name,x0,y0,x1,y1,x2,y2,x3,y3) \ name[0].x=(short)(x0);name[0].y=(short)(y0);\ name[1].x=(short)(x1);name[1].y=(short)(y1);\ name[2].x=(short)(x2);name[2].y=(short)(y2);\ name[3].x=(short)(x3);name[3].y=(short)(y3);\ name[4].x=(short)(x0);name[4].y=(short)(y0) #define hPOLY_4(name,x0,y0,x1,y1,x2,y2,x3,y3) \ name[0].x=(short)(y0);name[0].y=(short)(x0);\ name[1].x=(short)(y1);name[1].y=(short)(x1);\ name[2].x=(short)(y2);name[2].y=(short)(x2);\ name[3].x=(short)(y3);name[3].y=(short)(x3);\ name[4].x=(short)(y0);name[4].y=(short)(x0) #define COORD(name,value) short name = (short) (value) static void PaintArrows(ScrollbarWidget SBW, int which, int mode) { BEGINMESSAGE(PaintArrows) if ((!IS_REALIZED) || ((ARROW_HEIGHT<1) || (ARROW_WIDTH<1)) || (!SHOW_ARROWS)) { ENDMESSAGE(PaintArrows) return; } { GC ts_gc = ((mode==NORMAL_ARROW) ? TOP_SHADOW_GC : BOT_SHADOW_GC); GC bs_gc = ((mode==NORMAL_ARROW) ? BOT_SHADOW_GC : TOP_SHADOW_GC); XPoint ls[5]; XPoint rs[5]; XPoint bs[5]; XPoint cover[5]; USE_FILL; int ATB = ARROW_TO_BORDER; int ATTB = ARROW_TOP_TO_BORDER; int AH = ARROW_HEIGHT-1; int AW = ARROW_WIDTH-1; int AS = ARROW_SHADOW; int D_AS = (int) (1.5*ARROW_SHADOW); if (which==UPPER_ARROW || which==BOTH_ARROWS) { if (IS_VERTICAL) { COORD(y,ATTB); COORD(yy,ATTB+2*AS); COORD(yyy,ATTB+AH-AS); COORD(yyyy,ATTB+AH); COORD(lll,ATB); COORD(ll,ATB+D_AS); COORD(l,ATB+AW/2); COORD(r,ATB+(AW+1)/2); COORD(rr,ATB+AW-D_AS); COORD(rrr,ATB+AW); vPOLY_4(cover,r,yy,rr,yyy,ll,yyy,l,yy); if (AS) { vPOLY_4(ls,l,y,lll,yyyy,ll,yyy,l,yy); vPOLY_4(rs,r,y,rrr,yyyy,rr,yyy,r,yy); vPOLY_4(bs,lll,yyyy+1,rrr,yyyy+1,rrr-AS,yyyy+1-AS,lll+AS,yyyy+1-AS); FILL(bs,5,bs_gc); if (AS==1) { FILL(cover,5,SCROLLBAR_GC); DRAWlines(cover,5,SCROLLBAR_GC);} FILL(ls,5,ts_gc); DRAWlines(ls,5,ts_gc); FILL(rs,5,bs_gc); DRAWlines(rs,5,bs_gc); if (AS!=1) { FILL(cover,5,SCROLLBAR_GC); DRAWlines(cover,5,SCROLLBAR_GC);} } else { FILL(cover,5,SCROLLBAR_GC); DRAWlines(cover,5,SCROLLBAR_GC); } } else { COORD(x,ATTB); COORD(xx,ATTB+2*AS); COORD(xxx,ATTB+AH-AS); COORD(xxxx,ATTB+AH); COORD(l,ATB+(AW+1)/2); COORD(ll,ATB+AW-D_AS); COORD(lll,ATB+AW); COORD(r,ATB+AW/2); COORD(rr,ATB+D_AS); COORD(rrr,ATB); hPOLY_4(cover,ll,xxx,rr,xxx,r,xx,l,xx); if (AS) { hPOLY_4(ls,lll,xxxx,ll,xxx,l,xx,l,x); hPOLY_4(rs,rrr,xxxx,rr,xxx,r,xx,r,x); hPOLY_4(bs,lll,xxxx,rrr,xxxx,rr,xxx,ll,xxx); FILL(bs,5,bs_gc); DRAWlines(bs,5,bs_gc); FILL(ls,5,bs_gc); DRAWlines(ls,5,bs_gc); FILL(rs,5,ts_gc); DRAWlines(rs,5,ts_gc); FILL(cover,5,SCROLLBAR_GC); DRAWlines(cover,5,SCROLLBAR_GC); } else { FILL(cover,5,SCROLLBAR_GC); DRAWlines(cover,5,SCROLLBAR_GC); } } } if (which==LOWER_ARROW || which==BOTH_ARROWS) { if (IS_VERTICAL) { COORD(L,LENGTH-1); COORD(y,L-ATTB); COORD(yy,L-ATTB-2*AS); COORD(yyy,L-ATTB-AH+AS); COORD(yyyy,L-ATTB-AH); COORD(lll,ATB); COORD(ll,ATB+D_AS); COORD(l,ATB+AW/2); COORD(r,ATB+(AW+1)/2); COORD(rr,ATB+AW-D_AS); COORD(rrr,ATB+AW); vPOLY_4(cover,ll,yyy,l,yy,r,yy,rr,yyy); if (AS) { vPOLY_4(ls,lll,yyyy,l,y,l,yy,ll,yyy); vPOLY_4(rs,rrr,yyyy,r,y,r,yy,rr,yyy); vPOLY_4(bs,rrr,yyyy,rr,yyy,ll,yyy,lll,yyyy); FILL(bs,5,ts_gc); DRAWlines(bs,5,ts_gc); FILL(ls,5,ts_gc); DRAWlines(ls,5,ts_gc); if (AS==1) { FILL(cover,5,SCROLLBAR_GC); DRAWlines(cover,5,SCROLLBAR_GC);} FILL(rs,5,bs_gc); DRAWlines(rs,5,bs_gc); if (AS!=1) { FILL(cover,5,SCROLLBAR_GC); DRAWlines(cover,5,SCROLLBAR_GC);} } else { FILL(cover,5,SCROLLBAR_GC); DRAWlines(cover,5,SCROLLBAR_GC); } } else { COORD(L,LENGTH-1); COORD(x,L-ATTB); COORD(xx,L-ATTB-2*AS); COORD(xxx,L-ATTB-AH+AS); COORD(xxxx,L-ATTB-AH); COORD(lll,ATB); COORD(ll,ATB+D_AS); COORD(l,ATB+AW/2); COORD(r,ATB+(AW+1)/2); COORD(rr,ATB+AW-D_AS); COORD(rrr,ATB+AW); hPOLY_4(cover,ll,xxx,rr,xxx,r,xx,l,xx); if (AS) { hPOLY_4(ls,lll,xxxx,ll,xxx,l,xx,l,x); hPOLY_4(rs,rrr,xxxx,rr,xxx,r,xx,r,x); hPOLY_4(bs,lll,xxxx,rrr,xxxx,rr,xxx,ll,xxx); FILL(bs,5,ts_gc); DRAWlines(bs,5,ts_gc); if (AS==1) { FILL(cover,5,SCROLLBAR_GC); DRAWlines(cover,5,SCROLLBAR_GC);} FILL(ls,5,ts_gc); DRAWlines(ls,5,ts_gc); FILL(rs,5,bs_gc); DRAWlines(rs,5,bs_gc); if (AS!=1) { FILL(cover,5,SCROLLBAR_GC); DRAWlines(cover,5,SCROLLBAR_GC);} } else { FILL(cover,5,SCROLLBAR_GC); DRAWlines(cover,5,SCROLLBAR_GC); } } } } ENDMESSAGE(PaintArrows) } /*############################################################################### CreateGC ###############################################################################*/ static void CreateGC(Widget w) { SCROLLBARWIDGET w; XGCValues gcValues; XtGCMask mask; unsigned int depth = 1; BEGINMESSAGE(CreateGC) if (THUMB == XtUnspecifiedPixmap) { THUMB = XmuCreateStippledPixmap (XtScreen(w), (Pixel) 1, (Pixel) 0, depth); } else if (THUMB != None) { Window root; int x, y; unsigned int width, height, bw; if (XGetGeometry (XtDisplay(w), THUMB, &root, &x, &y, &width, &height, &bw, &depth) == 0) { XtAppError (XtWidgetToApplicationContext (w), "Scrollbar Widget: Could not get geometry of thumb pixmap."); } } gcValues.foreground = FOREGROUND; gcValues.background = BACKGROUND_PIXEL; mask = GCForeground | GCBackground; if (THUMB != None) { if (depth == 1) { gcValues.fill_style = FillOpaqueStippled; gcValues.stipple = SBW->scrollbar.thumb; mask |= GCFillStyle | GCStipple; } else { gcValues.fill_style = FillTiled; gcValues.tile = SBW->scrollbar.thumb; mask |= GCFillStyle | GCTile; } } /* the creation should be non-caching, because */ /* we now set and clear clip masks on the gc returned */ SCROLLBAR_GC = XtGetGC(w, mask, &gcValues); ENDMESSAGE(CreateGC) } /*############################################################################### SetDimensions ###############################################################################*/ static void SetDimensions(ScrollbarWidget SBW) { Dimension tmp; BEGINMESSAGE(SetDimensions) if (IS_VERTICAL) { LENGTH = HEIGHT; THICKNESS = WIDTH; } else { LENGTH = WIDTH; THICKNESS = HEIGHT; } IIMESSAGE(THICKNESS,LENGTH) INFMESSAGE(### shadow width #############) if (SHADOW_BASE == _SC_INIT_VALUE_) SHADOW_BASE = SHADOW; SHADOW = SHADOW_BASE; tmp = MIN(THICKNESS,LENGTH); if (tmp<4*SHADOW) { if (tmp>=4) SHADOW = tmp/4; else SHADOW = tmp/2; INFMESSAGE(adjusted shadow) } IMESSAGE(SHADOW) INFMESSAGE(### arrow geometry ###########) if (SHOW_ARROWS) { ARROW_TO_BORDER = (int) (SHADOW+ARROW_SIDE_INDENT); ARROW_TOP_TO_BORDER = (int) (SHADOW+ARROW_TOP_INDENT); ARROW_WIDTH = (int)THICKNESS-2*ARROW_TO_BORDER; ARROW_HEIGHT = ((int)LENGTH-(int)MIN_THUMB)/2-(int)THUMB_TOP_INDENT-ARROW_TOP_TO_BORDER; if ((ARROW_WIDTH < NICE_DIMENSION) && (ARROW_SIDE_INDENT)) { while (ARROW_TO_BORDER>(int)SHADOW) { --ARROW_TO_BORDER; ARROW_WIDTH = ((int)THICKNESS-2*ARROW_TO_BORDER); if (ARROW_WIDTH>=NICE_DIMENSION) break; } INFMESSAGE(adjusted arrow side indent) } if ((ARROW_HEIGHT(int)SHADOW) { --ARROW_TOP_TO_BORDER; ARROW_HEIGHT = ((int)LENGTH-(int)MIN_THUMB)/2-(int)THUMB_TOP_INDENT-ARROW_TOP_TO_BORDER; if (ARROW_HEIGHT>=NICE_DIMENSION) break; } ARROW_HEIGHT = MAX(0,ARROW_HEIGHT); INFMESSAGE(adjusted arrow top indent) } ARROW_WIDTH = MIN(ARROW_WIDTH,ARROW_HEIGHT); if ((ARROW_WIDTH+(int)THICKNESS)&1) --ARROW_WIDTH; ARROW_HEIGHT = ARROW_WIDTH; if (ARROW_HEIGHT) ARROW_HEIGHT -= (1-(ARROW_WIDTH&1)); ARROW_TO_BORDER = ((int)THICKNESS - ARROW_WIDTH)/2; ARROW_SHADOW = (ARROW_WIDTH-1)/3; ARROW_SHADOW = PUT_IN_RANGE(0,ARROW_SHADOW,(int)SHADOW); } else { ARROW_TO_BORDER = ARROW_TOP_TO_BORDER = (int) SHADOW; ARROW_WIDTH = ARROW_HEIGHT = 0; } IIMESSAGE(ARROW_WIDTH,ARROW_HEIGHT) IIMESSAGE(ARROW_TO_BORDER,ARROW_TOP_TO_BORDER) IMESSAGE(ARROW_SHADOW) INFMESSAGE(### thumb geometry ###########) THUMB_SHADOW = (int) SHADOW; THUMB_TO_BORDER = (int) (THUMB_SIDE_INDENT+SHADOW); THUMB_TO_ARROW = (int) (THUMB_TOP_INDENT); if ((int)THICKNESS-2*THUMB_TO_BORDERcore_class.superclass->core_class.realize) (w, valueMask, attributes); ENDMESSAGE(Realize) } /*############################################################################### SetValues ###############################################################################*/ static Boolean SetValues(Widget old, Widget request _GL_UNUSED, Widget new, ArgList args _GL_UNUSED, Cardinal *num_args _GL_UNUSED) { SCROLLBARWIDGET new; ScrollbarWidget old_sbw = (ScrollbarWidget) old; Boolean redraw = FALSE; BEGINMESSAGE(SetValues) if (SHOWN < 0.0 || SHOWN > 1.0 || TOP < 0.0 || TOP > 1.0) { INFMESSAGE(### bad values for thumb position/length ###) FMESSAGE(SHOWN) FMESSAGE(TOP) SHOWN = old_sbw->scrollbar.shown; TOP = old_sbw->scrollbar.top; SHOWN = PUT_IN_RANGE(0.0,SHOWN,1.0); TOP = PUT_IN_RANGE(0.0,TOP, 1.0); INFMESSAGE(corrected to) FMESSAGE(SHOWN) FMESSAGE(TOP) } FMESSAGE(SHOWN) FMESSAGE(TOP) if ((TOP != old_sbw->scrollbar.top) || (SHOWN != old_sbw->scrollbar.shown)) { INFMESSAGE(thumb position/length has changed) redraw = TRUE; } if (FOREGROUND != old_sbw->scrollbar.foreground || BACKGROUND_PIXEL != old_sbw->core.background_pixel || THUMB != old_sbw->scrollbar.thumb) { INFMESSAGE(GC has changed) XtReleaseGC((Widget)SBW, SCROLLBAR_GC); /*###jp### changed 21.10.94*/ CreateGC(new); redraw = TRUE; } if ( (SHADOW != old_sbw->threeD.shadow_width) || (SHOW_ARROWS != old_sbw->scrollbar.show_arrows) || (ARROW_TOP_INDENT != old_sbw->scrollbar.arrow_top_indent) || (ARROW_SIDE_INDENT != old_sbw->scrollbar.arrow_side_indent) || (THUMB_SIDE_INDENT != old_sbw->scrollbar.thumb_side_indent) || (THUMB_TOP_INDENT != old_sbw->scrollbar.thumb_top_indent) || (MIN_THUMB != old_sbw->scrollbar.min_thumb) ) { INFMESSAGE(internal scrollbar geometry has changed) SHADOW_BASE=_SC_INIT_VALUE_; SetDimensions(SBW); redraw =TRUE; } INTERVAL = MAX(INTERVAL,MIN_INTERVAL); DELAY = MAX(DELAY,MIN_DELAY); if (!IS_REALIZED) { INFMESSAGE(not realized) redraw=FALSE; } # ifdef MESSAGES if (redraw) { INFMESSAGE(need redisplay) } else { INFMESSAGE(redisplay unnecessary) } # endif ENDMESSAGE(SetValues) return redraw; } /*############################################################################### Resize ###############################################################################*/ static void Resize(Widget w) { SCROLLBARWIDGET w; XEvent event; BEGINMESSAGE(Resize) SetDimensions(SBW); event.xexpose.x = 0; event.xexpose.y = 0; event.xexpose.width = WIDTH; event.xexpose.height = HEIGHT; Redisplay(w, (XEvent *) &event, (Region)NULL); ENDMESSAGE(Resize) } /*############################################################################### Redisplay compress_exposure is TRUE, so 'event' contains the bounding box for the 'region' to be exposed. Graphics actions will be restricted to this bounding box to minimize visual disturbances. ###############################################################################*/ static void Redisplay(Widget w, XEvent *event, Region region) { SCROLLBARWIDGET w; ScrollbarWidgetClass swclass = (ScrollbarWidgetClass) XtClass (w); Dimension s; Dimension newtop, newbot; Dimension xl = (Dimension) _LEFT_START_OF_SCROLL_REGION_; Dimension xr = (Dimension) _RIGHT_END_OF_SCROLL_REGION_; Dimension yt,yb; BEGINMESSAGE(Redisplay) if (!IS_REALIZED) { INFMESSAGE(not realized) ENDMESSAGE(Redisplay) return; } if ((LENGTH<1) || (THICKNESS<1)) { INFMESSAGE(not enough space) ENDMESSAGE(Redisplay) return; } if ((region) && (XRectInRegion(region,0,0,WIDTH,HEIGHT) == RectangleOut)) { INFMESSAGE(request out of region) ENDMESSAGE(Redisplay) return; } GetRelativeThumbLocation(SBW,&newtop,&newbot); AdjustThumbShadow(SBW,newtop,newbot); s = (Dimension)(THUMB_SHADOW); if (event) { if (IS_HORIZONTAL) { yt=(Dimension)(event->xexpose.x); yb=(Dimension)(yt+event->xexpose.width); } else { yt=(Dimension)(event->xexpose.y); yb=(Dimension)(yt+event->xexpose.height); } if (SHOW_ARROWS) { Dimension soar = (Dimension) (ARROW_TOP_TO_BORDER); Dimension sosr = (Dimension) _START_OF_SCROLL_REGION_; Dimension eosr = (Dimension) (_END_OF_SCROLL_REGION_+THUMB_TO_ARROW); Dimension eoar = (Dimension) (LENGTH-1-soar); if ((yb>=soar) && (yteosr) && (yt<=eoar)) PaintArrows(SBW,LOWER_ARROW,(SCROLLMODE==ARROW_DOWN) ? INVERTED_ARROW : NORMAL_ARROW); } if ((yb>=newtop) && (yt<=newbot)) { if ((yt<=newtop+s) && (yb+s>=newbot)) PaintWholeThumb(SBW,newtop,newbot,xl,xr,s); else if ((yt<=newtop+s) && (yb+snewtop+s) && (yb+s>=newbot)) PaintEndOfThumb(SBW,yt,newbot,xl,xr,s,LOWER_PART); else if ((yt>newtop+s) && (yb+sthreeD_class.shadowdraw) (w, event, region, sbw->threeD.relief, FALSE); ENDMESSAGE(Redisplay) } /*############################################################################### Destroy ###############################################################################*/ static void Destroy (w) Widget w; { SCROLLBARWIDGET w; BEGINMESSAGE(Destroy) DESTROY_TIMER; XtReleaseGC (w, SCROLLBAR_GC); ENDMESSAGE(Destroy) } /*############################################################################### CompareEvents ###############################################################################*/ #define CHECK(field) if (newEvent->field != oldEvent->field) return False; static Boolean CompareEvents (XEvent *oldEvent, XEvent *newEvent) { INFMESSAGE(executing Procedure: CompareEvents) CHECK(xany.display); CHECK(xany.type); CHECK(xany.window); switch (newEvent->type) { case MotionNotify: CHECK(xmotion.state); break; case ButtonPress: case ButtonRelease: CHECK(xbutton.state); CHECK(xbutton.button); break; case KeyPress: case KeyRelease: CHECK(xkey.state); CHECK(xkey.keycode); break; case EnterNotify: case LeaveNotify: CHECK(xcrossing.mode); CHECK(xcrossing.detail); CHECK(xcrossing.state); break; } return True; } /*############################################################################### PeekNotifyEvent ###############################################################################*/ struct EventData { XEvent *oldEvent; int count; }; static Bool PeekNotifyEvent (Display *dpy, XEvent *event, char *args) { struct EventData *eventData = (struct EventData*)args; INFMESSAGE(executing Procedure: PeekNotifyEvent) return ((++eventData->count == QLength(dpy)) /* since PeekIf blocks */ || CompareEvents(event, eventData->oldEvent)); } /*############################################################################### LookAhead ###############################################################################*/ static Boolean LookAhead (Widget w, XEvent *event) { XEvent newEvent; struct EventData eventData; BEGINMESSAGE(LookAhead) if (QLength (XtDisplay (w)) == 0) { INFMESSAGE(aborting) ENDMESSAGE(LookAhead) return False; } eventData.count = 0; eventData.oldEvent = event; XPeekIfEvent (XtDisplay (w), &newEvent, PeekNotifyEvent, (char*)&eventData); ENDMESSAGE(LookAhead) return CompareEvents (event, &newEvent); } /*############################################################################### ExtractPosition ###############################################################################*/ #define GET_EVENT_POS(kind) *position = (is_vertical) ? event->kind.y : event->kind.x static void ExtractPosition(XEvent *event, Position *position, Boolean is_vertical) { BEGINMESSAGE(ExtractPosition) switch( event->type ) { case MotionNotify: GET_EVENT_POS(xmotion); break; case ButtonPress: case ButtonRelease: GET_EVENT_POS(xbutton); break; case KeyPress: case KeyRelease: GET_EVENT_POS(xkey); break; case EnterNotify: case LeaveNotify: GET_EVENT_POS(xcrossing); break; default: *position = 0; } ENDMESSAGE(ExtractPosition) } /*############################################################################### HandleThumb ###############################################################################*/ static void HandleThumb (Widget w, XEvent *event, String *params, Cardinal *num_params) { SCROLLBARWIDGET w; Position position; Position teoar = (Position) ARROW_TOP_TO_BORDER+ARROW_HEIGHT-1; Position beoar = (Position) LENGTH-teoar+1; BEGINMESSAGE(HandleThumb) if ((SCROLLMODE != NOSCROLL) && (SCROLLMODE != CONTINUOUS)) { INFMESSAGE(aborting due to wrong scrollmode) ENDMESSAGE(HandleThumb) return; } ExtractPosition(event,&position,(IS_VERTICAL)); if ( (SCROLLMODE==CONTINUOUS) || ((position >= TOPLOC) && (position < TOPLOC + SHOWNLENGTH) && (position>teoar) && (position0) DYNAMIC = INTERVAL + (Dimension)((MAX_INTERVAL-(int)INTERVAL)*rel_diff); else DYNAMIC = INTERVAL + (Dimension)((MIN_INTERVAL-(int)INTERVAL)*(-rel_diff)); IMESSAGE(DYNAMIC) ENDMESSAGE(HandleAutoscroll) } /*############################################################################### RepeatNotify ###############################################################################*/ static void RepeatNotify (XtPointer client_data, XtIntervalId *idp _GL_UNUSED) { SCROLLBARWIDGET client_data; int call_data=0; BEGINMESSAGE(RepeatNotify) if (SCROLLMODE == NOSCROLL || SCROLLMODE == CONTINUOUS) { DESTROY_TIMER; INFMESSAGE(aborting due to wrong scroll_mode) ENDMESSAGE(RepeatNotify) return; } switch (SCROLLMODE) { case ARROW_UP: call_data = -ARROW_SCROLL_AMOUNT; break; case ARROW_DOWN: call_data = ARROW_SCROLL_AMOUNT; break; case PAGE_UP: call_data = -PAGE_SCROLL_AMOUNT; break; case PAGE_DOWN: call_data = PAGE_SCROLL_AMOUNT; break; } CALLscrollProc(client_data,call_data); SET_TIMER( client_data, DYNAMIC); ENDMESSAGE(RepeatNotify) } /*############################################################################### NotifyScroll ###############################################################################*/ static void NotifyScroll(Widget w, XEvent *event, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { SCROLLBARWIDGET w; Position tsoar = (Position) ARROW_TOP_TO_BORDER; Position teoar = (Position) ARROW_TOP_TO_BORDER+ARROW_HEIGHT-1; Position beoar = (Position) LENGTH-teoar+1; Position bsoar = (Position) LENGTH-tsoar-1; Position position; Cardinal init_num_params = _SC_INIT_VALUE_; BEGINMESSAGE(NotifyScroll) if (SCROLLMODE==CONTINUOUS) { INFMESSAGE(aborting since CONTINUOUS scroll in progress) ENDMESSAGE(NotifyScroll) return; } ExtractPosition(event,&position,(IS_VERTICAL)); if ((position>=tsoar) && (position <= teoar)) { if (SHOW_ARROWS) { INFMESSAGE(handle upper/left arrow) PaintArrows(SBW,UPPER_ARROW,INVERTED_ARROW); SCROLLMODE = ARROW_UP; CALLscrollProc(w,((int)-ARROW_SCROLL_AMOUNT)); DYNAMIC = INTERVAL; HandleAutoscroll(w, event, NULL, &init_num_params); SET_TIMER(w,DELAY); } } else if ((position >= beoar) && (position<=bsoar)) { if (SHOW_ARROWS) { INFMESSAGE(handle lower/right arrow) PaintArrows(SBW,LOWER_ARROW,INVERTED_ARROW); SCROLLMODE = ARROW_DOWN; CALLscrollProc(w,((int)ARROW_SCROLL_AMOUNT)); DYNAMIC = INTERVAL; HandleAutoscroll(w, event, NULL, &init_num_params); SET_TIMER(w,DELAY); } } else if ((position>teoar) &&(position < TOPLOC)) { INFMESSAGE(handle Zone above Thumb) SCROLLMODE = PAGE_UP; CALLscrollProc(w,((int)-PAGE_SCROLL_AMOUNT)); DYNAMIC = INTERVAL; SET_TIMER(w,DELAY); } else if ((position TOPLOC + SHOWNLENGTH)) { INFMESSAGE(handle Zone below Thumb) SCROLLMODE = PAGE_DOWN; CALLscrollProc(w,((int)PAGE_SCROLL_AMOUNT)); DYNAMIC = INTERVAL; SET_TIMER(w,DELAY); } ENDMESSAGE(NotifyScroll); } /*############################################################################### EndScroll ###############################################################################*/ /* ARGSUSED */ static void EndScroll(Widget w, XEvent *event _GL_UNUSED, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { SCROLLBARWIDGET w; BEGINMESSAGE(EndScroll) if (SHOW_ARROWS) { if (SCROLLMODE==ARROW_UP) PaintArrows(SBW,UPPER_ARROW,NORMAL_ARROW); if (SCROLLMODE==ARROW_DOWN) PaintArrows(SBW,LOWER_ARROW,NORMAL_ARROW); } SCROLLMODE=NOSCROLL; DESTROY_TIMER; ENDMESSAGE(EndScroll) } /*############################################################################### MoveThumb ###############################################################################*/ static void MoveThumb(Widget w, XEvent *event, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { SCROLLBARWIDGET w; Position position; static Position old_position; float losr = (float)(_SCROLL_LENGTH_-MIN_THUMB); Position tosr = (Position) ARROW_TOP_TO_BORDER+ARROW_HEIGHT+THUMB_TO_ARROW; Position bosr = (Position) LENGTH-1-tosr; BEGINMESSAGE(MoveThumb) if (LookAhead (w, event)) { INFMESSAGE(aborting due to LookAhead) ENDMESSAGE(MoveThumb) return; } if (!event->xmotion.same_screen) { INFMESSAGE(aborting due to wrong screen) ENDMESSAGE(MoveThumb) return; } ExtractPosition(event,&position,(IS_VERTICAL)); position = PUT_IN_RANGE(tosr,position,bosr); if (SCROLLMODE != CONTINUOUS) { if ((position < TOPLOC) || (position >= TOPLOC + SHOWNLENGTH)) { TOP = PUT_IN_RANGE(0.0,((float)(position-tosr))/losr, 1.0-SHOWN); } SCROLLMODE=CONTINUOUS; } else { TOP = PUT_IN_RANGE(0.0,TOP+((float)(position-old_position))/losr, 1.0-SHOWN); } old_position = position; PaintThumb(SBW); XFlush(XtDisplay (w)); ENDMESSAGE(MoveThumb) } /*############################################################################### NotifyThumb ###############################################################################*/ static void NotifyThumb(Widget w, XEvent *event, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { register SCROLLBARWIDGET w; BEGINMESSAGE(NotifyThumb) if (LookAhead (w, event)) { INFMESSAGE(returning due to LookAhead) ENDMESSAGE(NotifyThumb) return; } /* thumbProc is not pretty, but is necessary for backwards compatibility on those architectures for which it work{s,ed}; the intent is to pass a (truncated) float by value. */ XtCallCallbacks (w, XtNthumbProc, *(XtPointer*)&TOP); XtCallCallbacks (w, XtNjumpProc, (XtPointer)&TOP); ENDMESSAGE(NotifyThumb) } /******************************************************************************** * * Public routines. * *******************************************************************************/ /*############################################################################### XawScrollbarSetThumb Set the scroll bar to the given location. ###############################################################################*/ void XawScrollbarSetThumb (Widget w, #if NeedWidePrototypes double top, double shown #else float top, float shown #endif ) { SCROLLBARWIDGET w; BEGINMESSAGE(XawScrollbarSetThumb) if (SCROLLMODE == CONTINUOUS) { INFMESSAGE(aborting since CONTINUOUS scroll in progress) ENDMESSAGE(XawScrollbarSetThumb) return; } SHOWN = PUT_IN_RANGE(0.0,shown,1.0); FMESSAGE(SHOWN) TOP = PUT_IN_RANGE(0.0,top, 1.0); FMESSAGE(TOP) PaintThumb(SBW); ENDMESSAGE(XawScrollbarSetThumb) } gv-3.7.4/src/Switch.c0000664000076400007640000001212311735103745011275 00000000000000/* ** ** Switch.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include #include "paths.h" #include INC_X11(IntrinsicP.h) #include INC_X11(StringDefs.h) #include INC_XAW(XawInit.h) #include "SwitchP.h" static void ClassInitialize(void); #define superclass ((ButtonWidgetClass)&buttonClassRec) static char defaultTranslations[] = "Any:highlight()\n\ Any:toggle()"; #define offset(field) XtOffsetOf(SwitchRec, field) static XtResource resources[] = { {XtNhighlightedFrameStyle, XtCHighlightedFrameStyle, XtRFrameType, sizeof(XawFrameType), offset(button.highlighted_frame_style), XtRImmediate, (XtPointer) XawSUNKEN }, {XtNunsetFrameStyle, XtCUnsetFrameStyle, XtRFrameType, sizeof(XawFrameType), offset(button.unset_frame_style), XtRImmediate, (XtPointer) XawCHISELED }, {XtNsetFrameStyle, XtCSetFrameStyle, XtRFrameType, sizeof(XawFrameType), offset(button.set_frame_style), XtRImmediate, (XtPointer) XawSUNKEN }, }; #undef offset static XtActionsRec actionsList[] = { {"toggle", SwitchToggle}, }; SwitchClassRec switchClassRec = { { (WidgetClass) superclass, /* superclass */ "Switch", /* class_name */ sizeof(SwitchRec), /* size */ ClassInitialize, /* class_initialize */ NULL, /* class_part_initialize */ FALSE, /* class_inited */ NULL, /* initialize */ NULL, /* initialize_hook */ XtInheritRealize, /* realize */ actionsList, /* actions */ XtNumber(actionsList), /* num_actions */ resources, /* resources */ XtNumber(resources), /* resource_count */ NULLQUARK, /* xrm_class */ FALSE, /* compress_motion */ TRUE, /* compress_exposure */ TRUE, /* compress_enterleave */ FALSE, /* visible_interest */ NULL, /* destroy */ XtInheritResize, /* resize */ XtInheritExpose, /* expose */ NULL, /* set_values */ NULL, /* set_values_hook */ XtInheritSetValuesAlmost, /* set_values_almost */ NULL, /* get_values_hook */ NULL, /* accept_focus */ XtVersion, /* version */ NULL, /* callback_private */ defaultTranslations, /* tm_table */ XtInheritQueryGeometry, /* query_geometry */ XtInheritDisplayAccelerator, /* display_accelerator */ NULL /* extension */ }, /* CoreClass fields initialization */ { XtInheritChangeSensitive /* change_sensitive */ }, /* SimpleClass fields initialization */ { XtInheritXaw3dShadowDraw, /* shadowdraw */ }, /* ThreeDClass fields initialization */ { 0, /* field not used */ }, /* LabelClass fields initialization */ { 0, /* field not used */ }, /* CommandClass fields initialization */ { 0, /* field not used */ }, /* ButtonClass fields initialization */ { 0, /* field not used */ } /* SwitchClass fields initialization */ }; WidgetClass switchWidgetClass = (WidgetClass) &switchClassRec; /*---------------------------------------------------*/ /* Private Procedures */ /*---------------------------------------------------*/ static void ClassInitialize(void) { XawInitializeWidgetSet(); } /*###################################################*/ /* Public Procedures */ /*###################################################*/ void SwitchToggle(w,event,params,num_params) Widget w; XEvent *event; String *params; Cardinal *num_params; { SwitchWidget sw = (SwitchWidget)w; BEGINMESSAGE(SwitchToggle) if (sw->command.set) { sw->command.highlighted = 0; ButtonReset(w,event,params,num_params); } else ButtonSet(w,event,params,num_params); ENDMESSAGE(SwitchToggle) } int SwitchIsSet(w) Widget w; { SwitchWidget sw = (SwitchWidget)w; BEGINMESSAGE(SwitchIsSet) if (sw->command.set) return(1); else return(0); ENDMESSAGE(SwitchIsSet) } gv-3.7.4/src/gv_empty.xbm0000664000076400007640000000056411437764362012247 00000000000000#define empty_width 13 #define empty_height 23 static unsigned char empty_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; gv-3.7.4/src/gv_icon.xbm0000664000076400007640000000440111437764362012033 00000000000000#define GV_width 50 #define GV_height 50 #define GV_x_hot 0 #define GV_y_hot 0 static unsigned char GV_bits[] = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x02, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x01, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x02, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x01, 0xaa, 0x2a, 0xa2, 0x20, 0xa2, 0xaa, 0x02, 0x55, 0x95, 0x48, 0x0a, 0x08, 0x55, 0x01, 0xaa, 0x10, 0x04, 0x80, 0x80, 0xa2, 0x02, 0x55, 0x55, 0x01, 0x20, 0x28, 0x55, 0x01, 0xaa, 0x42, 0x00, 0x00, 0x80, 0xa8, 0x02, 0x55, 0x11, 0xe0, 0x07, 0x41, 0x51, 0x01, 0x2a, 0x42, 0x30, 0x1c, 0x14, 0xa8, 0x02, 0x95, 0x08, 0x18, 0x30, 0x00, 0x55, 0x01, 0x2a, 0x24, 0x0c, 0x20, 0x29, 0xa9, 0x02, 0x55, 0x01, 0x0c, 0x40, 0x00, 0x50, 0x01, 0x2a, 0x14, 0x0c, 0x40, 0x84, 0xa8, 0x02, 0x95, 0x80, 0x0c, 0x60, 0x00, 0x54, 0x01, 0x2a, 0x00, 0x1c, 0x30, 0x40, 0xaa, 0x02, 0x55, 0x1e, 0x18, 0x18, 0x00, 0x54, 0x01, 0x2a, 0x36, 0x38, 0x08, 0x3c, 0xa8, 0x02, 0x55, 0x27, 0x30, 0x08, 0x66, 0x54, 0x01, 0x2a, 0xe7, 0x10, 0x08, 0x43, 0xaa, 0x02, 0x15, 0x8e, 0x0f, 0x98, 0x71, 0x54, 0x01, 0x2a, 0x1c, 0x00, 0xf0, 0x18, 0xaa, 0x02, 0x55, 0x78, 0x00, 0x00, 0x0c, 0x54, 0x01, 0x2a, 0xe0, 0x00, 0x00, 0x06, 0xaa, 0x02, 0x55, 0xcb, 0x01, 0x00, 0x03, 0x54, 0x01, 0x2a, 0x80, 0x03, 0x80, 0x01, 0xa8, 0x02, 0x95, 0x00, 0x03, 0x80, 0x21, 0x51, 0x01, 0x2a, 0x15, 0x07, 0xc0, 0x00, 0xa4, 0x02, 0x55, 0x01, 0x07, 0x60, 0x10, 0x51, 0x01, 0x2a, 0x04, 0x06, 0x20, 0x00, 0xa8, 0x02, 0x55, 0x20, 0x0e, 0x30, 0x24, 0x50, 0x01, 0x2a, 0x09, 0x1c, 0x10, 0x20, 0xaa, 0x02, 0x55, 0x40, 0x18, 0x30, 0x01, 0x54, 0x01, 0x2a, 0x09, 0x38, 0x30, 0x04, 0xaa, 0x02, 0x15, 0x00, 0x70, 0x20, 0x00, 0x54, 0x01, 0x2a, 0x29, 0x70, 0x60, 0x8c, 0xaa, 0x02, 0x55, 0x00, 0xe1, 0xe0, 0x0f, 0x54, 0x01, 0x2a, 0x85, 0xe0, 0xc0, 0x0b, 0xaa, 0x02, 0x55, 0x00, 0xc1, 0x01, 0x8c, 0x54, 0x01, 0xaa, 0x52, 0x80, 0x07, 0x06, 0xa8, 0x02, 0x55, 0x08, 0x04, 0xff, 0x43, 0x55, 0x01, 0xaa, 0x42, 0x20, 0xfc, 0x01, 0xa8, 0x02, 0x55, 0x11, 0x01, 0x00, 0x50, 0x55, 0x01, 0xaa, 0xaa, 0xa4, 0x10, 0x02, 0xaa, 0x02, 0x55, 0x55, 0x55, 0x55, 0x54, 0x55, 0x01, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x02, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x01, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x02, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x01}; gv-3.7.4/src/Button.h0000664000076400007640000000450211735103745011316 00000000000000/* ** ** Button.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Authors: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project */ #ifndef _Button_h_ #define _Button_h_ #include "paths.h" #include INC_XAW(Command.h) #include "Frame.h" #define XtNsetFrameStyle "setFrameStyle" #define XtCSetFrameStyle "SetFrameStyle" #define XtNunsetFrameStyle "unsetFrameStyle" #define XtCUnsetFrameStyle "UnsetFrameStyle" #define XtNhighlightedFrameStyle "highlightedFrameStyle" #define XtCHighlightedFrameStyle "HighlightedFrameStyle" #define XtNsetShadowWidth "setShadowWidth" #define XtNunsetShadowWidth "unsetShadowWidth" #define XtCButtonShadowWidth "ButtonShadowWidth" #define XtNhighlightedBackground "highlightedBackground" #define XtCHighlightedBackground "HighlightedBackground" #define XtNsetBackground "setBackground" #define XtCSetBackground "SetBackground" #define XtNunsetBackground "unsetBackground" #define XtCUnsetBackground "UnsetBackground" extern WidgetClass buttonWidgetClass; typedef struct _ButtonClassRec *ButtonWidgetClass; typedef struct _ButtonRec *ButtonWidget; extern void ButtonSet (Widget, XEvent *, String *, Cardinal *); extern void ButtonUnset (Widget, XEvent *, String *, Cardinal *); extern void ButtonReset (Widget, XEvent *, String *, Cardinal *); extern void ButtonHighlight (Widget, XEvent *, String *, Cardinal *); #endif /* _Button_h_ */ gv-3.7.4/src/dialog.c0000664000076400007640000002712311735103745011301 00000000000000/* ** ** dialog.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project */ #include "ac_config.h" #include "config.h" #ifdef HAVE_XAW3D_INTERNATIONAL #include "VlistP.h" #endif #include /* #define MESSAGES */ #include "message.h" #include "paths.h" #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_X11(Xos.h) #include INC_XAW(AsciiText.h) #include INC_XAW(Label.h) #include INC_X11(Shell.h) #include "Aaa.h" #include "Button.h" #include "Ghostview.h" #include "types.h" #include "main_resources.h" #include "main_globals.h" #include "popup.h" #include "widgets_misc.h" #ifndef max # define max(a, b) ((a) > (b) ? (a) : (b)) #endif /*### Application dependencies ##############################################*/ #define DIALOG_TOPLEVEL toplevel #define DIALOG_POPUP_NAME "dialogPopup" #define DIALOG_POPUP dialogpopup #include "note.h" #include "dialog.h" static Bool dialogPopupCreated = False; static Bool dialogPopupVisible = False; static Widget doneButton=NULL,cancelButton=NULL,dialogText=NULL; static int preferedButton=0; /*############################################################################### cb_popdownDialogPopup ###############################################################################*/ void cb_popdownDialogPopup(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { BEGINMESSAGE(cb_popdownDialogPopup) if (dialogPopupVisible) { cb_popdownNotePopup((Widget)NULL,(XtPointer)NULL,NULL); XtPopdown(DIALOG_POPUP); dialogPopupVisible=False; } ENDMESSAGE(cb_popdownDialogPopup) } /*############################################################################### cb_popupDialogPopup ###############################################################################*/ void cb_popupDialogPopup(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { BEGINMESSAGE(cb_popupDialogPopup) if (!dialogPopupVisible) { if (!dialogPopupCreated) makeDialogPopup(); preferedButton=DIALOG_BUTTON_CANCEL; action_preferDialogPopupButton(NULL, NULL, NULL, NULL); popup_positionPopup(dialogpopup,viewFrame,POPUP_POSITION_POS,4,4); XtPopup(DIALOG_POPUP,XtGrabNone); dialogPopupVisible=True; } ENDMESSAGE(cb_popupDialogPopup) } /*############################################################################### action_preferDialogPopupButton ###############################################################################*/ void action_preferDialogPopupButton(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { Widget pref,pref_old; BEGINMESSAGE(action_preferDialogPopupButton) if (preferedButton==DIALOG_BUTTON_DONE) { pref=cancelButton; pref_old=doneButton; preferedButton=DIALOG_BUTTON_CANCEL; } else { pref=doneButton; pref_old=cancelButton; preferedButton=DIALOG_BUTTON_DONE; } widgets_preferButton(pref,1); widgets_preferButton(pref_old,0); XtInstallAccelerators(dialogText,pref_old); XtInstallAccelerators(dialogText,pref); ENDMESSAGE(action_preferDialogPopupButton) } /*############################################################################### makeDialogPopup ###############################################################################*/ static char *tabTrans = "\ Tab: GV_TogDialPrefBut()\n\ :no-op()\n\ :no-op()\n\ :display-caret(on,always)\ "; void makeDialogPopup(void) { Arg args[7]; Cardinal n; Dimension minw,minh; Widget dialogAaa; static XtTranslations tab_trans=(XtTranslations)NULL; BEGINMESSAGE(makeDialogPopup) n=0; XtSetArg(args[n], XtNallowShellResize, True); n++; DIALOG_POPUP = XtCreatePopupShell(DIALOG_POPUP_NAME,transientShellWidgetClass,DIALOG_TOPLEVEL, args, n); n=0; XtSetArg(args[n], XtNresizeWidth, True); n++; XtSetArg(args[n], XtNresizeHeight, True); n++; XtSetArg(args[n], XtNmaximumWidth, 0); n++; XtSetArg(args[n], XtNmaximumHeight,0); n++; dialogAaa = XtCreateManagedWidget("dialogAaa",aaaWidgetClass,DIALOG_POPUP,args,n); n=0; XtCreateManagedWidget("message", labelWidgetClass,dialogAaa, args, n); n=0; doneButton=XtCreateManagedWidget("done",buttonWidgetClass,dialogAaa,args,n); cancelButton=XtCreateManagedWidget("cancel",buttonWidgetClass,dialogAaa,args,n); dialogText=widgets_createLabeledLineTextField("dialog_text", dialogAaa); XtRealizeWidget(DIALOG_POPUP); AaaWidgetGetNaturalSize((AaaWidget)dialogAaa,&minw,&minh); IMESSAGE(minw) IMESSAGE(minh) n=0; XtSetArg(args[n], XtNminWidth, minw); ++n; XtSetArg(args[n], XtNminHeight, minh); ++n; XtSetArg(args[n], XtNmaxWidth, XtUnspecifiedShellInt); ++n; XtSetArg(args[n], XtNmaxHeight, minh); ++n; XtSetValues(DIALOG_POPUP, args, n); /*>>>*/ if (!tab_trans) tab_trans=XtParseTranslationTable(tabTrans); XtOverrideTranslations(dialogText,tab_trans); XtSetKeyboardFocus(dialogAaa,dialogText); n=0; XtSetArg(args[n],XtNdisplayCaret,True); n++; XtSetValues(dialogText, args, n); /*<<<*/ XSetWMProtocols(XtDisplay(DIALOG_POPUP),XtWindow(DIALOG_POPUP),&wm_delete_window,1); dialogPopupCreated=True; ENDMESSAGE(makeDialogPopup) } /*############################################################################### DialogPopupSetButton ###############################################################################*/ void DialogPopupSetButton(int button, String label, XtCallbackProc callback) { Arg args[5]; Cardinal n; Widget response=NULL; BEGINMESSAGE(DialogPopupSetButton) if (!dialogPopupCreated) makeDialogPopup(); if (button&DIALOG_BUTTON_DONE) response = doneButton; else if (button&DIALOG_BUTTON_CANCEL) response = cancelButton; if (response) { if (label) { n=0; XtSetArg(args[n], XtNlabel, label); n++; XtSetValues(response, args, n); } if (callback) { XtRemoveAllCallbacks(response,XtNcallback); XtAddCallback(response, XtNcallback,callback,NULL); } } ENDMESSAGE(DialogPopupSetButton) } /*############################################################################### DialogPopupClearText ###############################################################################*/ void DialogPopupClearText(void) { Arg args[5]; Cardinal n; Widget response; BEGINMESSAGE(DialogPopupClearText) if (!dialogPopupCreated) makeDialogPopup(); response = XtNameToWidget(DIALOG_POPUP, "*dialog_text"); n=0; XtSetArg(args[n], XtNstring, ""); n++; XtSetValues(response, args, n); ENDMESSAGE(DialogPopupClearText) } /*############################################################################### DialogPopupSetText ###############################################################################*/ void DialogPopupSetText(String s) { Arg args[10]; Cardinal n; Widget response; #ifdef HAVE_XAW3D_INTERNATIONAL VlistWidget vw; #endif Dimension width; # define DIALOG_POPUP_FREE_SPACE 50 # define DIALOG_POPUP_TEXT_MIN_WIDTH 100 String os; Dimension lm,rm,bw,nw; #ifdef HAVE_XAW3D_INTERNATIONAL XFontSet fontset; #endif XFontStruct *font; BEGINMESSAGE(DialogPopupSetText) if (!s) {INFMESSAGE(no text) ENDMESSAGE(DialogPopupSetText) return;} if (!dialogPopupCreated) makeDialogPopup(); response = XtNameToWidget(DIALOG_POPUP, "*dialog_text"); n=0; #ifdef HAVE_XAW3D_INTERNATIONAL vw = (VlistWidget)response; if( vw->simple.international == True ) { XtSetArg(args[n], XtNfontSet, &fontset); n++; } else { #endif XtSetArg(args[n], XtNfont, &font); n++; #ifdef HAVE_XAW3D_INTERNATIONAL } #endif XtSetArg(args[n], XtNleftMargin, &lm); n++; XtSetArg(args[n], XtNrightMargin, &rm); n++; XtSetArg(args[n], XtNborderWidth, &bw); n++; XtSetArg(args[n], XtNstring, &os); n++; XtSetArg(args[n], XtNwidth, &width); n++; XtGetValues(response, args, n); n=0; #ifdef HAVE_XAW3D_INTERNATIONAL if( vw->simple.international == True ) nw= XmbTextEscapement( fontset, s, strlen(s)); else #endif nw= ((font->max_bounds.width+font->min_bounds.width)*((Dimension)strlen(s))+1)/2; nw += lm+rm+DIALOG_POPUP_FREE_SPACE+2*bw; if (nwwidth) { INFIMESSAGE(new width,nw) XtSetArg(args[n], XtNwidth,nw); n++; } XtSetArg(args[n], XtNstring, s); n++; XtSetValues(response, args, n); n=0; XtSetArg(args[n], XtNinsertPosition,strlen(s)); n++; XtSetValues(response, args, n); ENDMESSAGE(DialogPopupSetText) } /*############################################################################### DialogPopupGetText ###############################################################################*/ String DialogPopupGetText(void) { Arg args[5]; Cardinal n; Widget response; String s; static char string[256]; int l; BEGINMESSAGE(DialogPopupGetText) if (!dialogPopupCreated) makeDialogPopup(); response = XtNameToWidget(DIALOG_POPUP, "*dialog_text"); n=0; XtSetArg(args[n], XtNstring, &s); n++; XtGetValues(response, args, n); l= strlen(s); if (l<255) strcpy(string,s); else { strncpy(string,s,255); string[255]='\0'; } ENDMESSAGE(DialogPopupGetText) return string; } /*############################################################################### DialogPopupSetPrompt ###############################################################################*/ void DialogPopupSetPrompt(String newprompt) { Arg args[5]; Cardinal n; Widget label; BEGINMESSAGE(DialogPopupSetPrompt) if (!dialogPopupCreated) makeDialogPopup(); label = XtNameToWidget(DIALOG_POPUP, "*dialog_textLabel"); n=0; XtSetArg(args[n], XtNlabel, newprompt); n++; XtSetValues(label, args, n); ENDMESSAGE(DialogPopupSetPrompt) } /*############################################################################### DialogPopupSetMessage ###############################################################################*/ void DialogPopupSetMessage(String message) { Arg args[5]; Cardinal n; Widget label; BEGINMESSAGE(DialogPopupSetMessage) if (!dialogPopupCreated) makeDialogPopup(); label = XtNameToWidget(DIALOG_POPUP, "*message"); n=0; XtSetArg(args[n], XtNlabel, message); n++; XtSetValues(label, args, n); ENDMESSAGE(DialogPopupSetMessage) } gv-3.7.4/src/AaaP.h0000664000076400007640000001066611676665540010667 00000000000000/* * $XConsortium: LayoutP.h,v 1.2 92/01/22 18:03:08 keith Exp $ * * Copyright 1991 Massachusetts Institute of Technology * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of M.I.T. not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. M.I.T. makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T. * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Keith Packard, MIT X Consortium */ /* modified by Johannes Plass (plass@thep.physik.uni-mainz.de) ###jp### 02/06 */ #ifndef _XawLayoutP_h #define _XawLayoutP_h #include "paths.h" #include "Aaa.h" #include INC_X11(ConstrainP.h) typedef enum _BoxType { BoxBox, WidgetBox, GlueBox, VariableBox } BoxType; typedef enum _LayoutDirection { LayoutHorizontal = 0, LayoutVertical = 1 } LayoutDirection; typedef enum _Operator { Plus, Minus, Times, Divide, Percent } Operator; typedef enum _ExprType { Constant, Binary, Unary, Width, Height, Variable } ExprType; typedef struct _Expr *ExprPtr; typedef struct _Expr { ExprType type; union { double constant; struct { Operator op; ExprPtr left, right; } binary; struct { Operator op; ExprPtr down; } unary; XrmQuark width; XrmQuark height; XrmQuark variable; } u; } ExprRec; typedef struct _Glue { int order; double value; ExprPtr expr; } GlueRec, *GluePtr; typedef struct _BoxParams { GlueRec stretch[2]; GlueRec shrink[2]; } BoxParamsRec, *BoxParamsPtr; typedef struct _Box *BoxPtr; typedef BoxPtr LayoutPtr; typedef struct _Box { BoxPtr nextSibling; BoxPtr parent; BoxParamsRec params; int size[2]; int natural[2]; BoxType type; union { struct { BoxPtr firstChild; LayoutDirection dir; } box; struct { XrmQuark quark; Widget widget; } widget; struct { ExprPtr expr; } glue; struct { XrmQuark quark; ExprPtr expr; } variable; } u; } LBoxRec; /* this conflicted with Box's BoxRec, besides, it's not used anywhere */ typedef struct _SubInfo { int naturalSize[2]; int naturalBw; Boolean allow_resize; Dimension forced_width; Dimension forced_height; } SubInfoRec, *SubInfoPtr; /********************************************************************* * * Aaa Widget Private Data * *********************************************************************/ /* New fields for the Aaa widget class record */ typedef struct _AaaClassPart { int foo; /* keep compiler happy. */ } AaaClassPart; /* Full Class record declaration */ typedef struct _AaaClassRec { CoreClassPart core_class; CompositeClassPart composite_class; ConstraintClassPart constraint_class; AaaClassPart aaa_class; } AaaClassRec; extern AaaClassRec aaaClassRec; typedef struct _AaaConstraintsRec { SubInfoRec aaa; } AaaConstraintsRec, *AaaConstraints; #define SubInfo(w) (&(((AaaConstraints) (w)->core.constraints)->aaa)) /* New Fields for the Aaa widget record */ typedef struct { /* resources */ LayoutPtr layout; Boolean debug; Boolean resize_width; Boolean resize_height; Dimension maximum_width; Dimension maximum_height; Dimension minimum_width; Dimension minimum_height; } AaaPart; /************************************************************************** * * Full instance record declaration * **************************************************************************/ typedef struct _AaaRec { CorePart core; CompositePart composite; ConstraintPart constraint; AaaPart aaa; } AaaRec; #endif gv-3.7.4/src/Aaa_bison.yacc0000664000076400007640000001404211437764362012416 00000000000000 %pure_parser %{ #include "Aaa_intern.h" %} %type box boxes compositebox %type bothparams oneparams %type glue opStretch opShrink %type orientation %type signedExpr simpleExpr expr %token OC CC OA CA OP CP %token NAME %token NUMBER %token INFINITY %token VERTICAL HORIZONTAL %token EQUAL DOLLAR %left PLUS MINUS %left TIMES DIVIDE PERCENTOF %right PERCENT %nonassoc WIDTH HEIGHT %right UMINUS UPLUS %% layout : compositebox { *(((LayoutConverterArg)layoutConverterArg)->to) = (LayoutPtr) $1; } ; box : NAME bothparams { BoxPtr box = New(LBoxRec); MEMMESSAGE(WidgetBox) box->nextSibling = 0; box->type = WidgetBox; box->params = *$2; Dispose ($2); box->u.widget.quark = $1; $$ = box; } | signedExpr oneparams { BoxPtr box = New(LBoxRec); MEMMESSAGE(GlueBox) box->nextSibling = 0; box->type = GlueBox; box->params = *$2; Dispose ($2); box->u.glue.expr = $1; $$ = box; } | NAME EQUAL signedExpr { BoxPtr box = New(LBoxRec); MEMMESSAGE(VariableBox) box->nextSibling = 0; box->type = VariableBox; box->u.variable.quark = $1; box->u.variable.expr = $3; ZeroGlue (box->params.stretch[LayoutHorizontal]); /*###jp###*/ ZeroGlue (box->params.shrink[LayoutHorizontal]); /*###jp###*/ ZeroGlue (box->params.stretch[LayoutVertical]); /*###jp###*/ ZeroGlue (box->params.shrink[LayoutVertical]); /*###jp###*/ $$ = box; } | compositebox { $$ = $1; } ; compositebox : orientation OC boxes CC { BoxPtr box = New(LBoxRec); BoxPtr child; MEMMESSAGE(BoxBox) box->nextSibling = 0; box->parent = 0; box->type = BoxBox; box->u.box.dir = $1; box->u.box.firstChild = $3; ZeroGlue (box->params.stretch[LayoutHorizontal]); /*###jp###*/ ZeroGlue (box->params.shrink[LayoutHorizontal]); /*###jp###*/ ZeroGlue (box->params.stretch[LayoutVertical]); /*###jp###*/ ZeroGlue (box->params.shrink[LayoutVertical]); /*###jp###*/ for (child = $3; child; child = child->nextSibling) { if (child->type == GlueBox) { child->params.stretch[!$1].expr = 0; child->params.shrink[!$1].expr = 0; child->params.stretch[!$1].order = 100000; child->params.shrink[!$1].order = 100000; child->params.stretch[!$1].value = 1; child->params.shrink[!$1].value = 1; } child->parent = box; } $$ = box; } ; boxes : box boxes { $1->nextSibling = $2; $$ = $1; } | box { $$ = $1; } ; bothparams : OA opStretch opShrink TIMES opStretch opShrink CA { BoxParamsPtr p = New(BoxParamsRec); MEMMESSAGE(BoxParamsRec) p->stretch[LayoutHorizontal] = $2; p->shrink[LayoutHorizontal] = $3; p->stretch[LayoutVertical] = $5; p->shrink[LayoutVertical] = $6; $$ = p; } | { BoxParamsPtr p = New(BoxParamsRec); MEMMESSAGE(BoxParamsRec) ZeroGlue (p->stretch[LayoutHorizontal]); ZeroGlue (p->shrink[LayoutHorizontal]); ZeroGlue (p->stretch[LayoutVertical]); ZeroGlue (p->shrink[LayoutVertical]); $$ = p; } ; oneparams : OA opStretch opShrink CA { BoxParamsPtr p = New(BoxParamsRec); MEMMESSAGE(BoxParamsRec) p->stretch[LayoutHorizontal] = $2; p->shrink[LayoutHorizontal] = $3; p->stretch[LayoutVertical] = $2; p->shrink[LayoutVertical] = $3; $$ = p; } | { BoxParamsPtr p = New(BoxParamsRec); MEMMESSAGE(BoxParamsRec) ZeroGlue (p->stretch[LayoutHorizontal]); ZeroGlue (p->shrink[LayoutHorizontal]); ZeroGlue (p->stretch[LayoutVertical]); ZeroGlue (p->shrink[LayoutVertical]); $$ = p; } ; opStretch : PLUS glue { $$ = $2; } | { ZeroGlue ($$); } ; opShrink : MINUS glue { $$ = $2; } | { ZeroGlue ($$); } ; glue : simpleExpr INFINITY { $$.order = $2; $$.expr = $1; } | simpleExpr { $$.order = 0; $$.expr = $1; } | INFINITY { $$.order = $1; $$.expr = 0; $$.value = 1; } ; signedExpr : MINUS simpleExpr %prec UMINUS { $$ = New(ExprRec); MEMMESSAGE(ExprRec) $$->type = Unary; $$->u.unary.op = $1; $$->u.unary.down = $2; } | PLUS simpleExpr %prec UPLUS { $$ = $2; } | simpleExpr ; simpleExpr : WIDTH NAME { $$ = New(ExprRec); MEMMESSAGE(Width) $$->type = Width; $$->u.width = $2; } | HEIGHT NAME { $$ = New(ExprRec); MEMMESSAGE(Height) $$->type = Height; $$->u.height = $2; } | OP expr CP { $$ = $2; } | simpleExpr PERCENT { $$ = New(ExprRec); $$->type = Unary; $$->u.unary.op = $2; $$->u.unary.down = $1; } | NUMBER { $$ = New(ExprRec); MEMMESSAGE(Constant) $$->type = Constant; $$->u.constant = $1; } | DOLLAR NAME { $$ = New(ExprRec); MEMMESSAGE(Variable) $$->type = Variable; $$->u.variable = $2; } ; expr : expr PLUS expr { binary: ; $$ = New(ExprRec); MEMMESSAGE(Binary) $$->type = Binary; $$->u.binary.op = $2; $$->u.binary.left = $1; $$->u.binary.right = $3; } | expr MINUS expr { goto binary; } | expr TIMES expr { goto binary; } | expr DIVIDE expr { goto binary; } | expr PERCENTOF expr { goto binary; } | MINUS expr %prec UMINUS { unary: ; $$ = New(ExprRec); MEMMESSAGE(Unary) $$->type = Unary; $$->u.unary.op = $1; $$->u.unary.down = $2; } | PLUS expr %prec UPLUS { $$ = $2; } | simpleExpr ; orientation : VERTICAL { $$ = LayoutVertical; } | HORIZONTAL { $$ = LayoutHorizontal; } ; %% gv-3.7.4/src/zoom.h0000664000076400007640000000230011735103746011022 00000000000000/* ** ** zoom.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_ZOOM_H_ #define _GV_ZOOM_H_ extern void zoom_createZoom (Widget, XtPointer); #endif /* _GV_ZOOM_H_ */ gv-3.7.4/src/misc_private.c0000664000076400007640000000772511735103745012535 00000000000000/* ** ** misc_private.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include #include "paths.h" #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_XAW(Cardinals.h) #include INC_X11(IntrinsicP.h) #include INC_XAW(LabelP.h) #include "GhostviewP.h" #include "types.h" #include "misc_private.h" #include "VlistP.h" /*############################################################*/ /* update_label */ /*############################################################*/ void update_label(widget,text) Widget widget; char *text; { LabelWidget w = (LabelWidget) widget; VlistWidget vw = (VlistWidget) widget; int shadow; BEGINMESSAGE1(update_label) if (!XtIsRealized(widget)) { INFMESSAGE(not realized) ENDMESSAGE(update_label) return; } shadow = w->threeD.shadow_width; if ((w->core.width > shadow+shadow) && (w->core.height > shadow+shadow)) { XClearArea(XtDisplay(widget),XtWindow(widget), shadow,shadow, (Dimension)(w->core.width-shadow-shadow), (Dimension)(w->core.height-shadow-shadow), (text) ? False : True); } if (text) { /* most of the following comes from X11/Xaw/Label.c */ Position x,y; INFSMESSAGE(update_label,text) #ifdef HAVE_XAW3D_INTERNATIONAL if( vw->simple.international == True ) { y = w->label.label_y - XExtentsOfFontSet(w->label.fontset)->max_logical_extent.y; } else { #endif y = w->label.label_y + w->label.font->max_bounds.ascent; #ifdef HAVE_XAW3D_INTERNATIONAL } #endif if (w->label.justify == XtJustifyCenter) { unsigned int width; int len = (int) strlen(text); #ifdef HAVE_XAW3D_INTERNATIONAL if( vw->simple.international == True ) { XFontSet fs = w->label.fontset; width = XmbTextEscapement(fs, text, (int)len ); } else { #endif XFontStruct *fs = w->label.font; if (w->label.encoding) width = XTextWidth16 (fs, (XChar2b*)text, (int)(len/2) ); else width = XTextWidth (fs, text , (int)(len) ); #ifdef HAVE_XAW3D_INTERNATIONAL } #endif x = (Position) ((w->core.width-width)/2); } else { x = w->label.internal_width + w->threeD.shadow_width; } #ifdef HAVE_XAW3D_INTERNATIONAL if( vw->simple.international == True ) { XmbDrawString(XtDisplay(widget), XtWindow(widget), w->label.fontset, w->label.normal_GC, x, y, text, (int)(strlen(text))); } else { #endif if (w->label.encoding) { XDrawString16(XtDisplay(widget), XtWindow(widget), w->label.normal_GC, x, y,(XChar2b*)text, (int)(strlen(text))); } else { XDrawString(XtDisplay(widget), XtWindow(widget), w->label.normal_GC, x, y, text, (int)(strlen(text))); } #ifdef HAVE_XAW3D_INTERNATIONAL } #endif } ENDMESSAGE1(update_label) } gv-3.7.4/src/FileSel.c0000664000076400007640000017651611736064614011402 00000000000000/* ** ** FileSel.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include "config.h" #include /* for malloc etc.*/ #include /* for toupper */ #include #include #include #include #include #include /* Damn it, don't ever use getwd with stupid linux ###jp### */ #define getwd(aaa) getcwd((aaa),(FS_MAXNAMLEN-2)) #include "paths.h" #include INC_X11(Xlib.h) #include INC_X11(Xos.h) #include INC_X11(IntrinsicP.h) #include INC_X11(StringDefs.h) #include INC_XMU(Misc.h) #include INC_XMU(CharSet.h) /* for XmuCompareISOLatin1() */ #include INC_XAW(XawInit.h) #include INC_XAW(AsciiText.h) #include INC_XAW(Scrollbar.h) #include INC_XAW(SimpleMenu.h) #include INC_XAW(SmeBSB.h) #include "Button.h" #include "Clip.h" #include "Frame.h" #include "FileSelP.h" #include "MButton.h" #include "Vlist.h" #include "VlistP.h" /*#################################################################### OS dependant Definitions ####################################################################*/ #define FS_MAXNAMLEN 255 #define DIR_SEPARATOR_STRING "/" #define DIR_SPECIFICATION_START_STRING "" #define DIR_SPECIFICATION_END_STRING "" #define CHANGE_TO_HEAD_OF_DIR_SPEC(path) { \ char*p=path; \ *p='/'; p++; *p='\0'; \ } #define ONE_STEP_UP ".." /* chdir argument to make one step up in the directory tree. */ #define HOME getenv("HOME") /* chdir argument to go home (the login directory) */ /*#################################################################### Initializations ####################################################################*/ static String unknownList[] = {"",NULL}; static String cannotopenList[] = {"",NULL}; static void FS_textfieldFocusAction(Widget,XEvent*,String*,Cardinal*); static void FS_textfieldBackSpaceAction(Widget,XEvent*,String*,Cardinal*); static void FS_textfieldDeleteAction(Widget,XEvent*,String*,Cardinal*); static void FS_listAction(Widget,XEvent*,String*,Cardinal*); static void FS_preferButtonAction(Widget,XEvent*,String*,Cardinal*); static XtActionsRec file_selectionActionsTable[] = { { "FS_textfieldFocusAction", FS_textfieldFocusAction }, { "FS_textfieldBackSpaceAction", FS_textfieldBackSpaceAction }, { "FS_textfieldDeleteAction", FS_textfieldDeleteAction }, { "FS_preferButton", FS_preferButtonAction }, { "List", FS_listAction } }; static String list_translations = "#replace\n\ : List(highlight)\n\ : List(unhighlight)\n\ ~Button2 : List(set) List(scrollon)\n\ ~Button2 : List(scroll)\n\ ~Button2 : List(reset) List(notify) List(scrolloff) List(highlight)\n\ ~Button1 : List(scrollon)\n\ : List(scroll,0,2.0)\n\ ~Button1 : List(page) List(scrolloff) List(highlight)\n\ ~Button1 : List(scrollon)\n\ : List(scroll,0,2.0)\n\ ~Button1 : List(page) List(scrolloff) List(highlight)\n\ : List(highlight)\ "; static String curlist_translations = "#replace\n\ : List(highlight)\n\ : List(unhighlight)\n\ ~Button2 : List(scrollon) List(set)\n\ ~Button2 : List(scroll)\n\ ~Button2 : List(reset) List(notify) List(scrolloff) List(highlight)\n\ ~Button1 : List(scrollon)\n\ : List(scroll,0,2.0)\n\ ~Button1 : List(page) List(scrolloff) List(highlight)\n\ ~Button1 : List(scrollon)\n\ : List(scroll,0,2.0)\n\ ~Button1 : List(page) List(scrolloff) List(highlight)\n\ : List(highlight)\ "; static String TextField_translations = "#override\n\ Down: no-op()\n\ Up: no-op()\n\ Linefeed: no-op()\n\ CtrlJ: no-op()\n\ CtrlM: no-op()\n\ CtrlN: no-op()\n\ CtrlO: no-op()\n\ CtrlP: no-op()\n\ CtrlR: no-op()\n\ CtrlS: no-op()\n\ CtrlV: no-op()\n\ CtrlZ: no-op()\n\ MetaV: no-op()\n\ MetaZ: no-op()\n\ BackSpace: FS_textfieldBackSpaceAction()\n\ Delete: FS_textfieldDeleteAction()\n\ Right: forward-character()\n\ Left: backward-character()\n\ Return: no-op()\n\ Tab: FS_preferButton(next)\n\ : FS_textfieldFocusAction() select-start()\n\ : FS_textfieldFocusAction() extend-start()\ "; #if 0 #define FILE_SELECTION_LAYOUT \ "\ " #endif /*#################################################################### Macros and Definitions ####################################################################*/ /* general Xt Macros */ #ifdef MIN # undef MIN #endif #define MIN(_a_,_b_) (_a_)<(_b_)?(_a_):(_b_) #ifdef MAX # undef MAX #endif #define MAX(_a_,_b_) (_a_)>(_b_)?(_a_):(_b_) #define USE_Arg(num) Arg args[num]; Cardinal argn = 0 #define ADD_Callback(widget,proc) XtAddCallback((Widget)(widget),XtNcallback,(proc),NULL) #define ADD_Callback_Data(widget,proc,data) XtAddCallback((Widget)(widget),XtNcallback,(proc),(data)) #define ADD_Widget(name,class,parent) XtCreateManagedWidget((name),class,(Widget)(parent),NULL,(Cardinal)0) #define ADD_PopupShell(name,class,parent) XtCreatePopupShell((name),class,(Widget)(parent),NULL,(Cardinal)0) #define ADD_Widget_Arg(name,class,parent) XtCreateManagedWidget((name),class,(parent),args,argn) #define RESET_Arg argn=0 #define GOT_Arg (argn) #define SET_Arg(name,value) \ XtSetArg(args[argn],(name),(value)); argn++ #define SET_Values(widget) XtSetValues((widget),args,argn) #define SET_Value(widget,name,value) \ RESET_Arg; \ SET_Arg((name),(value)); \ SET_Values((widget)) #define GET_Values(widget) XtGetValues((Widget)(widget),args,argn) #define GET_Value(widget,name,value) \ RESET_Arg; \ SET_Arg((name),(value)); \ GET_Values((widget)) #define streq(a,b) (strcmp((a),(b))==0) #define resource(name) (appResources->name) #define SCROLL_SCROLLPROC 1 #define SCROLL_JUMPPROC 2 #define SCROLL_CLIPREPORT 3 /* FileSelection specific Macros */ #define FS_WIDGET FileSelectionWidget fs = (FileSelectionWidget) #define FS_FILE_SELECTION fs #define FS_RESCANBUTTON fs->file_selection.rescanbuttonFS #define FS_FILTERSBUTTON fs->file_selection.filtersbuttonFS #define FS_FILTERSMENU fs->file_selection.filtersmenuFS #define FS_DIRSBUTTON fs->file_selection.dirsbuttonFS #define FS_DIRSMENU fs->file_selection.dirsmenuFS #define FS_BUTTON1 fs->file_selection.button1FS #define FS_BUTTON2 fs->file_selection.button2FS #define FS_BUTTON3 fs->file_selection.button3FS #define FS_BUTTON4 fs->file_selection.button4FS #define FS_PATHFRAME fs->file_selection.pathframeFS #define FS_PATH fs->file_selection.pathFS #define FS_FILTERFRAME fs->file_selection.filterframeFS #define FS_FILTER fs->file_selection.filterFS #define FS_OLD_TEXTFIELD fs->file_selection.old_textfieldFS #define FS_TOPSCROLL fs->file_selection.topscrollFS #define FS_TOPFRAME fs->file_selection.topframeFS #define FS_TOPCLIP fs->file_selection.topclipFS #define FS_TOPAAA fs->file_selection.topaaaFS #define FS_TOPLIST fs->file_selection.toplistFS #define FS_CURSCROLL fs->file_selection.curscrollFS #define FS_CURFRAME fs->file_selection.curframeFS #define FS_CURCLIP fs->file_selection.curclipFS #define FS_CURAAA fs->file_selection.curaaaFS #define FS_CURLIST fs->file_selection.curlistFS #define FS_SUBSCROLL fs->file_selection.subscrollFS #define FS_SUBFRAME fs->file_selection.subframeFS #define FS_SUBCLIP fs->file_selection.subclipFS #define FS_SUBAAA fs->file_selection.subaaaFS #define FS_SUBLIST fs->file_selection.sublistFS #define TOPDIR fs->file_selection.topdir #define TOPDIR_ALLOC fs->file_selection.topdir_alloc #define TOPDIR_ENTRIES fs->file_selection.topdir.num_of_entries #define TOPDIR_ENTRY(num) fs->file_selection.topdir.entry[(num)] #define TOPDIR_LIST fs->file_selection.topdir.entry #define CURDIR fs->file_selection.curdir #define CURDIR_ALLOC fs->file_selection.curdir_alloc #define CURDIR_ENTRIES fs->file_selection.curdir.num_of_entries #define CURDIR_ENTRY(num) fs->file_selection.curdir.entry[(num)] #define CURDIR_LIST fs->file_selection.curdir.entry #define SUBDIR fs->file_selection.subdir #define SUBDIR_ALLOC fs->file_selection.subdir_alloc #define SUBDIR_ENTRIES fs->file_selection.subdir.num_of_entries #define SUBDIR_ENTRY(num) fs->file_selection.subdir.entry[(num)] #define SUBDIR_LIST fs->file_selection.subdir.entry #define PATH_RESOURCE fs->file_selection.path #define FILTER_RESOURCE fs->file_selection.filter #define TMP_DIR_RESOURCE fs->file_selection.tmp_dir #define HIGHLIGHT fs->file_selection.highlight_pixel #define OLD_HIGHLIGHT fs->file_selection.old_highlight_pixel #define FILTERS fs->file_selection.filters #define DIRS fs->file_selection.dirs #define PATH fs->file_selection.path_field_value #define FILTER fs->file_selection.filter_field_value #define APP_DIR fs->file_selection.app_dir #define CURRENT_PATH (fs->file_selection.current_path) #define CURRENT_DIR (fs->file_selection.current_dir) #define CURRENT_FILE (fs->file_selection.current_file) #define BUTTONS fs->file_selection.internal_buttons #define BUTTONS_RESOURCE fs->file_selection.buttons #define PREFERRED_BUTTON fs->file_selection.preferred_button #define REVERSE_SCROLLING fs->file_selection.reverse_scrolling #define REALLOC_MORE_IF_NEEDED(list,needed,current) \ if (needed >= current) { \ current *= 2; \ list = (String *) XtRealloc((char *) list,(unsigned)(current*sizeof(String)));\ } #define ALLOC_LIST(list,needed) \ list = (String *) XtMalloc((unsigned)(needed* sizeof(String))) #define POSITION(pos) ((pos==1)+2*(pos==2)+4*(pos==3)+8*(pos==4)) #define IS_BUTTON(pos) (POSITION(pos) & BUTTONS) #define POSITION_TO_BUTTON_NAME(pos,name) sprintf((name),"button%d",(int)(pos)) #define MULTICLICK_INTERVAL ((unsigned long) 400) #define DISABLED ((XtIntervalId) 0) #define MULTICLICK fs->file_selection.multiclick #define ENABLE_MULTICLICK \ MULTICLICK = XtAppAddTimeOut( \ XtWidgetToApplicationContext((Widget)FS_FILE_SELECTION),\ MULTICLICK_INTERVAL, \ MulticlickNotify, \ ((XtPointer)FS_FILE_SELECTION) \ ) #define DESTROY_MULTICLICK \ if (MULTICLICK) { \ XtRemoveTimeOut(MULTICLICK); \ MULTICLICK = DISABLED; \ } #define offset(field) XtOffsetOf(FileSelectionRec, file_selection.field) #define lay_offset(field) XtOffsetOf(FileSelectionRec, aaa.field) static XtResource resources[] = { {XtNpath,XtCPath,XtRString,sizeof(String),offset(path),XtRImmediate,(XtPointer)""}, {XtNtmpDir,XtCTmpDir,XtRString,sizeof(String),offset(tmp_dir),XtRImmediate,(XtPointer)""}, {XtNfilter,XtCFilter,XtRString,sizeof(String),offset(filter),XtRImmediate,(XtPointer)""}, {XtNfilters,XtCFilters,XtRString,sizeof(String),offset(filters),XtRImmediate,(XtPointer)"None\nno .*"}, {XtNdirs,XtCDirs,XtRString,sizeof(String),offset(dirs),XtRImmediate,(XtPointer)"Home\nTmp"}, {XtNbuttons,XtCButtons,XtRInt,sizeof(int),offset(buttons),XtRImmediate,(XtPointer)0}, {XtNpreferredButton,XtCPreferredButton,XtRInt,sizeof(int),offset(preferred_button),XtRImmediate,(XtPointer)0}, {XtNhighlightPixel, XtCHighlightPixel, XtRPixel, sizeof(Pixel),offset(highlight_pixel), XtRImmediate, (XtPointer)NULL}, {XtNreverseScrolling, XtCReverseScrolling, XtRBoolean, sizeof(Boolean),offset(reverse_scrolling), XtRImmediate, (XtPointer)False}, #if 0 {XtNlayout, XtCLayout, XtRLayout, sizeof(BoxPtr),lay_offset(layout),XtRString,FILE_SELECTION_LAYOUT}, #endif {XtNlayout, XtCLayout, XtRLayout, sizeof(BoxPtr),lay_offset(layout),XtRLayout,NULL}, {XtNresizeWidth, XtCBoolean, XtRBoolean, sizeof(Boolean),lay_offset(resize_width),XtRImmediate,(XtPointer)True}, {XtNresizeHeight, XtCBoolean, XtRBoolean, sizeof(Boolean),lay_offset(resize_height),XtRImmediate,(XtPointer)False}, }; #undef offset #undef lay_offset static Boolean SetValues(Widget,Widget,Widget,ArgList,Cardinal*); static void ClassInitialize(void); static void Initialize(Widget,Widget,ArgList,Cardinal*); static void Realize(Widget,XtValueMask*,XSetWindowAttributes*); static void Destroy(Widget); static void filtersProc(Widget,XtPointer,XtPointer); static void dirsProc(Widget,XtPointer,XtPointer); static void rescanProc(Widget,XtPointer,XtPointer); static void TopDirSelectionProc(Widget,XtPointer,XtPointer); static void CurDirSelectionProc(Widget,XtPointer,XtPointer); static void SubDirSelectionProc(Widget,XtPointer,XtPointer); static void changeLists(FileSelectionWidget); static Widget BuildMenu(Widget,String,String,XtCallbackProc); static void SetDirectoryView(FileSelectionWidget,char*); static void CreateTextField(Widget*,Widget*,char*,XtTranslations,String,Widget); static void SetPreferredButton(Widget,int,int); static void CreateList(Widget*,Widget*,Widget*,Widget*,Widget*,XtTranslations,String,Widget); FileSelectionClassRec file_selectionClassRec = { { /* core class fields */ /* superclass */ (WidgetClass) (&aaaClassRec), /* class name */ "FileSelection", /* size */ sizeof(FileSelectionRec), /* class_initialize */ ClassInitialize, /* class_part init */ NULL, /* class_inited */ FALSE, /* initialize */ Initialize, /* initialize_hook */ NULL, /* realize */ Realize, /* actions */ file_selectionActionsTable, /* num_actions */ XtNumber(file_selectionActionsTable), /* resources */ resources, /* resource_count */ XtNumber(resources), /* xrm_class */ NULLQUARK, /* compress_motion */ 0, /* compress_exposure */ 0, /* compress_enterleave*/ 0, /* visible_interest */ FALSE, /* destroy */ Destroy, /* resize */ XtInheritResize, /* expose */ NULL, /* set_values */ SetValues, /* set_values_hook */ NULL, /* set_values_almost */ XtInheritSetValuesAlmost, /* get_values_hook */ NULL, /* accept_focus */ NULL, /* version */ XtVersion, /* callback_private */ NULL, /* tm_table */ NULL, /* query_geometry */ XtInheritQueryGeometry, /* display_accelerator*/ XtInheritDisplayAccelerator, /* extension */ NULL }, { /* composite class fields */ /* geometry_manager */ XtInheritGeometryManager, /* change_managed */ XtInheritChangeManaged, /* insert_child */ XtInheritInsertChild, /* delete_child */ XtInheritDeleteChild, /* extension */ NULL }, { /* constraint class fields */ /* subresources */ NULL, /* subresource_count */ 0, /* constraint_size */ sizeof(FileSelectionConstraintsRec), /* initialize */ NULL, /* destroy */ NULL, /* set_values */ NULL, /* extension */ NULL }, { /* aaa class fields */ /* foo */ 0 }, { /* file selection class fields */ /* empty */ 0 } }; WidgetClass file_selectionWidgetClass = (WidgetClass) &file_selectionClassRec; /*------------------------------------------------------------------------------- ClassInitialize -------------------------------------------------------------------------------*/ static void ClassInitialize(void) { BEGINMESSAGE(ClassInitialize) XawInitializeWidgetSet(); ENDMESSAGE(ClassInitialize) } /*------------------------------------------------------------------------------- Initialize -------------------------------------------------------------------------------*/ static void Initialize(Widget request _GL_UNUSED, Widget new, ArgList argl _GL_UNUSED, Cardinal *num_argl _GL_UNUSED) { FS_WIDGET new; BEGINMESSAGE(Initialize) { char app_dir[FS_MAXNAMLEN]; getwd(app_dir); APP_DIR = XtNewString(app_dir); } FS_RESCANBUTTON = ADD_Widget("rescan",buttonWidgetClass,new); ADD_Callback(FS_RESCANBUTTON,rescanProc); FILTERS=XtNewString(FILTERS); FS_FILTERSBUTTON = ADD_Widget("filters",mbuttonWidgetClass,new); FS_FILTERSMENU = BuildMenu(FS_FILTERSBUTTON,FILTERS,"None",filtersProc); DIRS=XtNewString(DIRS); FS_DIRSBUTTON = ADD_Widget("dirs",mbuttonWidgetClass,new); FS_DIRSMENU = BuildMenu(FS_DIRSBUTTON,DIRS,"Home\nTmp",dirsProc); BUTTONS = 0; IMESSAGE(BUTTONS_RESOURCE) if ((BUTTONS_RESOURCE > 0) && (BUTTONS_RESOURCE<5)) { if (BUTTONS_RESOURCE > 0) { FS_BUTTON1 = ADD_Widget("button1",buttonWidgetClass,new); BUTTONS += 1; } if (BUTTONS_RESOURCE > 1) { FS_BUTTON2 = ADD_Widget("button2",buttonWidgetClass,new); BUTTONS += 2; } if (BUTTONS_RESOURCE > 2) { FS_BUTTON3 = ADD_Widget("button3",buttonWidgetClass,new); BUTTONS += 4; } if (BUTTONS_RESOURCE > 3) { FS_BUTTON4 = ADD_Widget("button4",buttonWidgetClass,new); BUTTONS += 8; } IMESSAGE(BUTTONS) } { XtTranslations text_trans; String value; text_trans=XtParseTranslationTable(TextField_translations); value=PATH_RESOURCE ? PATH_RESOURCE : APP_DIR; CreateTextField(&FS_PATHFRAME, &FS_PATH, value,text_trans,"path", new); value=FILTER_RESOURCE; CreateTextField(&FS_FILTERFRAME,&FS_FILTER,value,text_trans,"filter",new); } if (BUTTONS_RESOURCE > 0 && BUTTONS_RESOURCE < 5 ) { XtInstallAccelerators(FS_PATH,FS_BUTTON1); XtInstallAccelerators(FS_FILTER,FS_BUTTON1); if (BUTTONS_RESOURCE > 1) { XtInstallAccelerators(FS_PATH,FS_BUTTON2); XtInstallAccelerators(FS_FILTER,FS_BUTTON2); } if (BUTTONS_RESOURCE > 2) { XtInstallAccelerators(FS_PATH,FS_BUTTON3); XtInstallAccelerators(FS_FILTER,FS_BUTTON3); } if (BUTTONS_RESOURCE > 3) { XtInstallAccelerators(FS_PATH,FS_BUTTON4); XtInstallAccelerators(FS_FILTER,FS_BUTTON4); } } SetPreferredButton(new,PREFERRED_BUTTON,TRUE); { XtTranslations list_trans; list_trans=XtParseTranslationTable(list_translations); CreateList(NULL, &FS_TOPFRAME,&FS_TOPCLIP,&FS_TOPAAA,&FS_TOPLIST,list_trans,"top",new); CreateList(&FS_SUBSCROLL,&FS_SUBFRAME,&FS_SUBCLIP,&FS_SUBAAA,&FS_SUBLIST,list_trans,"sub",new); list_trans=XtParseTranslationTable(curlist_translations); CreateList(&FS_CURSCROLL,&FS_CURFRAME,&FS_CURCLIP,&FS_CURAAA,&FS_CURLIST,list_trans,"cur",new); } TOPDIR_ALLOC = 20; TOPDIR_ENTRIES = 0; ALLOC_LIST(TOPDIR_LIST,TOPDIR_ALLOC); TOPDIR_ENTRY(0) = NULL; CURDIR_ALLOC = 100; CURDIR_ENTRIES = 0; ALLOC_LIST(CURDIR_LIST,CURDIR_ALLOC); CURDIR_ENTRY(0) = NULL; SUBDIR_ALLOC = 20; SUBDIR_ENTRIES = 0; ALLOC_LIST(SUBDIR_LIST,SUBDIR_ALLOC); SUBDIR_ENTRY(0) = NULL; FS_OLD_TEXTFIELD = (Widget)NULL; CURRENT_PATH = XtMalloc(FS_MAXNAMLEN*sizeof(char)); CURRENT_DIR = XtMalloc(FS_MAXNAMLEN*sizeof(char)); CURRENT_FILE = XtMalloc(FS_MAXNAMLEN*sizeof(char)); PATH = XtNewString(""); FILTER = XtNewString(""); MULTICLICK = DISABLED; XtCallActionProc(FS_PATH,"FS_textfieldFocusAction",(XEvent *)NULL,(String *)NULL,(Cardinal)0); XtCallActionProc(FS_FILTER,"FS_textfieldFocusAction",(XEvent *)NULL,(String *)NULL,(Cardinal)0); ENDMESSAGE(Initialize) } /*------------------------------------------------------------------------------- Realize -------------------------------------------------------------------------------*/ static void Realize (Widget w, XtValueMask *valueMask, XSetWindowAttributes *attrs) { FS_WIDGET w; BEGINMESSAGE(Realize) (*file_selectionWidgetClass->core_class.superclass->core_class.realize)(w, valueMask, attrs); changeLists((FileSelectionWidget)w); FS_textfieldFocusAction(FS_PATH, NULL, NULL, NULL); ENDMESSAGE(Realize) } /*------------------------------------------------------------------------------- SetValues -------------------------------------------------------------------------------*/ static Boolean SetValues(Widget current, Widget request _GL_UNUSED, Widget new, ArgList in_args _GL_UNUSED, Cardinal *in_num_args _GL_UNUSED) { FS_WIDGET new; FileSelectionWidget cfs = (FileSelectionWidget)current; USE_Arg(5); BEGINMESSAGE(SetValues) if (PATH_RESOURCE != cfs->file_selection.path) { if (PATH_RESOURCE) { SET_Value(FS_PATH,XtNstring,PATH_RESOURCE); } else { SET_Value(FS_PATH,XtNstring,APP_DIR); } INFMESSAGE(changing Path Selection Field) } if (FILTER_RESOURCE != cfs->file_selection.filter) { SET_Value(FS_FILTER,XtNstring,FILTER_RESOURCE); INFMESSAGE(changing Filter Field) } if (PREFERRED_BUTTON != cfs->file_selection.preferred_button) { SetPreferredButton(new,cfs->file_selection.preferred_button,FALSE); SetPreferredButton(new,PREFERRED_BUTTON,TRUE); INFMESSAGE(switched Accelerators) } if (FILTERS != cfs->file_selection.filters) { XtFree(cfs->file_selection.filters); FILTERS=XtNewString(FILTERS); XtDestroyWidget(FS_FILTERSMENU); FS_FILTERSMENU=BuildMenu(FS_FILTERSBUTTON,FILTERS,"None",filtersProc); INFMESSAGE(switched available filters) } if (DIRS != cfs->file_selection.dirs) { XtFree(cfs->file_selection.dirs); DIRS=XtNewString(DIRS); XtDestroyWidget(FS_DIRSMENU); FS_DIRSMENU=BuildMenu(FS_DIRSBUTTON,DIRS,"Home\nTmp",dirsProc); INFMESSAGE(switched available dirs) } ENDMESSAGE(SetValues) return False; } /*------------------------------------------------------------------------------- Destroy -------------------------------------------------------------------------------*/ static void Destroy(Widget w) { FS_WIDGET w; BEGINMESSAGE(Destroy) while ((--TOPDIR_ENTRIES) >=0 ) XtFree(TOPDIR_ENTRY(TOPDIR_ENTRIES)); ++TOPDIR_ENTRIES; while ((--CURDIR_ENTRIES) >=0 ) XtFree(CURDIR_ENTRY(CURDIR_ENTRIES)); ++CURDIR_ENTRIES; while ((--SUBDIR_ENTRIES) >=0 ) XtFree(SUBDIR_ENTRY(SUBDIR_ENTRIES)); ++SUBDIR_ENTRIES; XtFree((XtPointer)TOPDIR_LIST); XtFree((XtPointer)CURDIR_LIST); XtFree((XtPointer)SUBDIR_LIST); XtFree(PATH); XtFree(FILTER); XtFree(CURRENT_PATH); XtFree(CURRENT_DIR); XtFree(CURRENT_FILE); XtFree(APP_DIR); XtFree(FILTERS); XtFree(DIRS); DESTROY_MULTICLICK; ENDMESSAGE(Destroy) } /*------------------------------------------------------------------------------- strwild -------------------------------------------------------------------------------*/ static Boolean strwild(char *string, char *wild) { char *cwild; int nwild; int wildlen; char *colon,*stringori; Boolean match,match_total=FALSE,exclude=FALSE; INFMESSAGE1(executing strwild) if (!string) return(FALSE); if (!wild) return(TRUE); stringori=string; while (wild) { match = TRUE; nwild=0; colon=strchr(wild,','); if (colon) *colon = '\0'; if (*wild == '!') { exclude=TRUE; wild++; } if (*wild=='\0') { match=True; } else { strcpy((cwild=malloc(strlen(wild)+1)),wild); wild = cwild; while ((wild=strchr(wild,'*'))) { ++nwild; *wild++ = '\0'; } wild=cwild; wildlen=strlen(wild); if ((wildlen) && ((strncmp(string,wild,wildlen)) || ((!nwild) && (*(string += wildlen))))) { match=FALSE; } else { wild += (wildlen+1); while (nwild) { wildlen=strlen(wild); if ((wildlen) && ((!(string = strstr(string,wild))) || ((nwild==1) && (*(string += wildlen))))) { match=FALSE; break; } else { wild += (wildlen+1); --nwild; } } } free(cwild); } if (colon) { wild = colon +1; *colon = ','; } else wild = NULL; string=stringori; if (match==TRUE) { if (!exclude) match_total=TRUE; else return(FALSE); } } return(match_total); } /*------------------------------------------------------------------------------- strreplace -------------------------------------------------------------------------------*/ static void strreplace(char *out, char *find, char *replace, char *in) { int locat = 0; int findlength; char *intemp; char *temp; INFMESSAGE1(executing strreplace) findlength = strlen(find); if (!(*in) || !(*find)) return; intemp = XtMalloc(strlen(in)+1); strcpy(intemp,in); temp=intemp; while ((temp=strstr(temp,find))) { *temp='\0'; temp += findlength; ++locat; } temp=intemp; *out = '\0'; while ((locat--) > 0) { strcat(out,temp); strcat(out,replace); temp = strchr(temp,'\0') + findlength; } strcat(out,temp); XtFree(intemp); } /*---------------------------------------------------------------------- appendDirEndSeparator ----------------------------------------------------------------------*/ static void appendDirEndSeparator(char *path) { size_t l=0; BEGINMESSAGE(appendDirEndSeparator) INFSMESSAGE(old:,path) if (path) l=strlen(path); if (l && l<=(FS_MAXNAMLEN-2) && path[l-1] != '/') strcat(path,"/"); INFSMESSAGE(new:,path); ENDMESSAGE(appendDirEndSeparator) } /*---------------------------------------------------------------------- savestrcpy ----------------------------------------------------------------------*/ static void savestrcpy(char *dest, char *source) { BEGINMESSAGE(savestrcpy) strncpy(dest,source,FS_MAXNAMLEN-1); dest[FS_MAXNAMLEN-1]='\0'; ENDMESSAGE(savestrcpy) } /*---------------------------------------------------------------------- setText ----------------------------------------------------------------------*/ static void setText(Widget w, String line) { USE_Arg(1); BEGINMESSAGE(setText) if (!line) line=""; SET_Value(w,XtNstring,line); SET_Value(w,XtNinsertPosition,strlen(line)); ENDMESSAGE(setText) } /*---------------------------------------------------------------------- savestrcat ----------------------------------------------------------------------*/ static void savestrcat(char *dest, char *source) { size_t ld,ls; char *s; BEGINMESSAGE(savestrcat) ld = strlen(dest); ls = strlen(source); s = dest + ld; strncpy(s,source,FS_MAXNAMLEN-1-ld); dest[FS_MAXNAMLEN-1]='\0'; ENDMESSAGE(savestrcat) } /*------------------------------------------------------------------------------- translateTildeInPath -------------------------------------------------------------------------------*/ static void translateTildeInPath(char *path) { char *pos; BEGINMESSAGE(translateTildeInPath) INFSMESSAGE(old,path) if (path && (pos=strchr(path,'~'))) { char *home; char tmp[FS_MAXNAMLEN]; home=getenv("HOME"); if (home) { *pos='\0'; pos++; savestrcpy(tmp,path); savestrcat(tmp,home); savestrcat(tmp,pos); savestrcpy(path,tmp); } } INFSMESSAGE(new,path) ENDMESSAGE(translateTildeInPath) } /*------------------------------------------------------------------------------- FScompareEntries -------------------------------------------------------------------------------*/ static int FScompareEntries(const void *a, const void *b) { String *p = (String*) a; String *q = (String*) b; return strcmp(*p,*q); } /*------------------------------------------------------------------------------- SetPreferredButton -------------------------------------------------------------------------------*/ static void preferButton(Widget w, int prefer) { BEGINMESSAGE(preferButton) if (w) { if (prefer) ButtonHighlight(w,NULL,NULL,NULL); else ButtonReset(w,NULL,NULL,NULL); } ENDMESSAGE(preferButton) } static void SetPreferredButton(Widget w, int position, int install) { FS_WIDGET w; char name[10]; Widget button; BEGINMESSAGE(SetPreferredButton) IMESSAGE(position) if (IS_BUTTON(position)) { POSITION_TO_BUTTON_NAME(position,name); button = XtNameToWidget((Widget)FS_FILE_SELECTION,name); if (!install) { preferButton(button,0); if (PREFERRED_BUTTON==position) PREFERRED_BUTTON=0; } else { XtInstallAccelerators(FS_PATH,button); XtInstallAccelerators(FS_FILTER,button); preferButton(button,1); PREFERRED_BUTTON=position; } IMESSAGE(PREFERRED_BUTTON) } ENDMESSAGE(SetPreferredButton) } /*------------------------------------------------------------------------------- FS_preferButtonAction -------------------------------------------------------------------------------*/ static void FS_preferButtonAction(Widget w, XEvent *event _GL_UNUSED, String *params, Cardinal *nparams) { FileSelectionWidget FS_FILE_SELECTION; BEGINMESSAGE(FS_preferButtonAction) if (!w || !params || !nparams || !(*nparams)) { INFMESSAGE(illegal call) ENDMESSAGE(FS_preferButtonAction) return; } while (w && XtClass(w) != file_selectionWidgetClass) w = XtParent(w); if (!w) { INFMESSAGE(could not find file selection widget) ENDMESSAGE(FS_preferButtonAction) return; } FS_FILE_SELECTION = (FileSelectionWidget)w; if (streq(params[0],"next")) { int old,new; INFMESSAGE(next) new=old=PREFERRED_BUTTON; INFIMESSAGE(old preferred button:,old) do { ++new; if (new>4) new=1; } while (new!=old && !IS_BUTTON(new)); if (new != old) { SetPreferredButton(w,old,FALSE); SetPreferredButton(w,new,TRUE); } INFIMESSAGE(new preferred button:,new) } ENDMESSAGE(FS_preferButtonAction) } /*------------------------------------------------------------------------------- FS_listAction -------------------------------------------------------------------------------*/ static void FS_listAction(Widget w, XEvent *event, String *params, Cardinal *nparams) { # define HISTORY_POINTS 10 # define DECAY_TIME 200 static int firstposx,posx[HISTORY_POINTS+1],posix; static int firstposy,posy[HISTORY_POINTS+1],posiy; static int childx,childy,childw,childh,clipw,cliph,childyp; static int moving=0,scrolling=0; static int startvisible=0; static Time to; Widget child; Widget clip; Widget list; int entry; FileSelectionWidget FS_FILE_SELECTION; BEGINMESSAGE(FS_listAction) if (!w || !event || !params || !nparams || !(*nparams)) { INFMESSAGE(illegal call) ENDMESSAGE(FS_listAction) return; } if (XtClass(w) != vlistWidgetClass) { INFMESSAGE(caller is not a list widget) ENDMESSAGE(FS_listAction) return; } list = w; child = XtParent(list); clip = XtParent(child); FS_FILE_SELECTION = (FileSelectionWidget) XtParent(XtParent(clip)); if (streq(params[0],"set")) { INFMESSAGE(set) if (!scrolling) { entry = VlistEntryOfPosition(list,(int)event->xbutton.y); if (entry >=0 && entry < VlistEntries(list)) VlistChangeSelected(list,entry,XawVlistSet); } } else if (streq(params[0],"unset")) { entry = VlistSelected(list); INFMESSAGE(unset) VlistChangeSelected(list,entry,XawVlistUnset); } else if (!strcmp(params[0],"highlight")) { #if 0 { Window root, child; int dummyx, dummyy; unsigned int dummymask; int winx,winy; INFMESSAGE(highlight) XQueryPointer(XtDisplay(list), XtWindow(list), &root, &child, &dummyx, &dummyy, &winx, &winy, &dummymask); entry = VlistEntryOfPosition(list,winy); if (VlistSelected(list) == -1 && entry != VlistHighlighted(list)) VlistChangeHighlighted(list,entry,XawVlistSet); } #endif entry = VlistEntryOfPosition(list,(int)event->xbutton.y); if (VlistSelected(list) == -1 && entry != VlistHighlighted(list)) VlistChangeHighlighted(list,entry,XawVlistSet); } else if (!strcmp(params[0],"unhighlight")) { entry = VlistHighlighted(list); INFMESSAGE(unhighlight) VlistChangeHighlighted(list,entry,XawVlistUnset); } else if (!strcmp(params[0],"reset")) { entry = VlistHighlighted(list); INFMESSAGE(reset) VlistChangeHighlighted(list,entry,XawVlistUnset); entry = VlistSelected(list); VlistChangeSelected(list,entry,XawVlistUnset); } else if (streq(params[0],"notify")) { INFMESSAGE(notify) if (!scrolling) { int e = VlistEntryOfPosition(list,(int)event->xbutton.y); if (e >=0 && e < VlistEntries(list)) { if (list == FS_CURLIST) CurDirSelectionProc(list,NULL,(XtPointer)(intptr_t)e); else if (list == FS_SUBLIST) SubDirSelectionProc(list,NULL,(XtPointer)(intptr_t)e); else if (list == FS_TOPLIST) TopDirSelectionProc(list,NULL,(XtPointer)(intptr_t)e); } } } else if (streq(params[0],"scrollon")) { INFMESSAGE(start-move) if (event->type != ButtonPress) goto break_scrolling; moving = 1; scrolling = 0; posix=posiy=0; firstposx = posx[0] = (int) event->xbutton.x_root; firstposy = posy[0] = (int) event->xbutton.y_root; to = ((XMotionEvent*)event)->time; startvisible = VlistGetFirstVisible(list); childyp = 0; } else if (streq(params[0],"scroll")) { if (event->type != MotionNotify) goto break_scrolling; childx = (int) child->core.x; childy = (int) child->core.y; childw = (int) child->core.width; childh = (int) child->core.height; clipw = (int) clip->core.width; cliph = (int) clip->core.height; if ((abs((int) event->xbutton.x_root-firstposx)>1) || (abs((int) event->xbutton.y_root-firstposy)>1)) scrolling = 1; IIMESSAGE1(childx,childy) IIMESSAGE1(childw,childh) IIMESSAGE1(clipw,cliph) INFMESSAGE(move) if (moving && clipw && cliph) { int x,y; int dx,dy; double relfactor=1.0; /* some default value */ double absfactor=0.0; /* some default value */ x = (int) event->xbutton.x_root; y = (int) event->xbutton.y_root; if ((((XMotionEvent*)event)->time - to) > DECAY_TIME) { if (posix>0) { posx[0]=posx[posix]; posix=0; } if (posiy>0) { posy[0]=posy[posiy]; posiy=0; } } if (posix>0 && (x-posx[posix])*(posx[posix]-posx[posix-1]) < 0) { posx[0]=posx[posix]; posix=0; } if (posiy>0 && (y-posy[posiy])*(posy[posiy]-posy[posiy-1]) < 0) { posy[0]=posy[posiy]; posiy=0; } to = ((XMotionEvent*)event)->time; ++posix; ++posiy; if (posix>HISTORY_POINTS) { posix=1; while (posix<=HISTORY_POINTS) { posx[posix-1]=posx[posix]; posix++; } posix=HISTORY_POINTS; } posx[posix] = x; if (posiy>HISTORY_POINTS) { posiy=1; while (posiy<=HISTORY_POINTS) { posy[posiy-1]=posy[posiy]; posiy++; } posiy=HISTORY_POINTS; } posy[posiy] = y; dx = (x - posx[0])/(posix); dy = (y - posy[0])/(posiy); #if 0 printf("time=%d x=%d y=%d dx=%d dy=%d\n",(int)to,x,y,dx,dy); printf("posix=%d posx[posix]=%d posx[0]=%d\n",posix,posx[posix],posx[0]); printf("posiy=%d posy[posiy]=%d posy[0]=%d\n",posiy,posy[posiy],posy[0]); #endif if (dx || dy) { if (*nparams>=2) relfactor = atof((char*)(params[1])); relfactor = relfactor >= 0 ? (relfactor<=100 ? relfactor : 100) : 0; if (*nparams>=3) absfactor = atof((char*)(params[2])); absfactor = absfactor >= 0 ? (absfactor<=200 ? absfactor : 200) : 0; DDMESSAGE1(absfactor,relfactor) if (REVERSE_SCROLLING) { dx = -dx; } else { dy = -dy; } childx = (int) (childx-(dx*absfactor)-(relfactor*childw*dx)/clipw); childy = (int) (childy-(dy*absfactor)-(relfactor*childh*dy)/cliph); ClipWidgetSetCoordinates(clip,childx,0); if (childy != childyp) { childyp=childy; startvisible = VlistGetFirstVisible(list); VlistMoveFirstVisible(list, startvisible, childy); } childx = (int) child->core.x; childy = (int) child->core.y; childw = (int) child->core.width; childh = (int) child->core.height; clipw = (int) clip->core.width; cliph = (int) clip->core.height; } } } else if (streq(params[0],"scrolloff")) { break_scrolling: INFMESSAGE(stop-move) moving = 0; scrolling = 0; } else if (streq(params[0],"page") && !scrolling) { int x,y,sx,sy,pw,ph; Position midx,midy; INFMESSAGE(page) x = (int) event->xbutton.x_root; y = (int) event->xbutton.y_root; sx = (int) child->core.x; sy = (int) child->core.y; pw = (int) clip->core.width; ph = (int) clip->core.height; XtTranslateCoords(clip,0,((Position)ph/2),&midx,&midy); if (y=0 ) XtFree(CURDIR_ENTRY(CURDIR_ENTRIES)); ++CURDIR_ENTRIES; CURDIR_ENTRY(CURDIR_ENTRIES) = (String) NULL; if (error) error = 1; else if (!(dirp=opendir("."))) error=2; if (error) { INFIMESSAGE(cannot analyze directory,error) changeLists(FS_FILE_SELECTION); if (error==1) SetIncompleteDirectoryView(fs,unknownList); else SetIncompleteDirectoryView(fs,cannotopenList); chdir(APP_DIR); ENDMESSAGE(SetDirectoryView) return; } while ((--TOPDIR_ENTRIES) >=0 ) XtFree(TOPDIR_ENTRY(TOPDIR_ENTRIES)); ++TOPDIR_ENTRIES; TOPDIR_ENTRY(TOPDIR_ENTRIES) = (String) NULL; while ((--SUBDIR_ENTRIES) >=0 ) XtFree(SUBDIR_ENTRY(SUBDIR_ENTRIES)); ++SUBDIR_ENTRIES; SUBDIR_ENTRY(SUBDIR_ENTRIES) = (String) NULL; setText(FS_PATH,CURRENT_PATH); GET_Value(FS_FILTER,XtNstring,&filter); { char *tmp,*f; f = filter; malloced_filter = tmp = (char*) XtMalloc((strlen(filter)+10)*sizeof(char)); if (*f=='n') *tmp++=' '; while (*f) { if (isspace(*f)) { *tmp++ = ' '; f++; while (isspace(*f)) f++; } else { *tmp++ = *f; f++; } } *tmp = '\0'; tmp = malloced_filter; strreplace(tmp," no ",",!",tmp); strreplace(tmp," ",",",tmp); filter = malloced_filter; } SMESSAGE(filter) if (streq(filter,"")) viewmode = XawFileSelectionRescan; else viewmode = XawFileSelectionFilter; accepted = TRUE; while ((dp = readdir(dirp))) { str = dp->d_name; if (strcmp(str,".")) { if (!stat(str,&sbuf) && S_ISDIR(sbuf.st_mode) && (strncmp(str, ".", 1) || !strcmp(str, ".."))) { REALLOC_MORE_IF_NEEDED(SUBDIR_LIST,SUBDIR_ENTRIES+1,SUBDIR_ALLOC); SUBDIR_ENTRY(SUBDIR_ENTRIES) = XtNewString(str); SMESSAGE(SUBDIR_ENTRY(SUBDIR_ENTRIES)) SUBDIR_ENTRIES++; } else { if (viewmode==XawFileSelectionFilter) accepted=strwild(str,filter); if (accepted) { REALLOC_MORE_IF_NEEDED(CURDIR_LIST,CURDIR_ENTRIES+1,CURDIR_ALLOC); CURDIR_ENTRY(CURDIR_ENTRIES) = XtNewString(str); SMESSAGE(CURDIR_ENTRY(CURDIR_ENTRIES)) CURDIR_ENTRIES++; } # ifdef MESSAGES else { INFMESSAGE(list entry not accepted by viewmode) } # endif } } } IMESSAGE(CURDIR_ENTRIES) if (!CURDIR_ENTRIES) { CURDIR_ENTRY(CURDIR_ENTRIES) = (String) NULL; INFMESSAGE(no entries in this direcory) } else qsort( CURDIR_LIST, CURDIR_ENTRIES, sizeof(char *), FScompareEntries); IMESSAGE(SUBDIR_ENTRIES) if (!SUBDIR_ENTRIES) { SUBDIR_ENTRY(SUBDIR_ENTRIES) = (String) NULL; INFMESSAGE(no subdirectories) } else qsort( SUBDIR_LIST, SUBDIR_ENTRIES, sizeof(char *), FScompareEntries); closedir(dirp); { { char *p=path; savestrcpy(path,CURRENT_DIR); REALLOC_MORE_IF_NEEDED(TOPDIR_LIST,TOPDIR_ENTRIES+1,TOPDIR_ALLOC); TOPDIR_ENTRY(TOPDIR_ENTRIES) = XtNewString("/"); SMESSAGE(TOPDIR_ENTRY(TOPDIR_ENTRIES)) TOPDIR_ENTRIES++; SMESSAGE(p) savestrcat(path,"/"); if (*p=='/') p++; temp=p; while ((*temp != '/') && (p=strchr(p,'/'))) { *p = '\0'; p++; REALLOC_MORE_IF_NEEDED(TOPDIR_LIST,TOPDIR_ENTRIES+1,TOPDIR_ALLOC); TOPDIR_ENTRY(TOPDIR_ENTRIES) = XtNewString(temp); SMESSAGE(TOPDIR_ENTRY(TOPDIR_ENTRIES)) TOPDIR_ENTRIES++; temp=p; } } IMESSAGE1(TOPDIR_ENTRIES) if (!TOPDIR_ENTRIES) { TOPDIR_ENTRY(TOPDIR_ENTRIES) = (String) NULL; INFMESSAGE1(no topdirectories) } } XtFree(malloced_filter); changeLists(FS_FILE_SELECTION); chdir(APP_DIR); ENDMESSAGE(SetDirectoryView) return; } /*------------------------------------------------------------------------------- rescanProc callback for the rescan button -------------------------------------------------------------------------------*/ static void rescanProc(Widget w, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { FS_WIDGET XtParent(w); BEGINMESSAGE(rescanProc) SetDirectoryView(FS_FILE_SELECTION,NULL); ENDMESSAGE(rescanProc) } /*------------------------------------------------------------------------------- filtersProc callback for the filter menu entries -------------------------------------------------------------------------------*/ static void filtersProc(Widget w, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { FS_WIDGET XtParent(XtParent(XtParent(w))); Arg args[2]; Cardinal n; String label; BEGINMESSAGE(filtersProc) n=0; XtSetArg(args[n], XtNlabel, &label); n++; XtGetValues(w, args, n); if (!strcmp(label,"None")) label=""; n=0; XtSetArg(args[n], XtNstring, label); n++; XtSetValues(FS_FILTER, args, n); SetDirectoryView(FS_FILE_SELECTION,NULL); ENDMESSAGE(filtersProc) } /*------------------------------------------------------------------------------- dirsProc callback for the dirs menu entries -------------------------------------------------------------------------------*/ static void dirsProc(Widget w, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { FS_WIDGET XtParent(XtParent(XtParent(w))); USE_Arg(2); String newpath; BEGINMESSAGE(dirsProc) GET_Value(w,XtNlabel,&newpath); if (!strcmp(newpath,"Home")) { newpath = HOME; } else if (!strcmp(newpath,"Tmp")) { if (TMP_DIR_RESOURCE) newpath = TMP_DIR_RESOURCE; else newpath = HOME; } SetDirectoryView(FS_FILE_SELECTION,newpath); ClipWidgetSetCoordinates(FS_CURCLIP, 0, 0); ENDMESSAGE(dirsProc) } /*---------------------------------------------------------------------- TopDirSelectionProc callback for topdirectory list ----------------------------------------------------------------------*/ static void TopDirSelectionProc(Widget w, XtPointer client_data _GL_UNUSED, XtPointer call_data) { FS_WIDGET XtParent(XtParent(XtParent(XtParent(w)))); int item = (int)(intptr_t)call_data; char newpath[FS_MAXNAMLEN]; BEGINMESSAGE(TopDirSelectionProc) if (item >= 0) { #if 0 if (chdir(CURRENT_DIR)) { INFMESSAGE(unable to switch to current directory) ENDMESSAGE(TopDirSelectionProc) return; } #endif savestrcpy(newpath,CURRENT_DIR); CHANGE_TO_HEAD_OF_DIR_SPEC(newpath); savestrcat(newpath,DIR_SPECIFICATION_START_STRING); { int i = -1; while (++i <= item) { if (strcmp(TOPDIR_ENTRY(i),"/")) { savestrcat(newpath,TOPDIR_ENTRY(i)); if (i= 0) { char *path=""; char tmp[FS_MAXNAMLEN]; size_t l; if ((l=strlen(CURRENT_DIR)) + strlen(CURDIR_ENTRY(item)) <= FS_MAXNAMLEN-2) { savestrcpy(tmp,CURRENT_DIR); appendDirEndSeparator(tmp); savestrcat(tmp,CURDIR_ENTRY(item)); path=tmp; } setText(FS_PATH,path); if (MULTICLICK) { DESTROY_MULTICLICK; if (IS_BUTTON(PREFERRED_BUTTON)) { POSITION_TO_BUTTON_NAME(PREFERRED_BUTTON,name); XtCallCallbacks(XtNameToWidget((Widget)FS_FILE_SELECTION,name),XtNcallback,call_data); } } else ENABLE_MULTICLICK; } ENDMESSAGE(CurDirSelectionProc) } /*------------------------------------------------------------------------------- SubDirSelectionProc callback for subdirectory list -------------------------------------------------------------------------------*/ static void SubDirSelectionProc(Widget w, XtPointer client_data _GL_UNUSED, XtPointer call_data) { int item = (int)(intptr_t) call_data; FS_WIDGET XtParent(XtParent(XtParent(XtParent(w)))); char newpath[FS_MAXNAMLEN]; BEGINMESSAGE(SubDirSelectionProc) if (item >= 0) { if (!(strcmp((String)SUBDIR_ENTRY(item),".."))) { if (chdir(CURRENT_DIR)) { INFMESSAGE(unable to switch to current directory) ENDMESSAGE(TopDirSelectionProc) return; } if (chdir(ONE_STEP_UP)) { INFMESSAGE(unable to step up) ENDMESSAGE(TopDirSelectionProc) return; } getwd(newpath); } else { savestrcpy(newpath,CURRENT_DIR); appendDirEndSeparator(newpath); savestrcat(newpath,SUBDIR_ENTRY(item)); appendDirEndSeparator(newpath); } SMESSAGE(newpath) VlistSetFirstVisible(FS_CURLIST, 0); VlistSetFirstVisible(FS_SUBLIST, 0); SetDirectoryView(FS_FILE_SELECTION,newpath); ClipWidgetSetCoordinates(FS_CURCLIP, 0, 0); } ENDMESSAGE(SubDirSelectionProc) } /*------------------------------------------------------------------------------- CreateTextField -------------------------------------------------------------------------------*/ static void CreateTextField(Widget *frameP, Widget *textP, char *value, XtTranslations text_trans, String namebase, Widget parent) { USE_Arg(10); char name[15]; BEGINMESSAGE(CreateTextField) RESET_Arg; sprintf(name,"%sframe",namebase); *frameP = ADD_Widget(name,frameWidgetClass,parent); RESET_Arg; SET_Arg(XtNdisplayCaret, False); SET_Arg(XtNuseStringInPlace, False); SET_Arg(XtNstring, value); SET_Arg(XtNeditType, XawtextEdit); SET_Arg(XtNscrollHorizontal, XawtextScrollNever); SET_Arg(XtNscrollVertical, XawtextScrollNever); SET_Arg(XtNtranslations, text_trans); SET_Arg(XtNtype, XawAsciiString); SET_Arg(XtNresize, XawtextResizeWidth); sprintf(name,"%stext",namebase); *textP = ADD_Widget_Arg(name, asciiTextWidgetClass,*frameP); ENDMESSAGE(CreateTextField) } /*------------------------------------------------------------------------------- CreateList -------------------------------------------------------------------------------*/ static void cb_scroll(Widget w, XtPointer client_data, XtPointer call_data) { Widget p; char *s; BEGINMESSAGE(cb_scroll) if (!XtIsRealized(w)) { ENDMESSAGE(cb_scroll) return; } s = XtName(w); /* names of the clip widgets are "topclip","curclip","subclip" */ if (s[3] == 'c') { p = XtParent(XtParent(w)); } else p = XtParent(w); SMESSAGE(s) SMESSAGE(XtName(p)) { Widget clip=NULL,aaa=NULL,scroll=NULL,list=NULL; FS_WIDGET p; int style = (int)(intptr_t)client_data; if (s[0] == 'c') { clip = FS_CURCLIP; aaa = FS_CURAAA; scroll = FS_CURSCROLL; list = FS_CURLIST; } else if (s[0] == 's') { clip = FS_SUBCLIP; aaa = FS_SUBAAA; scroll = FS_SUBSCROLL; list = FS_SUBLIST; } else style=0; if (style == SCROLL_SCROLLPROC || style == SCROLL_JUMPPROC) { int x; x = (int) aaa->core.x; ClipWidgetSetCoordinates(clip, x, 0); if (((int)(intptr_t)client_data)==1) { int dy = (int)(intptr_t)call_data; int ly = ((VlistWidget)list)->vlist.ydelta; /* Just scroll one position less... */ if (dy>ly) dy-=ly; if (dy<-ly) dy+=ly; VlistMoveFirstVisible(list, VlistGetFirstVisible(list), dy); XawScrollbarSetThumb(scroll,VlistScrollPosition(list), VlistVisibleLength(list,clip->core.height)); } else { float *percent = (float *) call_data; VlistSetFirstVisible(list, (int)(VlistEntries(list)**percent+0.5)); } } else if (style == SCROLL_CLIPREPORT) { XawScrollbarSetThumb(scroll,VlistScrollPosition(list), VlistVisibleLength(list,clip->core.height)); } } ENDMESSAGE(cb_scroll) } static void CreateList(Widget *scrollP, Widget *frameP, Widget *clipP, Widget *aaaP, Widget *listP, XtTranslations list_trans, String namebase, Widget parent) { USE_Arg(5); char name[15]; BEGINMESSAGE(CreateList) if (scrollP) { RESET_Arg; sprintf(name,"%sscroll",namebase); *scrollP = ADD_Widget_Arg(name,scrollbarWidgetClass,parent); XtAddCallback(*scrollP, XtNscrollProc,cb_scroll, (XtPointer)SCROLL_SCROLLPROC); XtAddCallback(*scrollP, XtNjumpProc,cb_scroll, (XtPointer)SCROLL_JUMPPROC); } RESET_Arg; if (namebase[0] == 'c') { SET_Arg(XtNresize, False); } sprintf(name,"%sframe",namebase); *frameP = ADD_Widget_Arg(name,frameWidgetClass,parent); RESET_Arg; sprintf(name,"%sclip",namebase); *clipP = ADD_Widget_Arg(name,clipWidgetClass,*frameP); if (scrollP) XtAddCallback(*clipP, XtNreportCallback,cb_scroll, (XtPointer)SCROLL_CLIPREPORT); RESET_Arg; sprintf(name,"%saaa",namebase); *aaaP = ADD_Widget_Arg(name,aaaWidgetClass,*clipP); RESET_Arg; SET_Arg(XtNlabel, ""); SET_Arg(XtNvlist, ""); SET_Arg(XtNtranslations, list_trans); SET_Arg(XtNallowMarks, False); SET_Arg(XtNjustify, XtJustifyLeft); *listP = ADD_Widget_Arg("list",vlistWidgetClass,*aaaP); ENDMESSAGE(CreateList) } /*------------------------------------------------------------------------------- BuildMenu -------------------------------------------------------------------------------*/ static Widget BuildMenu(Widget parent, String descrip, String defaultdescrip, XtCallbackProc cb) { Widget m,w=NULL; char *md,*d,*tmp; m = XtCreatePopupShell("menu", simpleMenuWidgetClass,parent,NULL,(Cardinal)0); md = d = XtNewString(descrip); while (*d) { while (isspace(*d)) *d++='\r'; while (*d && *d != '\n') { if (isspace(*d) && isspace(*(d+1))) *d='\r'; d++; } if (*d) d++; } d = md +strlen(md); if (d != md) while (isspace(*(--d))) *d = '\r'; d = tmp = md; while (*d) { if (*d != '\r') *tmp++ = *d; d++; } *tmp='\0'; d = md; if (!*d) { XtFree(md); md = d = XtNewString(defaultdescrip); } while (d) { tmp=strchr(d,'\n'); if (tmp) *tmp='\0'; if (*d) { w = ADD_Widget(d,smeBSBObjectClass,m); ADD_Callback(w,cb); } if (tmp) d=tmp+1; else d=NULL; } XtFree(md); return(m); } /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- PUBLIC ROUTINES -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*######################################################################## XawFileSelectionGetFile ########################################################################*/ char * XawFileSelectionGetPath(Widget w) { FS_WIDGET w; String path=NULL; USE_Arg(2); char tmp[FS_MAXNAMLEN]; BEGINMESSAGE(XawFileSelectionGetPath) GET_Value(FS_PATH,XtNstring,&path); if (!path) path =""; savestrcpy(tmp,path); translateTildeInPath(tmp); XtFree(PATH); PATH = XtNewString(path); INFSMESSAGE(returning, PATH) ENDMESSAGE(XawFileSelectionGetPath) return(PATH); } /*######################################################################## XawFileSelectionSetPath ########################################################################*/ void XawFileSelectionSetPath(Widget w,String string) { FS_WIDGET w; BEGINMESSAGE(XawFileSelectionSetPath) setText(FS_PATH,string); ENDMESSAGE(XawFileSelectionGetPath) } /*######################################################################## XawFileSelectionScan ########################################################################*/ void XawFileSelectionScan(Widget w,int indicator _GL_UNUSED) { FS_WIDGET w; BEGINMESSAGE(XawFileSelectionScan) SetDirectoryView(FS_FILE_SELECTION,NULL); ENDMESSAGE(XawFileSelectionScan) } /*######################################################################## XawFileSelectionAddButton ########################################################################*/ void XawFileSelectionAddButton(Widget w, int position, XtCallbackProc function, XtPointer param) { FS_WIDGET w; char name[10]; Widget button; BEGINMESSAGE(XawFileSelectionAddButton) if (IS_BUTTON(position)) { INFMESSAGE(desired Button Position is already used) ENDMESSAGE(XawFileSelectionAddButton) return; } POSITION_TO_BUTTON_NAME(position,name); IMESSAGE(position) SMESSAGE(name); button = ADD_Widget(name,buttonWidgetClass,FS_FILE_SELECTION); BUTTONS += POSITION(position); if (function) XtAddCallback(button, XtNcallback, function, param); ENDMESSAGE(XawFileSelectionAddButton) } /*######################################################################## XawFileSelectionRemoveButton ########################################################################*/ void XawFileSelectionRemoveButton(Widget w, int position) { FS_WIDGET w; char name[10]; USE_Arg(3); Widget button; BEGINMESSAGE(XawFileSelectionRemoveButton) if (!(IS_BUTTON(position))) { INFMESSAGE(Unused Button Position) ENDMESSAGE(XawFileSelectionRemoveButton) return; } POSITION_TO_BUTTON_NAME(position,name); button = XtNameToWidget((Widget)FS_FILE_SELECTION,name); SET_Arg( XtNheight, 0); SET_Arg( XtNwidth, 0); SET_Values(button); XtDestroyWidget(button); BUTTONS -= POSITION(position); IMESSAGE(BUTTONS) ENDMESSAGE(XawFileSelectionRemoveButton) } /*######################################################################## XawFileSelectionPreferButton ########################################################################*/ void XawFileSelectionPreferButton(Widget w, int position) { int i; BEGINMESSAGE(XawFileSelectionPreferButton) for (i=1 ; i<4 ; i++ ) SetPreferredButton(w,i,(i == position) ? 1 : 0); ENDMESSAGE(XawFileSelectionPreferButton) } gv-3.7.4/src/main_globals.h0000664000076400007640000002717211735103745012502 00000000000000/* ** ** main_globals.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_MAIN_GLOBALS_H_ #define _GV_MAIN_GLOBALS_H_ #ifndef EXTERN # ifdef _GV_MAIN_C_ # define EXTERN # else # define EXTERN extern # endif #endif EXTERN char* gv_bin; EXTERN Bool show_date; EXTERN Bool show_locator; EXTERN Bool show_title; EXTERN Bool show_nextPage; EXTERN Bool show_prevPage; EXTERN Bool show_toggleCurrentPage; EXTERN Bool show_toggleEvenPages; EXTERN Bool show_toggleOddPages; EXTERN Bool show_unmarkAllPages; EXTERN Bool show_saveMarkedPages; EXTERN Bool show_saveAllPages; EXTERN Bool show_printMarkedPages; EXTERN Bool show_printAllPages; EXTERN Bool show_openFile; EXTERN Bool show_autoResize; EXTERN Bool show_showThisPage; EXTERN Bool show_updateFile; EXTERN Bool show_checkFile; EXTERN Bool show_panner; EXTERN String gv_safe_gs_workdir; EXTERN int gv_safe_gs_tempdir; EXTERN float default_xdpi; /* default xdpi from ghostview widget */ EXTERN float default_ydpi; /* default ydpi from ghostview widget */ EXTERN float gv_real_xdpi; EXTERN float gv_real_ydpi; EXTERN float gv_pixel_xdpi; EXTERN float gv_pixel_ydpi; EXTERN int num_ghosts; /* number of ghostview widgets active */ EXTERN FILE *gv_psfile; /* file to display */ EXTERN char gv_savepos_filename[GV_MAX_FILENAME_LENGTH]; /* filename used for savepos */ EXTERN String gv_filename; /* its filename */ EXTERN String gv_filename_old; /* previous filename */ EXTERN String gv_filename_dsc; /* file resulting from PDF->DSC conversion */ EXTERN String gv_filename_unc; /* name of uncompressed file */ EXTERN String gv_filename_raw; /* some useful filename derived from gv_filename */ EXTERN int current_page; /* current page being displayed */ EXTERN int current_llx; /* current bounding box */ EXTERN int current_lly; EXTERN int current_urx; EXTERN int current_ury; EXTERN String toc_text; /* page labels (Table of Contents) */ EXTERN int toc_entry_length; /* length of one entry */ EXTERN int gv_print_mode; /* printing mode */ EXTERN int gv_save_mode; /* saving mode */ EXTERN int gv_scanstyle; /* how to scan ps files */ EXTERN time_t mtime; /* last modified time of input file */ EXTERN struct document *doc; /* document structure */ EXTERN struct document *olddoc; /* document structure */ EXTERN Atom wm_delete_window; /* Atom sent to destroy a window */ EXTERN XErrorHandler old_Xerror; /* standard error handler */ EXTERN Boolean dying; /* whether an X error caused our exit */ EXTERN XErrorEvent bomb; /* what the error was */ EXTERN int gv_scroll_mode; EXTERN char* gv_miscmenu_entries_res; EXTERN MiscMenuEntry* gv_miscmenu_entries; EXTERN char* gv_magmenu_entries_res; EXTERN MagMenuEntry* gv_magmenu_entries; EXTERN char* gv_scales_res; EXTERN Scale* gv_scales; EXTERN int gv_scale; EXTERN float gv_ascale; EXTERN int gv_scale_base; EXTERN int gv_scale_base_current; EXTERN int gv_scale_current; EXTERN int gv_screen_width; EXTERN int gv_screen_height; EXTERN char* gv_medias_res; EXTERN Media* gv_medias; EXTERN int gv_pagemedia; EXTERN int gv_pagemedia_old; EXTERN int gv_pagemedia_auto; EXTERN int gv_pagemedia_auto_old; EXTERN int gv_default_pagemedia; EXTERN int gv_fallback_pagemedia; EXTERN int gv_num_std_pagemedia; EXTERN int gv_orientation; EXTERN int gv_orientation_old; EXTERN int gv_orientation_auto; EXTERN int gv_orientation_auto_old; EXTERN int gv_fallback_orientation; EXTERN int gv_swap_landscape; EXTERN int gv_swap_landscape_old; EXTERN Display *gv_display; EXTERN Screen *gv_screen; EXTERN XrmDatabase gv_database; EXTERN String gv_class; EXTERN String gv_name; EXTERN String gv_user_defaults_file; EXTERN String gv_print_command; /* command used to print doc, usually "lpr" */ EXTERN String gv_uncompress_command; /* command used to uncompress a file */ EXTERN int gv_print_kills_file; /* whether the print symbiont removes the file after printing */ EXTERN int gv_exiting; /* flag set when exiting gv */ EXTERN String gv_dirs; EXTERN String gv_filters; EXTERN String gv_filter; EXTERN String gv_gs_interpreter; EXTERN String gv_gs_x11_device; EXTERN String gv_gs_x11_alpha_device; EXTERN String gv_gs_cmd_scan_pdf; /* command used to extract DSC outlines from a pdf file */ EXTERN String gv_gs_cmd_conv_pdf; /* command used to convert a pdf file to ps */ EXTERN int gv_gs_safeDir; EXTERN int gv_gs_safer; EXTERN int gv_gs_quiet; EXTERN int gv_infoVerbose; EXTERN int gv_infoSkipErrors; EXTERN int gv_xinerama; EXTERN String gv_gs_arguments; EXTERN String gv_pdf_password; /* if a page is requested but gv is busy the following variable holds the number of the requested page. As soon as gv is notified that rendering a page is complete this variable is checked and the corresponding page will be displayed if necessary */ EXTERN int gv_pending_page_request; EXTERN XtAppContext app_con; EXTERN AppResources app_res; /* Widgets */ EXTERN Widget toplevel; EXTERN Widget main_control; EXTERN Widget titlebutton; EXTERN Widget titlemenu; EXTERN Widget datebutton; EXTERN Widget datemenu; EXTERN Widget locator; EXTERN Widget fileButton; EXTERN Widget fileMenu; EXTERN Widget openEntry; EXTERN Widget reopenEntry; EXTERN Widget saveposEntry; EXTERN Widget updateEntry; EXTERN Widget printAllEntry; EXTERN Widget printMarkedEntry; EXTERN Widget saveAllEntry; EXTERN Widget saveMarkedEntry; EXTERN Widget copyrightEntry; EXTERN Widget quitEntry; EXTERN Widget stateButton; EXTERN Widget stateMenu; EXTERN Widget stopEntry; EXTERN Widget antialiasEntry; EXTERN Widget dscEntry; EXTERN Widget eofEntry; EXTERN Widget watchFileEntry; EXTERN Widget sizeEntry; EXTERN Widget optiongvEntry; EXTERN Widget optiongsEntry; EXTERN Widget optionfsEntry; EXTERN Widget optionsetupEntry; EXTERN Widget presentationEntry; EXTERN Widget pageButton; EXTERN Widget pageMenu; EXTERN Widget nextEntry; EXTERN Widget redisplayEntry; EXTERN Widget prevEntry; EXTERN Widget centerEntry; EXTERN Widget currentEntry; EXTERN Widget oddEntry; EXTERN Widget evenEntry; EXTERN Widget unmarkEntry; EXTERN Widget scaleButton; EXTERN Widget scaleMenu; EXTERN Widget *scaleEntry; EXTERN Widget orientationButton; EXTERN Widget orientationMenu; EXTERN Widget autoOrientEntry; EXTERN Widget portraitEntry; EXTERN Widget landscapeEntry; EXTERN Widget upsidedownEntry; EXTERN Widget seascapeEntry; EXTERN Widget swapEntry; EXTERN Widget processButton; EXTERN Widget processMenu; EXTERN Widget pagemediaButton; EXTERN Widget pagemediaMenu; EXTERN Widget autoMediaEntry; EXTERN Widget *pagemediaEntry; EXTERN Widget newtocFrame; EXTERN Widget newtocClip; EXTERN Widget newtocControl; EXTERN Widget newtoc; EXTERN Widget newtocScroll; EXTERN Widget w_toggleCurrentPage; EXTERN Widget w_toggleAllPages; EXTERN Widget w_toggleEvenPages; EXTERN Widget w_toggleOddPages; EXTERN Widget w_unmarkAllPages; EXTERN Widget w_saveMarkedPages; EXTERN Widget w_saveAllPages; EXTERN Widget w_printMarkedPages; EXTERN Widget w_printAllPages; EXTERN Widget w_openFile; EXTERN Widget w_autoResize; EXTERN Widget w_showThisPage; EXTERN Widget w_checkFile; EXTERN Widget w_updateFile; EXTERN Widget w_nextPage; EXTERN Widget w_prevPage; EXTERN Widget pannerFrame; EXTERN Widget panner; EXTERN Widget slider; EXTERN Widget viewFrame; EXTERN Widget viewClip; EXTERN Widget viewControl; EXTERN Widget page; /* Popup widgets */ EXTERN Widget infopopup; extern OptionPopup gv_options_fs; extern OptionPopup gv_options_gs; extern OptionPopup gv_options_gv; extern OptionPopup gv_options_setup; EXTERN Widget confirmpopup; EXTERN Widget dialogpopup; EXTERN Widget notepopup; EXTERN Widget versionpopup; EXTERN Widget FileSel_popup; EXTERN Widget FileSel; /* * Command line flags * */ EXTERN int antialias_p; EXTERN int noantialias_p; EXTERN int safer_p; EXTERN int nosafer_p; EXTERN int safedir_p; EXTERN int nosafedir_p; EXTERN int color_p; EXTERN int grayscale_p; EXTERN int spartan_p; EXTERN int widgetless_p; EXTERN int fullscreen_p; EXTERN int quiet_p; EXTERN int infoverbose_p; EXTERN int debug_p; EXTERN int monochrome_p; EXTERN int media_p; EXTERN char *media_value; EXTERN int orientation_p; EXTERN char *orientation_value; EXTERN int page_p; EXTERN char *page_value; EXTERN int noquiet_p; EXTERN int pixmap_p; EXTERN int nopixmap_p; EXTERN int center_p; EXTERN int nocenter_p; EXTERN int scale_p; EXTERN char *scale_value; EXTERN int magstep_p; EXTERN char *magstep_value; EXTERN int scalebase_p; EXTERN char *scalebase_value; EXTERN int resize_p; EXTERN int noresize_p; EXTERN int swap_p; EXTERN int noswap_p; EXTERN int dsc_p; EXTERN int nodsc_p; EXTERN int eof_p; EXTERN int noeof_p; EXTERN int watch_p; EXTERN int nowatch_p; EXTERN int ad_p; EXTERN char *ad_value; EXTERN int style_p; EXTERN char *style_value; EXTERN int arguments_p; EXTERN float ascale_p; EXTERN char *arguments_value; #undef EXTERN #endif /* _GV_MAIN_GLOBALS_H_ */ gv-3.7.4/src/miscmenu.c0000664000076400007640000002470611736064614011670 00000000000000/* ** ** miscmenu.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include #include #include #include "paths.h" #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_XAW(SimpleMenu.h) #include INC_XAW(SmeBSB.h) #include INC_XAW(SmeLine.h) #include INC_XAW(Cardinals.h) #include INC_XAW(Scrollbar.h) #include "types.h" #include "actions.h" #include "callbacks.h" #include "miscmenu.h" #include "options.h" #include "main_resources.h" #include "main_globals.h" #include static MiscMenuEntryStruct miscmenu_entries[] = { { "update",cb_checkFile,(XtPointer)CHECK_FILE_DATE,2 }, { "redisplay",cb_redisplay,NULL,3 }, { "toggle_current" , cb_setPageMark, (XtPointer)(SPM_CURRENT|SPM_TOGGLE),1 }, { "toggle_even" , cb_setPageMark, (XtPointer)(SPM_EVEN|SPM_TOGGLE),1 }, { "toggle_odd" , cb_setPageMark, (XtPointer)(SPM_ODD|SPM_TOGGLE),1 }, { "unmark",cb_setPageMark,(XtPointer)(SPM_ALL|SPM_UNMARK),1 }, { "stop",cb_stopInterpreter,NULL,0 }, { "print_all", cb_print, (XtPointer)PAGE_MODE_ALL,3 }, { "print_marked",cb_print , (XtPointer)(PAGE_MODE_MARKED|PAGE_MODE_CURRENT),1 }, { "save_all", cb_save, (XtPointer)PAGE_MODE_ALL, 3 }, { "save_marked",cb_save , (XtPointer)(PAGE_MODE_MARKED|PAGE_MODE_CURRENT),1 }, { "line",NULL,NULL,0 }, { NULL,NULL,NULL,0 } }; /*################################################## miscmenu_freeMiscMenuEntries ##################################################*/ void miscmenu_freeMiscMenuEntries(entries) MiscMenuEntry *entries; { int i=0; BEGINMESSAGE(miscmenu_freeMiscMenuEntries) while (entries[i]) { XtFree((XtPointer)entries[i]); i++; } XtFree((XtPointer)entries); ENDMESSAGE(miscmenu_freeMiscMenuEntries) } /*################################################## miscmenu_parseMiscMenuEntries ##################################################*/ static MiscMenuEntry miscmenu_mallocMiscMenuEntry(void) { MiscMenuEntry entry; entry = (MiscMenuEntry) XtMalloc(sizeof(MiscMenuEntryStruct)); memset((void*)entry ,0,sizeof(MiscMenuEntryStruct)); return entry; } MiscMenuEntry *miscmenu_parseMiscMenuEntries(s) char *s; { char *c,*nl; MiscMenuEntry *entries,*mentries,entry; int i,j,n,have_entry=0; char name[100]; BEGINMESSAGE(miscmenu_parseMiscMenuEntries) if (!s) s = ""; s =options_squeezeMultiline(s); for (n=1,c=s; (c = strchr(c,'\n')); n++, c++); INFIMESSAGE(number of entries,n) mentries = entries = (MiscMenuEntry*) XtMalloc((n+2)*sizeof(MiscMenuEntry)); c=s; if (*s) while (n>0) { nl = strchr(c,'\n'); if (nl) *nl='\0'; name[0]='\0'; if (*c == '#' || *c == '!') i=0; else i=sscanf(c," %99s ",name); if (i==1) { for (j=0; miscmenu_entries[j].name; j++) if (!strcasecmp(miscmenu_entries[j].name,name)) { entry = miscmenu_mallocMiscMenuEntry(); *entry = miscmenu_entries[j]; have_entry = 1; *entries++ = entry; } } n--; if (!nl) break; c=++nl; } if (!have_entry) { entry = miscmenu_mallocMiscMenuEntry(); *entry = miscmenu_entries[0]; *entries++ = entry; } *entries = (MiscMenuEntry) NULL; XtFree(s); ENDMESSAGE(miscmenu_parseMiscMenuEntries) return(mentries); } /*############################################################*/ /* miscmenu_a_miscMenu */ /*############################################################*/ #define MISC_MENU_IDLE (1<<0) #define MISC_MENU_STATE_1 (1<<1) #define MISC_MENU_STATE_2 (1<<2) #define MISC_MENU_INIT (1<<3) #define MISC_MENU_POPUP (1<<4) #define MISC_MENU_RESET (1<<5) #define MISC_MENU_CHECK (1<<6) void miscmenu_a_miscMenu(w, event, params, num_params) Widget w; XEvent *event; String *params; Cardinal *num_params; { static int mode = MISC_MENU_IDLE; static Widget gvw = (Widget)NULL; static Widget menuwidget = (Widget)NULL; static int xo=0,yo=0; int x,y; BEGINMESSAGE(miscmenu_a_miscMenu) if (!event) { INFMESSAGE(received reset request) if (menuwidget) XtDestroyWidget(menuwidget); menuwidget = (Widget)NULL; gvw = (Widget)NULL; mode = MISC_MENU_IDLE; ENDMESSAGE(miscmenu_a_miscMenu) return; } if (*num_params < 1) { INFMESSAGE(no parameter) ENDMESSAGE(miscmenu_a_miscMenu) return; } # define MISC_MENU_HAVE(aaa,bbb) (!strcmp(params[0],(aaa)) && mode&(bbb)) if MISC_MENU_HAVE("init" , MISC_MENU_IDLE) mode = (MISC_MENU_INIT | MISC_MENU_STATE_1); else if MISC_MENU_HAVE("popup" , MISC_MENU_STATE_1) mode = (MISC_MENU_POPUP | MISC_MENU_STATE_2); else if MISC_MENU_HAVE("check" , MISC_MENU_STATE_2) mode = (MISC_MENU_CHECK | MISC_MENU_STATE_2); else if MISC_MENU_HAVE("reset" , (MISC_MENU_IDLE|MISC_MENU_STATE_1|MISC_MENU_STATE_2)) mode = (MISC_MENU_RESET | MISC_MENU_STATE_2); else { INFMESSAGE(no mode) ENDMESSAGE(miscmenu_a_miscMenu) return; } # undef MISC_MENU_HAVE if (mode & MISC_MENU_INIT) { INFMESSAGE(MISC_MENU_INIT) if (w==page && (event->type == ButtonRelease || event->type == ButtonPress)) { xo = (int) event->xbutton.x_root; yo = (int) event->xbutton.y_root; gvw = w; } else { INFMESSAGE(event not in main window or not a button press or button release) mode = MISC_MENU_IDLE; } ENDMESSAGE(miscmenu_a_miscMenu) return; } if (mode & MISC_MENU_POPUP) { Arg args[4]; Cardinal n; Widget entry=NULL; INFMESSAGE(MISC_MENU_POPUP) if (event->type != ButtonRelease && event->type != ButtonPress) { INFMESSAGE(event not a button press or button release) miscmenu_a_miscMenu(gvw,(XEvent*)NULL,NULL,NULL); ENDMESSAGE(miscmenu_a_miscMenu) return; } x = (int) event->xbutton.x_root; y = (int) event->xbutton.y_root; if (abs(x-xo)>1 || abs(y-yo)>1) { INFMESSAGE(succesive events are unrelated) miscmenu_a_miscMenu(gvw,(XEvent*)NULL,NULL,NULL); ENDMESSAGE(miscmenu_a_miscMenu) return; } menuwidget = XtCreatePopupShell("miscMenu", simpleMenuWidgetClass,w,NULL,(Cardinal)0); { int i; MiscMenuEntry e; int menu_x, menu_y; Dimension menu_width,menu_height,entry_height,menu_border; Dimension screen_width,screen_height; Position button_x, button_y; for (i=0; gv_miscmenu_entries[i]; i++) { e = gv_miscmenu_entries[i]; SMESSAGE(e->name) if (strcasecmp(e->name,"line")) { entry = XtCreateManagedWidget(e->name, smeBSBObjectClass,menuwidget,NULL,(Cardinal)0); if (e->cb) XtAddCallback(entry,XtNcallback,e->cb,e->client_data); if (e->sensitivity_type) { Boolean b; if (e->sensitivity_type==1) b = (toc_text != NULL); else if (e->sensitivity_type==2) b = (gv_filename != NULL); else b = (gv_psfile != NULL || (gv_gs_arguments && *gv_gs_arguments)); XtSetSensitive(entry,b); } } else { XtCreateManagedWidget("line", smeLineObjectClass,menuwidget,NULL,(Cardinal)0); } } if (!XtIsRealized(menuwidget)) XtRealizeWidget(menuwidget); n=0; XtSetArg(args[n], XtNheight, &entry_height); ++n; XtGetValues(entry, args, n); n=0; XtSetArg(args[n], XtNwidth, &menu_width); ++n; XtSetArg(args[n], XtNheight, &menu_height); ++n; XtSetArg(args[n], XtNborderWidth, &menu_border); ++n; XtGetValues(menuwidget, args, n); XtTranslateCoords(w, event->xbutton.x, event->xbutton.y, &button_x, &button_y); menu_x = button_x-menu_width/2 -menu_border; menu_y = button_y-entry_height/2; screen_width = WidthOfScreen(XtScreen(menuwidget)); screen_height = HeightOfScreen(XtScreen(menuwidget)); if( menu_x + menu_width > screen_width && menu_width < screen_width ) menu_x = screen_width - menu_width; if( menu_y + menu_height > screen_height && menu_height < screen_height ) menu_y = screen_height - menu_height; n=0; XtSetArg(args[n], XtNx, menu_x); n++; XtSetArg(args[n], XtNy, menu_y); n++; XtSetValues(menuwidget, args, n); XtPopup(menuwidget,XtGrabExclusive); } ENDMESSAGE(miscmenu_a_miscMenu) return; } if (mode & MISC_MENU_CHECK) { INFMESSAGE(MISC_MENU_CHECK) if (menuwidget) { Arg args[5]; Cardinal n; Position ulx,uly,lrx,lry,evx,evy; int rx,ry; Dimension width,height; n=0; XtSetArg(args[n], XtNwidth, &width); n++; XtSetArg(args[n], XtNheight, &height); n++; XtGetValues(menuwidget, args, n); XtTranslateCoords(menuwidget, 0, 0, &ulx, &uly); XtTranslateCoords(menuwidget, (Position)width, (Position)height, &lrx, &lry); IIMESSAGE(ulx,uly) IIMESSAGE(lrx,lry) { Window root, child; int dummyx, dummyy; unsigned int dummymask; XQueryPointer(XtDisplay(w), XtWindow(w), &root, &child, &rx, &ry, &dummyx, &dummyy, &dummymask); } evx = (Position)rx; evy = (Position)ry; IIMESSAGE(evx,evy) if (evx<=ulx || evx >= lrx || evy <= uly || evy >= lry) { INFMESSAGE(pointer outside window) mode = mode | MISC_MENU_RESET; } } } if (mode & MISC_MENU_RESET) { INFMESSAGE(MISC_MENU_RESET) miscmenu_a_miscMenu(gvw,(XEvent*)NULL,NULL,NULL); } ENDMESSAGE(miscmenu_a_miscMenu) } gv-3.7.4/src/process.c0000664000076400007640000003111411735103746011514 00000000000000/* ** ** process.c ** ** Copyright (C) 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include #include #include # include # include # include # include # include #include "paths.h" #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_XAW(MenuButton.h) #include INC_XAW(SimpleMenu.h) #include INC_XAW(SmeBSB.h) #include INC_X11(IntrinsicP.h) #include INC_X11(ShellP.h) #include "types.h" #include "config.h" #include "callbacks.h" #include "process.h" #include "main_resources.h" #include "main_globals.h" #include "misc_private.h" #include "resource.h" #define CHECK_PERIOD 500 #define ADD_TIMEOUT(widget,interval,data) \ XtAppAddTimeOut ( \ app_con, \ ((unsigned long)(interval)), \ process_notify, \ ((XtPointer)(data)) \ ) #define DISABLED ((XtIntervalId) 0) #define DESTROY_TIMER(aaa) \ if ((aaa)) { \ XtRemoveTimeOut((aaa)); \ aaa = DISABLED; \ } static ProcessData gpd = NULL; /*------------------------------------------------------------*/ /* process_get_pd */ /*------------------------------------------------------------*/ static ProcessData process_get_pd(void) { ProcessData pd; Cardinal size = sizeof(ProcessDataStruct); BEGINMESSAGE(process_get_pd) # ifdef MESSAGES if (!gpd) { INFMESSAGE(no processes registered yet) } # endif pd = (ProcessData) XtMalloc(size); memset((void*) pd ,0,(size_t)size); if (!gpd) gpd = pd; else { ProcessData tmppd; tmppd = gpd; while (tmppd->next) tmppd = tmppd->next; tmppd->next=pd; } ENDMESSAGE(process_get_pd) return(pd); } /*------------------------------------------------------------*/ /* process_remove_pd */ /*------------------------------------------------------------*/ static void process_remove_pd(ProcessData pd) { BEGINMESSAGE(process_remove_pd) if (gpd == pd) gpd = pd->next; else { ProcessData tmppd = gpd; while (tmppd->next != pd) tmppd=tmppd->next; tmppd->next = pd->next; } process_menu(pd,PROCESS_MENU_DEL_ENTRY); DESTROY_TIMER(pd->timer) XtFree(pd->name); XtFree((XtPointer)pd); # ifdef MESSAGES if (!gpd) { INFMESSAGE(no more processes registered) } # endif ENDMESSAGE(process_remove_pd) } /*------------------------------------------------------------*/ /* process_child_status */ /*------------------------------------------------------------*/ #define CHILD_UNKNOWN_STATUS -2 #define CHILD_ERROR -1 #define CHILD_OKAY 0 #define CHILD_EXITED 1 static int process_child_status(ProcessData pd) { int status; pid_t child_pid; BEGINMESSAGE(process_child_status) child_pid = waitpid(pd->pid,NULL,WNOHANG); if (child_pid==pd->pid) { status=CHILD_EXITED; INFMESSAGE(CHILD_EXITED) } else if (child_pid==0) { status=CHILD_OKAY; INFMESSAGE(CHILD_OKAY) } else if (child_pid==-1) { status=CHILD_ERROR; INFMESSAGE(CHILD_ERROR) } else { status=CHILD_UNKNOWN_STATUS; INFMESSAGE(CHILD_UNKNOWN_STATUS) } ENDMESSAGE(process_child_status) return(status); } /*##############################################################*/ /* cb_processKillProcess */ /*##############################################################*/ void cb_processKillProcess(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data _GL_UNUSED) { ProcessData pd; BEGINMESSAGE(cb_processKillProcess) pd = (ProcessData)client_data; process_kill_process(pd); ENDMESSAGE(cb_processKillProcess) } /*##############################################################*/ /* process_kill_process */ /*##############################################################*/ void process_kill_process(ProcessData pd) { int status; BEGINMESSAGE(process_kill_process) kill(pd->pid, SIGTERM); status=process_child_status(pd); if (status==CHILD_OKAY) { INFMESSAGE(waiting for child to exit); wait(NULL); } (*(pd->notify_proc))(pd->data,PROCESS_KILL); process_remove_pd(pd); ENDMESSAGE(process_kill_process) } /*##############################################################*/ /* process_kill_all_processes */ /*##############################################################*/ void process_kill_all_processes(void) { BEGINMESSAGE(process_kill_all_processes) while (gpd) process_kill_process(gpd); ENDMESSAGE(process_kill_all_processes) } /*------------------------------------------------------------*/ /* process_notify */ /*------------------------------------------------------------*/ static void process_notify(XtPointer client_data, XtIntervalId *idp _GL_UNUSED) { pid_t child_pid; ProcessData pd = (ProcessData) client_data; BEGINMESSAGE(process_notify) child_pid = process_child_status(pd); if (child_pid==0) { INFMESSAGE(child did not exit yet) pd->timer = ADD_TIMEOUT(toplevel,CHECK_PERIOD,client_data); process_menu(pd,PROCESS_MENU_PROGRESS); } else { INFMESSAGE(calling notify procedure) (*(pd->notify_proc))(pd->data,PROCESS_NOTIFY); process_remove_pd(pd); } ENDMESSAGE(process_notify) } /*##############################################################*/ /* process_fork */ /*##############################################################*/ ProcessData process_fork(String name, String command, ProcessNotifyProc notify_proc, XtPointer data) { ProcessData pd; pid_t pid; BEGINMESSAGE(process_fork) pd = process_get_pd(); pid = fork(); if (pid == 0) { /* child */ char *argv[4]; char *c; INFMESSAGE(child process) c = command; SMESSAGE(c) argv[0] = "sh"; argv[1] = "-c"; argv[2] = c; argv[3] = NULL; INFMESSAGE(spawning conversion process) /* if (!freopen("/dev/null", "w", stdout)) perror("/dev/null"); */ if (!freopen("/dev/null", "r", stdin)) perror("/dev/null"); if (gv_gs_safeDir) { if (chdir(gv_safe_gs_workdir) != 0) { char buf[512]; sprintf(buf, "Chdir to %s failed", gv_safe_gs_workdir); perror(buf); _exit(EXIT_STATUS_ERROR); } } execvp(argv[0], argv); { char tmp[512]; sprintf(tmp, execOfFailedLabel, argv[0]); perror(tmp); _exit(EXIT_STATUS_ERROR); } } INFMESSAGE(parent process) pd->name = XtNewString(name); pd->notify_proc = notify_proc; pd->data = data; pd->pid = pid; pd->timer = ADD_TIMEOUT(toplevel,CHECK_PERIOD,pd); process_menu(pd,PROCESS_MENU_ADD_ENTRY); ENDMESSAGE(process_fork) return(pd); } /*------------------------------------------------------------*/ /* process_set_shell_resize */ /*------------------------------------------------------------*/ static Boolean process_set_shell_resize(Boolean allow_resize) { Boolean old_allow_resize; ShellWidget sw = (ShellWidget)toplevel; old_allow_resize = sw->shell.allow_shell_resize; sw->shell.allow_shell_resize=allow_resize; return(old_allow_resize); } /*##############################################################*/ /* process_menu */ /*##############################################################*/ void process_menu(ProcessData pd, int action) { Arg args[5]; Cardinal n; static int visible=1; static int progress=0; if (action==PROCESS_MENU_HIDE) { INFMESSAGE(PROCESS_MENU_HIDE) if (visible) { Boolean allow_resize; allow_resize=process_set_shell_resize(False); n=0; XtSetArg(args[n], XtNwidth, 0); n++; XtSetArg(args[n], XtNheight, 0); n++; XtSetValues(processButton,args,n); process_set_shell_resize(allow_resize); visible=0; progress=0; } } else if (action==PROCESS_MENU_SHOW) { INFMESSAGE(PROCESS_MENU_SHOW) if (!visible) { String label; Boolean allow_resize; allow_resize=process_set_shell_resize(False); n=0; XtSetArg(args[n], XtNlabel, &label); n++; XtGetValues(processButton,args,n); label=XtNewString(label); SMESSAGE(label) n=0; XtSetArg(args[n], XtNresize, True); n++; XtSetArg(args[n], XtNlabel, ""); n++; XtSetValues(processButton,args,n); n=0; XtSetArg(args[n], XtNlabel, label); n++; XtSetValues(processButton,args,n); n=0; XtSetArg(args[n], XtNresize, False); n++; XtSetValues(processButton,args,n); XtFree(label); process_set_shell_resize(allow_resize); visible=1; progress=0; } } else if (action==PROCESS_MENU_ADD_ENTRY) { Widget entry; char label[512]; INFMESSAGE(PROCESS_MENU_ADD_ENTRY) if (!processMenu) { n=0; processMenu = XtCreatePopupShell("menu", simpleMenuWidgetClass,processButton,args,n); } sprintf(label,"Stop %s",pd->name); n=0; XtSetArg(args[n], XtNlabel, label); n++; entry = XtCreateManagedWidget("aaa", smeBSBObjectClass,processMenu,args,n); XtAddCallback(entry, XtNcallback, cb_processKillProcess, (XtPointer)pd); pd->menuentry = entry; process_menu(NULL,PROCESS_MENU_SHOW); process_menu(pd,PROCESS_MENU_PROGRESS); } else if (action==PROCESS_MENU_DEL_ENTRY) { INFMESSAGE(PROCESS_MENU_DEL_ENTRY) if (!gv_exiting) { if (!gpd) { INFMESSAGE(destroying processMenu) XtDestroyWidget(processMenu); processMenu=NULL; process_menu(NULL,PROCESS_MENU_HIDE); } else { INFMESSAGE(destroying menu entry) XtDestroyWidget(pd->menuentry); } } } else if (action==PROCESS_MENU_PROGRESS) { INFMESSAGE(PROCESS_MENU_PROGRESS) if (visible) { char *label; char *tmp; size_t len; n=0; XtSetArg(args[n], XtNlabel, &label); n++; XtGetValues(processButton,args,n); len = strlen(label); tmp = (char*) XtMalloc(len*sizeof(char)+1); strcpy(tmp,&(label[progress])); if (progress) { if (progress>(int)len) progress=(int)len; strncpy(&(tmp[(int)len-progress]),label,(size_t)progress); } tmp[len]='\0'; progress++; if (progress==(int)len+1) progress=0; update_label(processButton,tmp); XtFree(tmp); } } } /*##############################################################*/ /* process_disallow_quit */ /*##############################################################*/ char *process_disallow_quit(void) { # define MAX_DISALLOW_QUIT_MESSAGE 512 static char message[MAX_DISALLOW_QUIT_MESSAGE]; ProcessData pd; int l; BEGINMESSAGE(process_disallow_quit) if (!gpd) { ENDMESSAGE(process_disallow_quit) return NULL; } strcpy(message,stillInProgressLabel); l = strlen(message); for (pd = gpd; pd ; pd = pd->next) { l = l + strlen(pd->name) + 1; if (l + 10 < MAX_DISALLOW_QUIT_MESSAGE) { strcat(message,"\n"); strcat(message,pd->name); } else break; }; if (pd) strcat(message,"\n..."); ENDMESSAGE(process_disallow_quit) return message; } gv-3.7.4/src/gv_signal.h0000664000076400007640000000233111735103745012012 00000000000000/* ** ** gv_signal.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_SIGNAL_H_ #define _GV_SIGNAL_H_ extern void signal_setSignalHandlers (int); #endif /* _GV_SIGNAL_H_ */ gv-3.7.4/src/FrameP.h0000664000076400007640000000254511676665540011234 00000000000000/* * FrameP.h - Private definitions for Frame widget * * Author: Vladimir Romanovski * * Date: Mon Feb 27, 1995 */ /*********************************************************************** * * Frame Widget Private Data * ***********************************************************************/ #ifndef _XawFrameP_h #define _XawFrameP_h #include INC_X11(ConstrainP.h) #include "Frame.h" /* New fields for the Frame widget class record */ typedef struct _FrameClassPart{ XtPointer dummy; } FrameClassPart; typedef struct _FrameClassRec { CoreClassPart core_class; CompositeClassPart composite_class; FrameClassPart frame_class; } FrameClassRec; /* New fields for the frame widget. */ typedef struct _FramePart { Dimension h_space_nat; Dimension v_space_nat; Dimension shadow_width_nat; XawFrameType frame_type; Pixel top_shadow_pixel; Pixel bot_shadow_pixel; Boolean resize; /* Private resources. */ GC top_shadow_GC; GC bot_shadow_GC; Dimension h_space; Dimension v_space; Dimension shadow_width; Dimension child_width_nat; Dimension child_height_nat; Dimension child_border_nat; } FramePart; typedef struct _FrameRec{ CorePart core; CompositePart composite; FramePart frame; } FrameRec; extern FrameClassRec frameClassRec; #endif /* _XawFrameP_h */ gv-3.7.4/src/callbacks.c0000664000076400007640000013637411735103745011772 00000000000000/* ** ** callbacks.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Authors: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include "config.h" #include #include #include #include #include #include #ifndef BUFSIZ # define BUFSIZ 1024 #endif #include "paths.h" #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_X11(Shell.h) #include INC_XAW(Cardinals.h) #include INC_XAW(Scrollbar.h) #include "Clip.h" #include "FileSel.h" #include "Ghostview.h" #include "Vlist.h" #include INC_X11(IntrinsicP.h) #include #include #include #include #include #include #include INC_X11(Xatom.h) #include "types.h" #include "actions.h" #include "callbacks.h" #include "confirm.h" #include "file.h" #include "ps.h" #include "doc_misc.h" #include "info.h" #include "popup.h" #include "process.h" #include "dialog.h" #include "magmenu.h" #include "main_resources.h" #include "main_globals.h" #include "media.h" #include "misc.h" #include "miscmenu.h" #include "note.h" #include "save.h" #include "resource.h" #include "scale.h" #include "misc_private.h" #include "version.h" #include "widgets_misc.h" #include "VlistP.h" static char* save_directory = NULL; static char* open_directory = NULL; static int last_psx; static int last_psy; /*############################################################*/ /* cb_showTitle */ /*############################################################*/ void setTitle ( Display* dpy, Window w, char* title, int icon); XTextProperty* char_to_xtp ( Display* dpy, char* s ); void setTitle ( Display* dpy, Window w, char* title, int icon) { char* from; iconv_t cd; char* inptr; size_t insize; char utf8title [4096]; char* outptr; size_t outsize; Atom net_wm_name; Atom net_wm_icon_name; Atom utf8_string; net_wm_name = XInternAtom (dpy, "_NET_WM_NAME", False); net_wm_icon_name = XInternAtom (dpy, "_NET_WM_ICON_NAME", False); utf8_string = XInternAtom (dpy, "UTF8_STRING" ,False); from = nl_langinfo (CODESET); cd = iconv_open ("UTF-8",from); inptr = title; outptr = utf8title; insize = strlen(title); outsize = sizeof (utf8title); memset (&utf8title, 0, sizeof(utf8title)); iconv (cd, &inptr, &insize, &outptr, &outsize); if (icon) { XSetWMIconName ( dpy, w, char_to_xtp (dpy,utf8title) ); XChangeProperty ( dpy, w, net_wm_icon_name, utf8_string, 8, PropModeReplace, (unsigned char *)utf8title, strlen (utf8title) ); } else { XSetWMName ( dpy, w, char_to_xtp (dpy,utf8title) ); XChangeProperty ( dpy, w, net_wm_name, utf8_string, 8, PropModeReplace, (unsigned char *)utf8title, strlen (utf8title) ); } } XTextProperty* char_to_xtp ( Display* dpy, char* s ) { static XTextProperty tp = { 0, 0, 0, 0 }; static int free_prop = True; int errCode = 0; char* tl[2]; if ( tp.value ) { if ( free_prop ) { XFree( tp.value ); } tp.value = 0; free_prop = True; } tl[0] = s; tl[1] = 0; errCode = XmbTextListToTextProperty ( dpy,tl, 1, XStdICCTextStyle, &tp ); if ( errCode < 0 ) { tp.value = (unsigned char*)s; tp.encoding = XA_STRING; tp.format = 8; tp.nitems = strlen (s); free_prop = False; } return &tp; } void cb_showTitle(Widget w, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { String t=NULL,s; Arg args[2]; Cardinal n; Pixmap bitmap=None; BEGINMESSAGE(cb_showTitle) if (app_res.title_style != 0) { if (app_res.title_style == 1 && doc && doc->title) { t = doc->title; bitmap = app_res.document_bitmap; } else if (gv_filename) { t = gv_filename; } if (!t) t = s = XtNewString(versionIdentification[0]); else { s = XtMalloc((4+strlen(t)+1)*sizeof(char)); sprintf(s,"gv: %s",t); } } else { t = s = XtNewString(versionIdentification[0]); } if (w && XtWindow(w)) setTitle(gv_display, XtWindow(w), s, 0); if (w && XtWindow(w)) setTitle(gv_display, XtWindow(w), t, 1); n=0; XtSetArg(args[n], XtNtitle, s); n++; XtSetArg(args[n], XtNiconName, t); n++; XtSetValues(toplevel,args,n); if (show_title) { n=0; XtSetArg(args[n], XtNlabel, t); n++; XtSetValues(titlebutton, args, n); if (titlemenu) XtDestroyWidget(titlemenu); titlemenu = build_label_menu(titlebutton, "title", t, bitmap); } XtFree(s); ENDMESSAGE(cb_showTitle) } /*############################################################*/ /* cb_newtocScrollbar */ /*############################################################*/ void cb_newtocScrollbar(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data) { BEGINMESSAGE(cb_newtocScrollbar) if (((int)(intptr_t)client_data)==1) { int dy = (int)(intptr_t)call_data; /* Just scroll one position less... */ int ly = ((VlistWidget)newtoc)->vlist.ydelta; if (dy>ly) dy-=ly; if (dy<-ly) dy+=ly; VlistMoveFirstVisible(newtoc, VlistGetFirstVisible(newtoc), dy); } else { float *percent = (float *) call_data; VlistSetFirstVisible(newtoc, (int)(VlistEntries(newtoc)**percent+0.5)); } ENDMESSAGE(cb_newtocScrollbar) } /*##################################################################*/ /* cb_newtocVisibleAdjust */ /*##################################################################*/ void cb_newtocVisibleAdjust(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { int entries; BEGINMESSAGE(cb_newtocClipAdjust) entries = VlistEntries(newtoc); if (entries <= 0) XawScrollbarSetThumb(newtocScroll, 0.0, 1.0); else XawScrollbarSetThumb(newtocScroll, VlistScrollPosition(newtoc), VlistVisibleLength(newtoc,newtocClip->core.height)); ENDMESSAGE(cb_newtocClipAdjust) } /*############################################################*/ /* cb_adjustSlider */ /*############################################################*/ void cb_adjustSlider(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data) { static Dimension opw=0,oph=0,opvw=0,opvh=0; static Position opvx=0,opvy=0; XawPannerReport *report = (XawPannerReport*) call_data; Dimension pw = (Dimension) (report->canvas_width); Dimension ph = (Dimension) (report->canvas_height); Dimension pvw = (Dimension) (report->slider_width); Dimension pvh = (Dimension) (report->slider_height); Position pvx = (Position) (report->slider_x); Position pvy = (Position) (report->slider_y); BEGINMESSAGE(cb_adjustSlider) if (gv_scroll_mode == SCROLL_MODE_PANNER) { INFMESSAGE(aborting due to wrong scroll mode) ENDMESSAGE(view_cb_adjustSlider) return; } if (!show_panner) {INFMESSAGE(panner not used)ENDMESSAGE(cb_adjustSlider)return;} if ((pw!=opw)||(ph!=oph)||(pvw!=opvw)||(pvh!=opvh)||(pvx!=opvx)||(pvy!=opvy)) { Arg args[5]; Dimension sw,sh,cw,ch,bw; Position sx,sy; static Dimension osw=0,osh=0; static Position osx=0,osy=0; INFMESSAGE(detected changes) XtSetArg(args[0], XtNwidth,&cw); XtSetArg(args[1], XtNheight,&ch); XtSetArg(args[2], XtNborderWidth,&bw); XtGetValues(panner, args, THREE); sw = (Dimension) ((cw*pvw+pw/2)/pw); sh = (Dimension) ((ch*pvh+ph/2)/ph); if (pw>pvw) sx = (Position) (((cw-sw)*pvx+(pw-pvw)/2)/(pw-pvw)); else sx = 0; if (ph>pvh) sy = (Position) (((ch-sh)*pvy+(ph-pvh)/2)/(ph-pvh)); else sy = 0; IIMESSAGE(cw,ch) IIMESSAGE(sw,sh) IIMESSAGE(sx,sy) IIMESSAGE(pw,ph) IIMESSAGE(pvw,pvh) IIMESSAGE(pvx,pvy) INFMESSAGE(redisplaying slider) XtConfigureWidget(slider,sx,sy,sw,sh,bw); osw=sw; osh=sh; osx=sx; osy=sy; opw=pw; oph=ph; opvw=pvw; opvh=pvh; opvx=pvx; opvy=pvy; } ENDMESSAGE(cb_adjustSlider) } /*##################################################################*/ /* cb_antialias */ /*##################################################################*/ void cb_antialias(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data _GL_UNUSED) { BEGINMESSAGE(cb_antialias) if (client_data) { app_res.antialias = app_res.antialias ? False : True; if (gv_filename) { cb_stopInterpreter(page,NULL,NULL); cb_reopen(page,NULL,NULL); } } widgets_setSelectedBitmap(antialiasEntry, app_res.antialias ? 1 : 0); ENDMESSAGE(cb_antialias) } /*##################################################################*/ /* cb_useBackingPixmap */ /*##################################################################*/ void cb_useBackingPixmap(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data _GL_UNUSED) { int i = (int)(intptr_t)client_data; BEGINMESSAGE(cb_useBackingPixmap) if (i&1) { app_res.use_bpixmap = app_res.use_bpixmap ? False : True; } if (i&2) { Arg args[1]; XtSetArg(args[0],XtNuseBackingPixmap,app_res.use_bpixmap); XtSetValues(page,args,(Cardinal)1); } if (i&4 && gv_filename) cb_reopen(page,NULL,NULL); ENDMESSAGE(cb_useBackingPixmap) } /*##################################################################*/ /* cb_handleDSC */ /*##################################################################*/ void cb_handleDSC(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data _GL_UNUSED) { BEGINMESSAGE(cb_handleDSC) if (client_data) { gv_scanstyle = (gv_scanstyle & SCANSTYLE_IGNORE_DSC) ? (gv_scanstyle & ~SCANSTYLE_IGNORE_DSC) : (gv_scanstyle | SCANSTYLE_IGNORE_DSC); if (gv_filename) { cb_stopInterpreter(page,NULL,NULL); cb_reopen(page,NULL,NULL); } } widgets_setSelectedBitmap(dscEntry, (gv_scanstyle & SCANSTYLE_IGNORE_DSC) ? 0 : 1); ENDMESSAGE(cb_handleDSC) } /*##################################################################*/ /* cb_handleEOF */ /*##################################################################*/ void cb_handleEOF(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data _GL_UNUSED) { BEGINMESSAGE(cb_handleEOF) if (client_data) { gv_scanstyle = (gv_scanstyle & SCANSTYLE_IGNORE_EOF) ? (gv_scanstyle & ~SCANSTYLE_IGNORE_EOF) : (gv_scanstyle | SCANSTYLE_IGNORE_EOF); if (gv_filename) { cb_stopInterpreter(page,NULL,NULL); cb_reopen(page,NULL,NULL); } } widgets_setSelectedBitmap(eofEntry,(gv_scanstyle & SCANSTYLE_IGNORE_EOF)); ENDMESSAGE(cb_handleEOF) } /*##################################################################*/ /* cb_stopInterpreter */ /*##################################################################*/ void cb_stopInterpreter(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { BEGINMESSAGE(cb_stopInterpreter) GhostviewDisableInterpreter(page); ENDMESSAGE(cb_stopInterpreter) } /*##################################################################*/ /* cb_pageAdjustNotify */ /*##################################################################*/ void cb_pageAdjustNotify(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data) { BEGINMESSAGE(cb_pageAdjustNotify) if (gv_scroll_mode == SCROLL_MODE_GHOSTVIEW) { String params[2]; Cardinal num_params=2; params[0]= "adjusted"; params[1]= (char*) call_data; action_movePage(page,(XEvent*)NULL,params,&num_params); } ENDMESSAGE(cb_pageAdjustNotify) } /*##################################################################*/ /* cb_checkFile */ /*##################################################################*/ void cb_checkFile(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data _GL_UNUSED) { int changed; BEGINMESSAGE(cb_checkFile) changed = check_file(((int)(intptr_t)client_data)); if (changed==1) { cb_stopInterpreter(page,NULL,NULL); show_page(current_page,NULL); } ENDMESSAGE(cb_checkFile) } /*##################################################################*/ /* cb_watchFile */ /*##################################################################*/ /*------------------------------------------------------------*/ /* watch_file */ /*------------------------------------------------------------*/ static void watch_file (XtPointer client_data, XtIntervalId *idp _GL_UNUSED) { static XtIntervalId timer = (XtIntervalId) 0; unsigned long t = (unsigned long) app_res.watch_file_frequency; BEGINMESSAGE(watch_file) /* notification after timeout */ if ((int)(intptr_t)client_data && app_res.watch_file) { if (!file_fileIsNotUseful(gv_filename)) { int error; String s; struct stat sbuf; INFMESSAGE(checking file) s = XtNewString(gv_filename); error = stat(s, &sbuf); if (!error && mtime != sbuf.st_mtime && sbuf.st_mtime < time(NULL)) cb_checkFile(NULL,(XtPointer)(CHECK_FILE_VERSION|CHECK_FILE_DATE),NULL); XtFree(s); } } if (timer) { XtRemoveTimeOut(timer); timer = (XtIntervalId) 0; } if (app_res.watch_file) { INFMESSAGE(adding timeout) timer = XtAppAddTimeOut(app_con,t,watch_file,(XtPointer)1); } ENDMESSAGE(watch_file) } void cb_watchFile(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data _GL_UNUSED) { BEGINMESSAGE(cb_watchFile) if (client_data) { app_res.watch_file = app_res.watch_file ? False : True; } watch_file(NULL,NULL); widgets_setSelectedBitmap(watchFileEntry,(app_res.watch_file ? 1 : 0)); ENDMESSAGE(cb_watchFile) } /*##################################################################*/ /* cb_print */ /*##################################################################*/ static char *make_pagelist(int mode) { Boolean mode_valid=False; char *pagelist=NULL; BEGINMESSAGE(make_pagelist) if (toc_text && (mode&(PAGE_MODE_CURRENT|PAGE_MODE_MARKED))) { char *tmp; pagelist = XtNewString(VlistVlist(newtoc)); if (mode&PAGE_MODE_MARKED) { tmp = pagelist; while (*tmp) if (*tmp++=='*') { mode_valid=True; break; } if (!mode_valid && (mode&PAGE_MODE_CURRENT)) mode=PAGE_MODE_CURRENT; } if (mode==PAGE_MODE_CURRENT) { tmp = pagelist; while (*tmp) { *tmp=' '; tmp++; } pagelist[current_page]='*'; mode_valid=True; } } if (!mode_valid) { XtFree(pagelist); pagelist=NULL; } ENDMESSAGE(make_pagelist) return pagelist; } static char *get_pagelist(int *modep) { char *pagelist=NULL; int mode= *modep; BEGINMESSAGE(get_pagelist) if (toc_text && (mode&(PAGE_MODE_CURRENT|PAGE_MODE_MARKED))) { if (mode&PAGE_MODE_MARKED) { pagelist=make_pagelist(PAGE_MODE_MARKED); if (pagelist) mode=PAGE_MODE_MARKED; } if (!pagelist && (mode&PAGE_MODE_CURRENT)) { pagelist=make_pagelist(PAGE_MODE_CURRENT); if (pagelist) mode=PAGE_MODE_CURRENT; } if (!pagelist) mode=PAGE_MODE_INVALID; } else if (mode==PAGE_MODE_ALL) { pagelist=NULL; /* all pages */ } else { mode=PAGE_MODE_INVALID; } *modep=mode; ENDMESSAGE(get_pagelist) return pagelist; } void cb_print(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data _GL_UNUSED) { char *prompt=GV_PRINT_MESSAGE; char *buttonlabel=GV_PRINT_BUTTON_LABEL; char *message; char *pagelist=NULL; BEGINMESSAGE(cb_print) if (!gv_filename) { INFMESSAGE(no file) ENDMESSAGE(cb_print) return; } gv_print_mode = (int)(intptr_t)client_data; pagelist=get_pagelist(&gv_print_mode); XtFree(pagelist); if (gv_print_mode==PAGE_MODE_INVALID) { INFMESSAGE(invalid print mode) ENDMESSAGE(cb_print) return; } if (app_res.confirm_print) { if (gv_print_mode==PAGE_MODE_MARKED) { message=GV_PRINT_MARKED_MESSAGE; INFMESSAGE(printing marked pages) } else if (gv_print_mode == PAGE_MODE_CURRENT) { message=GV_PRINT_PAGE_MESSAGE; INFMESSAGE(printing current page) } else { message=GV_PRINT_ALL_MESSAGE; INFMESSAGE(printing document) } DialogPopupSetPrompt(prompt); DialogPopupSetMessage(message); DialogPopupSetButton(DIALOG_BUTTON_DONE,buttonlabel,cb_doPrint); DialogPopupSetButton(DIALOG_BUTTON_CANCEL,NULL,cb_cancelPrint); DialogPopupSetText(gv_print_command); cb_popupDialogPopup((Widget)NULL,NULL,NULL); ENDMESSAGE(cb_print) return; } cb_doPrint((Widget)NULL,NULL,(XtPointer)gv_print_command); ENDMESSAGE(cb_print) } /*##################################################################*/ /* cb_print_pos */ /*##################################################################*/ void cb_print_pos(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data _GL_UNUSED) { char *pagelist=NULL; static char buf[MAX_LOCATOR_LENGTH]; BEGINMESSAGE(cb_print_pos) if (!gv_filename) { INFMESSAGE(no file) ENDMESSAGE(cb_print_pos) return; } gv_print_mode = (intptr_t)client_data; pagelist=get_pagelist(&gv_print_mode); XtFree(pagelist); DialogPopupSetMessage(putTexCommandLabel); DialogPopupSetPrompt(texCommandLabel); DialogPopupSetButton(DIALOG_BUTTON_DONE,"Save",cb_doPrintPos); DialogPopupSetButton(DIALOG_BUTTON_CANCEL,NULL,cb_cancelPrint); sprintf(buf, "\\PutAtPos(%i,%i){%s}", last_psx, last_psy, "") ; DialogPopupSetText(buf); cb_popupDialogPopup((Widget)NULL,NULL,NULL); ENDMESSAGE(cb_print_pos) } void cb_doPrintPos(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data) { String print_command; FILE* posfile = fopen(gv_savepos_filename, "a"); BEGINMESSAGE(cb_doPrintPos) if (call_data) print_command = (String)(call_data); /* dialog was not used */ print_command = DialogPopupGetText(); /* dialog was used */ if (!print_command) print_command=""; if (posfile == NULL) { INFMESSAGE(cannot open file for writting) ENDMESSAGE(cb_doPrintPos) return; } fprintf(posfile, "%s\n", print_command); fclose(posfile); cb_popdownNotePopup((Widget)NULL,(XtPointer)NULL,NULL); cb_popdownDialogPopup((Widget)NULL,(XtPointer)NULL,NULL); ENDMESSAGE(cb_doPrintPos) } /*##################################################################*/ /* cb_doPrint */ /*##################################################################*/ void cb_doPrint(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data) { String print_command; String error=NULL; char *pagelist=NULL; BEGINMESSAGE(cb_doPrint) if (call_data) print_command = (String)(call_data); /* dialog was not used */ else print_command = DialogPopupGetText(); /* dialog was used */ if (!print_command) print_command=""; SMESSAGE(print_command) cb_popdownNotePopup((Widget)NULL,(XtPointer)NULL,NULL); pagelist=get_pagelist(&gv_print_mode); if (gv_print_mode != PAGE_MODE_INVALID) { SaveData sd = save_allocSaveData(); sd->save_fn = NULL; sd->src_fn = gv_filename_unc ? XtNewString(gv_filename_unc) : XtNewString(gv_filename); sd->conv_fn = NULL; sd->pagelist = pagelist ? XtNewString(pagelist) : NULL; sd->print_cmd = print_command ? XtNewString(print_command) : NULL; sd->convert = gv_filename_dsc ? 1 : 0; sd->save_to_file = (gv_print_kills_file || pagelist) ? 1 : 0; sd->save_to_printer = 1; sd->print_kills_file = gv_print_kills_file; sd->scanstyle = gv_scanstyle; error = save_saveFile(sd); } if (error) { NotePopupShowMessage(error); XtFree(error); } else { cb_popdownDialogPopup((Widget)NULL,(XtPointer)NULL,NULL); } XtFree(pagelist); ENDMESSAGE(cb_doPrint) } /*##################################################################*/ /* cb_cancelPrint */ /*##################################################################*/ void cb_cancelPrint(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { BEGINMESSAGE(cb_cancelPrint) cb_popdownNotePopup((Widget)NULL,(XtPointer)NULL,NULL); cb_popdownDialogPopup((Widget)NULL,(XtPointer)NULL,NULL); ENDMESSAGE(cb_cancelPrint) } /*##################################################################*/ /* cb_save */ /*##################################################################*/ void cb_save(Widget w, XtPointer client_data, XtPointer call_data) { Arg args[10]; Cardinal n; char *title="Save"; char *buttonlabel; Widget button = XtNameToWidget(FileSel,"button2"); char *pagelist; char *name; char *path; char ext[20]; size_t pathlen; char default_path[GV_MAX_FILENAME_LENGTH]; BEGINMESSAGE(cb_save) gv_save_mode = (int)(intptr_t)client_data; pagelist=get_pagelist(&gv_save_mode); XtFree(pagelist); if (gv_save_mode==PAGE_MODE_INVALID) { INFMESSAGE(invalid save mode) ENDMESSAGE(cb_save) return; } path="."; if (!save_directory && app_res.default_save_dir) path=app_res.default_save_dir; else if (save_directory) path=save_directory; XawFileSelectionSetPath(FileSel,path); XawFileSelectionScan(FileSel,XawFileSelectionRescan); path = XawFileSelectionGetPath(FileSel); name = file_locateFilename(gv_filename_raw); ext[0]='\0'; if (gv_save_mode==PAGE_MODE_MARKED) { XawFileSelectionRemoveButton(FileSel, 3); buttonlabel=saveMarkedPagesLabel; INFMESSAGE(saving marked pages) strcpy(ext,"_pages"); } else if (gv_save_mode==PAGE_MODE_CURRENT) { XawFileSelectionRemoveButton(FileSel, 3); buttonlabel=saveCurrentPageLabel; INFMESSAGE(saving current page) if (0<=current_page && current_page <= 9998) sprintf(ext,"_page_%d",(current_page+1)); else strcpy(ext,"_page"); } else { buttonlabel=saveDocumentLabel; INFMESSAGE(saving all pages) if (gv_filename_dsc) { Widget button3; XawFileSelectionAddButton(FileSel, 3, cb_doSave, (XtPointer)FILE_TYPE_PDF); button3 = XtNameToWidget(FileSel,"button3"); n=0; XtSetArg(args[n], XtNlabel, saveAsPDFLabel); ++n; XtSetValues(button3,args,n); } } /* We assume the if ext was filled, then we'll definitely write PDF. */ name = XtNewString(name); if (gv_filename_dsc && *ext) name=file_pdfname2psname(name); pathlen = strlen(path)+strlen(name)+strlen(ext); if (pathlensave_fn = name ? XtNewString(name) : NULL; sd->src_fn = gv_filename_unc ? XtNewString(gv_filename_unc) : XtNewString(gv_filename); sd->conv_fn = NULL; sd->pagelist = pagelist ? XtNewString(pagelist) : NULL; sd->print_cmd = NULL; sd->convert = (gv_filename_dsc && type==FILE_TYPE_PS) ? 1 : 0; sd->save_to_file = 1; sd->save_to_printer = 0; sd->print_kills_file = gv_print_kills_file; sd->scanstyle = gv_scanstyle; error = save_saveFile(sd); } if (error) { NotePopupShowMessage(error); XtFree(error); } else { XtPopdown(FileSel_popup); } XtFree(pagelist); ENDMESSAGE(cb_doSave) } /*##################################################################*/ /* cb_openFile */ /*##################################################################*/ void cb_openFile(Widget w, XtPointer client_data _GL_UNUSED, XtPointer call_data) { Arg args[1]; Cardinal n; Widget button = XtNameToWidget(FileSel,"button2"); BEGINMESSAGE(cb_openFile) XawFileSelectionRemoveButton(FileSel, 3); n=0; XtSetArg(args[n], XtNtitle, openFileLabel); ++n; XtSetValues(FileSel_popup, args, n); n=0; XtSetArg(args[n], XtNlabel, openFileLabel); ++n; XtSetValues(button, args, n); XtRemoveAllCallbacks(button, XtNcallback); XtAddCallback(button, XtNcallback,cb_doOpenFile,NULL); { char *path="."; if (open_directory) path=open_directory; XawFileSelectionSetPath(FileSel,path); } XawFileSelectionScan(FileSel,XawFileSelectionRescan); XawFileSelectionPreferButton(FileSel,2); popup_positionPopup(FileSel_popup,viewFrame,POPUP_POSITION_POS,4,4); cb_popupPopup(w, (XtPointer)FileSel_popup, call_data); ENDMESSAGE(cb_openFile) } /*##################################################################*/ /* cb_doOpenFile */ /*##################################################################*/ void cb_doOpenFile(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { String name,error; BEGINMESSAGE(cb_doOpenFile) name = XawFileSelectionGetPath(FileSel); SMESSAGE(name) XtFree(open_directory); open_directory=file_getDirOfPath(name); SMESSAGE(open_directory) if ((error = misc_testFile(name))) { XawFileSelectionScan(FileSel,XawFileSelectionRescan); XtFree(error); } else { cb_popdownNotePopup((Widget)NULL,(XtPointer)NULL,NULL); XtPopdown(FileSel_popup); show_page(REQUEST_NEW_FILE,(XtPointer)name); } ENDMESSAGE(cb_doOpenFile) } /*##################################################################*/ /* cb_reopen */ /* Explicitly reopen the file. */ /*##################################################################*/ void cb_reopen(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { char *error=NULL; BEGINMESSAGE(reopen_file) if ((error = misc_testFile(gv_filename))) { NotePopupShowMessage(error); XtFree(error); } else { cb_popdownNotePopup((Widget)NULL,(XtPointer)NULL,NULL); show_page(REQUEST_REOPEN,NULL); } ENDMESSAGE(reopen_file) } /*##################################################################*/ /* cb_savepos */ /*##################################################################*/ void cb_savepos(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { FILE* posfile = fopen(gv_savepos_filename, "a"); BEGINMESSAGE(cb_savepos) if (posfile == NULL) { INFMESSAGE(cannot open file for writting) ENDMESSAGE(cb_savepos) return; } fprintf(posfile, "%i %i\n", last_psx, last_psy); fclose(posfile); ENDMESSAGE(cb_savepos) } /*##################################################################*/ /* cb_presentation */ /*##################################################################*/ void cb_presentation(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { int pid; sighandler_t sigold; BEGINMESSAGE(cb_presentation) sigold = signal(SIGCLD, SIG_IGN); /* Avoid zombies */ if (!(pid = fork())) { /* We have to close all open file descriptors so the child does not inherit them */ int i; for (i=3; i<256; i++) close(i); execl("/usr/bin/env", "env", gv_bin, "--presentation", gv_filename, (char*)0); printf("Cannot exec %s\n", gv_bin); exit(1); } signal(SIGCLD, sigold); /* restore signal handler */ ENDMESSAGE(cb_presentation) } /*##################################################################*/ /* cb_redisplay */ /*##################################################################*/ void cb_redisplay(Widget w, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { BEGINMESSAGE(cb_redisplay) if (w && (XtClass(w) == ghostviewWidgetClass) && (w != page)) { INFMESSAGE(redisplay on zoom widget not enabled) ENDMESSAGE(cb_redisplay) return; } show_page(REQUEST_REDISPLAY,NULL); ENDMESSAGE(cb_redisplay) } /*##################################################################*/ /* cb_page */ /*##################################################################*/ void cb_page(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data _GL_UNUSED) { int np; int cp; int k = 0; char *s; BEGINMESSAGE(cb_page) if (gv_filename && client_data) { s = (char*)client_data; if (*s=='-' || *s=='+') { k = 1; np = atoi(s); } else if (*s=='=' && *(s+1)=='h') { np = VlistHighlighted(newtoc); if (np >=0) { k=2; VlistChangeHighlighted(newtoc,np,XawVlistUnset); } } else { k = 2; if (!isdigit(*s)) s++; np = atoi(s)-1; } if ((k==1 && np) || k==2) { if (toc_text) { if (gv_pending_page_request>NO_CURRENT_PAGE) cp=gv_pending_page_request; else cp = VlistSelected(newtoc); np = np + ((k==1) ? cp : 0); np=doc_putPageInRange(doc,np); IIMESSAGE(np,current_page) misc_setPageMarker(np,0,NULL,True); if (np != current_page) show_page(np,NULL); } else { if (k==1 && np > 0) show_page(np,NULL); } } } ENDMESSAGE(cb_page) } /*##################################################################*/ /* cb_positionPage */ /*##################################################################*/ void cb_positionPage(Widget w, XtPointer client_data, XtPointer call_data _GL_UNUSED) { Widget clip,control,gvw; int clw,clh,cow,coh,px=0,py=0,x=0,y=0; Boolean center=False; Boolean scroll=False; Boolean have_pagepos=False; BEGINMESSAGE(cb_positionPage) if (w && (XtClass(w) == ghostviewWidgetClass)) { gvw = w; control = XtParent(w); clip = XtParent(control); } else { gvw = page; control = viewControl; clip = viewClip; } clw = (int)clip->core.width; clh = (int)clip->core.height; cow = (int)control->core.width; coh = (int)control->core.height; if ((int)(intptr_t)client_data) center = True; if (!center) have_pagepos=misc_restorePagePosition(&px,&py); if (app_res.auto_center == True) center = True; if (have_pagepos) { GhostviewReturnStruct grs; Position ocx,ocy,cx,cy; INFMESSAGE(using saved page position) cx = ((Position)clip->core.width)/2 - control->core.x - page->core.x; cy = ((Position)clip->core.height)/2 - control->core.y - page->core.y; GhostviewGetAreaOfBB (gvw,px,py,px,py,&grs); ocx = (int) grs.psx; ocy = (int) grs.psy; x = (int)control->core.x - (int)(ocx - cx); y = (int)control->core.y - (int)(ocy - cy); scroll=True; } else if (center) { INFMESSAGE(centering) x = -(cow - clw)/2; y = -(coh - clh)/2; scroll=True; } if (scroll) { INFIIMESSAGE(setting position to,x,y) ClipWidgetSetCoordinates(clip,x,y); } ENDMESSAGE(cb_positionPage) } /*##################################################################*/ /* cb_setPageMark */ /* Set/unset the 'page marked' property */ /*##################################################################*/ void cb_setPageMark(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data _GL_UNUSED) { int r=(int)(intptr_t)client_data; int entry=XawVlistInvalid,change=XawVlistInvalid; BEGINMESSAGE(cb_setPageMark) if (!toc_text) { INFMESSAGE(no toc) ENDMESSAGE(cb_setPageMark) return; } if (r & SPM_ALL) entry = XawVlistAll; else if (r & SPM_EVEN) entry = XawVlistEven; else if (r & SPM_ODD) entry = XawVlistOdd; else if (r & SPM_CURRENT) entry = XawVlistCurrent; if (r & SPM_MARK) change = XawVlistSet; else if (r & SPM_UNMARK) change = XawVlistUnset; else if (r & SPM_TOGGLE) change = XawVlistToggle; VlistChangeMark(newtoc,entry,change); ENDMESSAGE(cb_setPageMark) } /*##################################################################*/ /* cb_autoResize */ /*##################################################################*/ void cb_autoResize(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data _GL_UNUSED) { Arg args[1]; BEGINMESSAGE(cb_autoResize) if (client_data) { app_res.auto_resize = !(app_res.auto_resize); show_page(REQUEST_TOGGLE_RESIZE,NULL); } if (show_autoResize) { if (app_res.auto_resize) XtSetArg(args[0], XtNlabel,GV_AUTO_RESIZE_YES); else XtSetArg(args[0], XtNlabel,GV_AUTO_RESIZE_NO); XtSetValues(w_autoResize, args,ONE); } widgets_setSelectedBitmap(sizeEntry, app_res.auto_resize ? 1 : 0); ENDMESSAGE(cb_autoResize) } /*##################################################################*/ /* cb_setScale */ /*##################################################################*/ void cb_setScale(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data _GL_UNUSED) { int i=(int)(intptr_t)client_data; BEGINMESSAGE(cb_setScale) i = scale_checkScaleNum(gv_scales,i); if (i>=0) { if (i&SCALE_BAS) gv_scale_base = i&SCALE_VAL; else gv_scale = i&SCALE_VAL; } if (i>=0) { misc_savePagePosition(); show_page(REQUEST_NEW_SCALE,NULL); misc_resetPagePosition(); } ENDMESSAGE(cb_setScale) } /*##################################################################*/ /* cb_setOrientation */ /*##################################################################*/ void cb_setOrientation(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data) { int o = (int)(intptr_t) client_data; int changed = 1; BEGINMESSAGE(cb_setOrientation) switch (o) { case O_AUTOMATIC: INFMESSAGE(swapping auto orientation) if (gv_orientation_auto != 0) gv_orientation_auto = 0; else gv_orientation_auto = 1; break; case O_PORTRAIT: case O_SEASCAPE: case O_LANDSCAPE: case O_UPSIDEDOWN: gv_orientation = o; INFIMESSAGE(new orientation,gv_orientation) break; case O_SWAP_LANDSCAPE: INFMESSAGE(swapping landscape) if (gv_swap_landscape != 0) gv_swap_landscape = 0; else gv_swap_landscape = 1; break; default: INFMESSAGE(unknown orientation) changed = 0; break; } if (!call_data) { if (changed) { misc_savePagePosition(); if (gv_scales[gv_scale]->scale > 0 || app_res.auto_resize) show_page(REQUEST_NEW_ORIENTATION,NULL); else show_page(REQUEST_SETUP,NULL); misc_resetPagePosition(); } } ENDMESSAGE(cb_setOrientation) } /*##################################################################*/ /* cb_setPagemedia */ /*##################################################################*/ void cb_setPagemedia(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data) { int media = (int)(intptr_t)client_data; int media_bbox = doc ? doc->nummedia : 0; BEGINMESSAGE(cb_setPagemedia) if (media==MEDIA_ID_AUTO) { INFMESSAGE(toggling automatic media detection) gv_pagemedia_auto = gv_pagemedia_auto ? 0 : 1; } else if (media==media_bbox) { INFMESSAGE(changing to bounding box) if (doc_mediaIsOk(doc,current_page,media)) gv_pagemedia = media; else call_data = (XtPointer)1; } else { INFIMESSAGE(changing to pagemedia,media) gv_pagemedia = media; } if (!call_data) { if (gv_scales[gv_scale]->scale > 0 || app_res.auto_resize) show_page(REQUEST_NEW_PAGEMEDIA,NULL); else show_page(REQUEST_SETUP,NULL); } ENDMESSAGE(cb_setPagemedia) } /*##################################################################*/ /* cb_track */ /* track mouse pointer */ /*##################################################################*/ void cb_track(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data) { GhostviewReturnStruct *p = (GhostviewReturnStruct *)call_data; BEGINMESSAGE1(cb_track) /* locator events have zero width and height */ if ((p->width == 0)&&(p->height == 0)) { if (show_locator) { static char buf[MAX_LOCATOR_LENGTH]; static int x,y; if ((x != p->psx) || (y != p->psy) || (buf[0]='\0')) { sprintf(buf, app_res.locator_format, p->psx, p->psy); update_label(locator,buf); } x=p->psx; y=p->psy; } last_psx = p->psx; last_psy = p->psy; ENDMESSAGE1(cb_track) return; } ENDMESSAGE1(cb_track) } /*##################################################################*/ /* cb_message */ /* Process messages from ghostscript */ /* Refresh occurs when window was resized unexpectedly */ /*##################################################################*/ void cb_message(Widget w, XtPointer client_data, XtPointer call_data) { int i; char *error; BEGINMESSAGE(cb_message) if (!strcmp((char *) call_data, "Failed")) { INFMESSAGE(Failed) if ((Widget)client_data == page) { error = "\nError: PostScript interpreter failed in main window.\n\n"; } else { error = "\nError: PostScript interpreter failed in zoom window.\n\n"; } cb_appendInfoPopup((Widget)NULL,(XtPointer)NULL,(XtPointer)error); } else if (!strcmp((char *) call_data, "BadAlloc")) { INFMESSAGE(BadAlloc) if ((Widget)client_data == page) { error = "\nWarning: Could not allocate backing pixmap in main window.\n\n"; } else { error = "\nWarning: Could not allocate backing pixmap in zoom window.\n\n"; } cb_appendInfoPopup((Widget)NULL,(XtPointer)NULL,(XtPointer)error); } else if (!strcmp((char *) call_data, "Refresh")) { INFMESSAGE(Refresh) if (toc_text) { GhostviewSendPS(w, gv_psfile, doc->beginprolog, doc->lenprolog, False); GhostviewSendPS(w, gv_psfile, doc->beginsetup, doc->lensetup, False); if (doc->pageorder == DESCEND) i = (doc->numpages - 1) - current_page; else i = current_page; GhostviewSendPS(w, gv_psfile, doc->pages[i].begin, doc->pages[i].len, False); } } else if (!strcmp((char *) call_data, "Page")) { INFMESSAGE(completed page) if (w && (XtClass(w) == ghostviewWidgetClass) && (w != page)) { INFMESSAGE(killing interpreter in zoom window) GhostviewDisableInterpreter(w); } if ((gv_pending_page_request!=NO_CURRENT_PAGE) && (toc_text) && ((Widget)client_data == page)) { INFIMESSAGE(pending request for, gv_pending_page_request) show_page(gv_pending_page_request,NULL); } } ENDMESSAGE(cb_message) } /*##################################################################*/ /* cb_destroy */ /* Destroy popup window */ /*##################################################################*/ void cb_destroy(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data _GL_UNUSED) { BEGINMESSAGE(cb_destroy) XtDestroyWidget((Widget)client_data); ENDMESSAGE(cb_destroy) } /*------------------------------------------------------------------*/ /* cb_shutdown */ /*------------------------------------------------------------------*/ static void cb_shutdown(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { BEGINMESSAGE(cb_shutdown) if (gv_psfile) fclose(gv_psfile); if (gv_filename_dsc) unlink(gv_filename_dsc); if (gv_filename_unc) unlink(gv_filename_unc); process_kill_all_processes(); #if defined(DUMP_XTMEM) || defined(DUMP_MEM) XtFree(gv_filename_dsc); XtFree(gv_filename_unc); XtFree(gv_filename_old); XtFree(gv_filename_raw); XtFree(gv_filename); psfree(doc); psfree(olddoc); XtFree(gv_scales_res); magmenu_freeMagMenuEntries(gv_magmenu_entries); miscmenu_freeMiscMenuEntries(gv_miscmenu_entries); scale_freeScales(gv_scales); XtFree(gv_medias_res); media_freeMedias(gv_medias); XtFree(gv_user_defaults_file); XtFree(scaleEntry); XtFree(open_directory); XtFree(save_directory); XtFree(toc_text); XtFree(pagemediaEntry); XtFree(gv_dirs); XtFree(gv_filters); XtFree(gv_filter); XtFree(gv_magmenu_entries_res); XtFree(gv_miscmenu_entries_res); XtFree(gv_print_command); XtFree(gv_uncompress_command); XtFree(gv_gs_interpreter); XtFree(gv_gs_cmd_scan_pdf); XtFree(gv_gs_cmd_conv_pdf); XtFree(gv_gs_x11_device); XtFree(gv_gs_x11_alpha_device); XtFree(gv_gs_arguments); resource_freeData(); #endif XtDestroyApplicationContext(app_con); ENDMESSAGE(cb_shutdown) ENDMESSAGE(exiting gv) clean_safe_tempdir(); exit(EXIT_STATUS_NORMAL); } /*##################################################################*/ /* cb_destroyGhost */ /* destroy callback for Ghostview widgets. */ /* The disable interpreter call ensures that ghostscript is killed. */ /* Once the count goes to 0, we are sure that all forked processes have */ /* been killed and that we can safely exit. */ /*##################################################################*/ void cb_destroyGhost(Widget w, XtPointer client_data, XtPointer call_data _GL_UNUSED) { BEGINMESSAGE(cb_destroyGhost) GhostviewDisableInterpreter((Widget) client_data); num_ghosts--; if (num_ghosts) { ENDMESSAGE(cb_destroyGhost) return; } gv_exiting=1; if (dying) old_Xerror(XtDisplay(w), &bomb); /* Okay, okay, I'm a little pedantic. But I want to see the line MemDebug: Stack is CLEAN ! XtMemDebug: Stack is CLEAN ! when activating the memory debug routines. For this we have to ensure that all destroy routines of all widgets are executed before leaving the application. So we just create a new shell, hook a destroy callback to it and destroy it immediately. The trick is that the creation of the shell is delayed until the main loop next becomes idle; and this will be after the dust of the above destruction has settled down. */ toplevel = XtAppCreateShell("shutdown",gv_class,applicationShellWidgetClass,gv_display,NULL,0); XtAddCallback(toplevel,XtNdestroyCallback,cb_shutdown,(XtPointer)NULL); XtDestroyWidget(toplevel); } /*##################################################################*/ /* cb_quitGhostview */ /* Start application folding up by Destroying the top level widget. */ /* The application exits when the last interpreter is killed during */ /* a destroy callback from ghostview widgets. */ /*##################################################################*/ void cb_quitGhostview(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { char *message=NULL; BEGINMESSAGE(cb_quitGhostview) if (app_res.confirm_quit>=1) { message = process_disallow_quit(); if (message || app_res.confirm_quit>=2) { ConfirmPopupSetMessage("2", message); ConfirmPopupSetMessage("3", quitConfirmLabel); ConfirmPopupSetButton(CONFIRM_BUTTON_DONE,cb_doQuit); ConfirmPopupSetButton(CONFIRM_BUTTON_CANCEL,cb_cancelQuit); ConfirmPopupSetInitialButton(CONFIRM_BUTTON_CANCEL); cb_popupConfirmPopup((Widget)NULL,NULL,NULL); ENDMESSAGE(cb_quitGhostview) return; } } cb_doQuit((Widget)NULL,NULL,(XtPointer)NULL); ENDMESSAGE(cb_quitGhostview) } /*##################################################################*/ /* cb_cancelQuit */ /*##################################################################*/ void cb_cancelQuit(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { BEGINMESSAGE(cb_cancelQuit) cb_popdownConfirmPopup((Widget)NULL,(XtPointer)NULL,NULL); ENDMESSAGE(cb_cancelQuit) } /*##################################################################*/ /* cb_doQuit */ /*##################################################################*/ void cb_doQuit(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { BEGINMESSAGE(cb_doQuit) cb_popdownConfirmPopup((Widget)NULL,(XtPointer)NULL,NULL); XtUnmapWidget(toplevel); XtDestroyWidget(toplevel); ENDMESSAGE(cb_doQuit) } /*##################################################################*/ /* cb_setPassword */ /*##################################################################*/ static void cb_setPassword(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { String password; password = DialogPopupGetText(); if (!password) password=""; XtFree(gv_pdf_password); gv_pdf_password = XtNewString(password); cb_popdownDialogPopup((Widget)NULL,(XtPointer)NULL,NULL); cb_reopen(page,0,0); } /*##################################################################*/ /* cb_cancelPassword */ /*##################################################################*/ static void cb_cancelPassword(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { cb_popdownDialogPopup((Widget)NULL,(XtPointer)NULL,NULL); } /*##################################################################*/ /* cb_askPassword */ /* Ask for the password needed to view a pdf file */ /*##################################################################*/ void cb_askPassword(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { DialogPopupSetPrompt(passwordPromptLabel); DialogPopupSetMessage(passwordRequiredLabel); DialogPopupSetButton(DIALOG_BUTTON_DONE,NULL,cb_setPassword); DialogPopupSetButton(DIALOG_BUTTON_CANCEL,NULL,cb_cancelPassword); DialogPopupSetText(""); cb_popupDialogPopup((Widget)NULL,NULL,NULL); return; } gv-3.7.4/src/Aaa.h0000664000076400007640000001147511735103745010534 00000000000000/* * $XConsortium: Layout.h,v 1.2 92/01/22 18:03:05 keith Exp $ * * Copyright 1991 Massachusetts Institute of Technology * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of M.I.T. not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. M.I.T. makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T. * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Keith Packard, MIT X Consortium */ /* modified by Johannes Plass (plass@thep.physik.uni-mainz.de) ###jp### 02/06 */ #ifndef _Layout_h #define _Layout_h #include "paths.h" #include INC_X11(Constraint.h) #include INC_X11(Xfuncproto.h) /**************************************************************** * * Aaa Widget (SubClass of CompositeClass) * ****************************************************************/ /* RESOURCES: Name Class RepType Default Value ---- ----- ------- ------------- background Background Pixel XtDefaultBackground border BorderColor Pixel XtDefaultForeground borderWidth BorderWidth Dimension 1 cursor Cursor Cursor None destroyCallback Callback Pointer NULL height Height Dimension 0 mappedWhenManaged MappedWhenManaged Boolean True sensitive Sensitive Boolean True width Width Dimension 0 x Position Position 0 y Position Position 0 layout Layout Layout NULL debug Debug Boolean False resizeWidth Resize Boolean True ###jp### 11/94 resizeHeight Resize Boolean True ###jp### 11/94 maximumWidth MaximumWidth Dimension 0 ###jp### 11/94 maximumHeight MaximumHeight Dimension 0 ###jp### 11/94 minimumWidth MinimumWidth Dimension 0 ###jp### 11/94 minimumHeight MinimumHeight Dimension 0 ###jp### 11/94 */ /* CONSTRAINT RESOURCES: ###jp### 11/94 Name Class RepType Default Value ---- ----- ------- ------------- resizable Resizable Boolean True */ /* New Fields */ #define XtNlayout "layout" #define XtCLayout "Layout" #define XtRLayout "Layout" #define XtNdebug "debug" #define XtCDebug "Debug" #define XtNresizable "resizable" #define XtCResizable "Resizable" #define XtNresizeWidth "resizeWidth" #ifndef XtCResize # define XtCResize "Resize" #endif #define XtNresizeHeight "resizeHeight" #define XtNmaximumWidth "maximumWidth" #define XtCMaximumWidth "MaximumWidth" #define XtNmaximumHeight "maximumHeight" #define XtCMaximumHeight "MaximumHeight" #define XtNminimumWidth "minimumWidth" #define XtCMinimumWidth "MinimumWidth" #define XtNminimumHeight "minimumHeight" #define XtCMinimumHeight "MinimumHeight" #define XtNforcedWidth "forcedWidth" #define XtNforcedHeight "forcedHeight" /* Class record constant */ extern WidgetClass aaaWidgetClass; typedef struct _AaaClassRec *AaaWidgetClass; typedef struct _AaaRec *AaaWidget; _XFUNCPROTOBEGIN extern void AaaWidgetGetNaturalSize ( AaaWidget /* l */ , Dimension* /* widthp */ , Dimension* /* heightp */ ); extern void AaaWidgetAllowResize ( AaaWidget /* l */ , Boolean /* wflag */ , Boolean /* hflag */ ); #if 0 /*######### NOT USED ########*/ extern void AaaWidgetSetSizeBounds ( AaaWidget /* l */ , Dimension* /* minw_p */ , Dimension* /* minh_p */ , Dimension* /* maxw_p */ , Dimension* /* maxh_p */ ); extern void AaaWidgetGetSizeBounds ( AaaWidget /* l */ , Dimension* /* minw_p */ , Dimension* /* minh_p */ , Dimension* /* maxw_p */ , Dimension* /* maxh_p */ ); #endif /*######### NOT USED ########*/ _XFUNCPROTOEND #endif /* _Layout_h */ gv-3.7.4/src/main.c0000664000076400007640000015332311736064614010772 00000000000000/* ** ** main.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" #define _GV_MAIN_C_ /* #define MESSAGES */ #include "message.h" #include "config.h" #include #include #include #include #include #include #include "paths.h" #include INC_X11(Intrinsic.h) #include INC_X11(cursorfont.h) #include INC_X11(StringDefs.h) #include INC_X11(Shell.h) #include INC_X11(Xatom.h) #include INC_XAW(Cardinals.h) #include INC_XAW(SimpleMenu.h) #include INC_XAW(SmeBSB.h) #include INC_XAW(SmeLine.h) #include INC_XAW(Label.h) #include INC_XAW(Scrollbar.h) #include INC_XAW(XawInit.h) #include INC_XMU(Editres.h) #ifdef HAVE_LIBXINERAMA #include INC_EXT(Xinerama.h) #endif #include "Aaa.h" #include "Button.h" #include "Clip.h" #include "FileSel.h" #include "Frame.h" #include "Ghostview.h" #include "MButton.h" #include "Vlist.h" #include #include #include #include "types.h" #include "actions.h" #include "callbacks.h" #include "confirm.h" #include "dialog.h" #include "error.h" #include "file.h" #include "gv_message.h" #include "note.h" #include "info.h" #include "magmenu.h" #include "main_resources.h" #include "main_globals.h" #include "media.h" #include "misc.h" #include "miscmenu.h" #include "options.h" #include "options_gs.h" #include "options_gv.h" #include "options_setup.h" #include "popup.h" #include "process.h" #include "ps.h" #include "resource.h" #include "doc_misc.h" #include "version.h" #include "scale.h" #if defined(USE_SIGNAL_HANDLER) && (XtSpecificationRelease < 6) # undef USE_SIGNAL_HANDLER #endif #ifdef USE_SIGNAL_HANDLER # include "gv_signal.h" #endif /* USE_SIGNAL_HANDLER */ #define BITSOF(name) name ## _bits #define WIDTHOF(name) name ## _width #define HEIGHTOF(name) name ## _height #define BITMAP_ARGS(name)\ (const char*)BITSOF(name), WIDTHOF(name), HEIGHTOF(name) #include FALLBACK_ICON_PIXMAP #include FALLBACK_SELECTED_BITMAP #include FALLBACK_DOCUMENT_BITMAP #include FALLBACK_MARK_ODD_BITMAP #include FALLBACK_MARK_EVEN_BITMAP #include FALLBACK_MARK_CURRENT_BITMAP #include FALLBACK_MARK_UNMARK_BITMAP #include FALLBACK_MARK_EMPTY_BITMAP /********************************************************* GNU command line options **********************************************************/ enum { CENTER_ARG, NOCENTER_ARG, SCALE_ARG, MAGSTEP_ARG, SCALEBASE_ARG, RESIZE_ARG, NORESIZE_ARG, SWAP_ARG, NOSWAP_ARG, DSC_ARG, NODSC_ARG, EOF_ARG, NOEOF_ARG, WATCH_ARG, NOWATCH_ARG, AD_ARG, STYLE_ARG, ARGUMENTS_ARG, ANTIALIAS_ARG, NOANTIALIAS_ARG, SAFER_ARG, NOSAFER_ARG, SAFEDIR_ARG, NOSAFEDIR_ARG, PIXMAP_ARG, NOPIXMAP_ARG, COLOR_ARG, GRAYSCALE_ARG, HELP_ARG, QUIET_ARG, INFOSILENT_ARG, INFOERRORS_ARG, INFOALL_ARG, DEBUG_ARG, FULLSCREEN_ARG, PRESENTATION_ARG, MONOCHROME_ARG, NOQUIET_ARG, MEDIA_ARG, ORIENTATION_ARG, PAGE_ARG, PASSWORD_ARG, SPARTAN_ARG, WIDGETLESS_ARG, USAGE_ARG, VERSION_ARG }; static struct option const GNU_longOptions[] = { {"grayscale", no_argument, NULL, GRAYSCALE_ARG}, {"center", no_argument, NULL, CENTER_ARG}, {"nocenter", no_argument, NULL, NOCENTER_ARG}, {"scale", required_argument, NULL, SCALE_ARG}, {"magstep", required_argument, NULL, MAGSTEP_ARG}, {"scalebase", required_argument, NULL, SCALEBASE_ARG}, {"resize", no_argument, NULL, RESIZE_ARG}, {"noresize", no_argument, NULL, NORESIZE_ARG}, {"swap", no_argument, NULL, SWAP_ARG}, {"noswap", no_argument, NULL, NOSWAP_ARG}, {"dsc", no_argument, NULL, DSC_ARG}, {"nodsc", no_argument, NULL, NODSC_ARG}, {"eof", no_argument, NULL, EOF_ARG}, {"noeof", no_argument, NULL, NOEOF_ARG}, {"watch", no_argument, NULL, WATCH_ARG}, {"nowatch", no_argument, NULL, NOWATCH_ARG}, {"ad", required_argument, NULL, AD_ARG}, {"style", required_argument, NULL, STYLE_ARG}, {"arguments", required_argument, NULL, ARGUMENTS_ARG}, {"antialias", no_argument, NULL, ANTIALIAS_ARG}, {"noantialias", no_argument, NULL, NOANTIALIAS_ARG}, {"safer", no_argument, NULL, SAFER_ARG}, {"nosafer", no_argument, NULL, NOSAFER_ARG}, {"safedir", no_argument, NULL, SAFEDIR_ARG}, {"nosafedir", no_argument, NULL, NOSAFEDIR_ARG}, {"pixmap", no_argument, NULL, PIXMAP_ARG}, {"nopixmap", no_argument, NULL, NOPIXMAP_ARG}, {"color", no_argument, NULL, COLOR_ARG}, {"help", no_argument, NULL, HELP_ARG}, {"quiet", no_argument, NULL, QUIET_ARG}, {"infoSilent", no_argument, NULL, INFOSILENT_ARG}, {"infoErrors", no_argument, NULL, INFOERRORS_ARG}, {"infoAll", no_argument, NULL, INFOALL_ARG}, {"debug", no_argument, NULL, DEBUG_ARG}, {"fullscreen", no_argument, NULL, FULLSCREEN_ARG}, {"presentation", no_argument, NULL, PRESENTATION_ARG}, {"monochrome", no_argument, NULL, MONOCHROME_ARG}, {"noquiet", no_argument, NULL, NOQUIET_ARG}, {"media", required_argument, NULL, MEDIA_ARG}, {"orientation", required_argument, NULL, ORIENTATION_ARG}, {"page", required_argument, NULL, PAGE_ARG}, {"password", required_argument, NULL, PASSWORD_ARG}, {"usage", no_argument, NULL, USAGE_ARG}, {"spartan", no_argument, NULL, SPARTAN_ARG}, {"widgetless", no_argument, NULL, WIDGETLESS_ARG}, {"version", no_argument, NULL, VERSION_ARG}, {NULL, 0, NULL, 0} }; typedef struct menu_entry { Widget *widgetP; String name; XtCallbackProc callback; XtPointer client_data; } MenuEntry; static XtActionsRec actions[] = { { "GV_Antialias" , action_antialias }, { "GV_CheckFile" , action_checkFile }, { "GV_ConfigureNotify" , action_shellConfigureNotify }, { "GV_DeleteWindow" , action_deleteWindow }, { "GV_DismissPopup" , action_dismissPopup }, { "GV_EraseLocator" , action_eraseLocator }, { "GV_HandleDSC" , action_handleDSC }, { "GV_MagMenu" , magmenu_a_magMenu }, { "GV_MenuPopdown" , action_menuPopdown }, { "GV_MiscMenu" , miscmenu_a_miscMenu }, { "GV_MovePage" , action_movePage }, { "GV_Open" , action_open }, { "GV_OtherPage" , action_otherPage }, { "GV_Page" , action_page }, { "GV_Panner" , action_panner }, { "GV_Print" , action_print }, { "GV_PrintPos" , action_print_pos }, { "GV_Quit" , action_quit }, { "GV_Reopen" , action_reopen }, { "GV_SavePos" , action_savepos }, { "GV_Presentation" , action_presentation }, { "GV_Resizing" , action_autoResize }, { "GV_Save" , action_save }, { "GV_SetScale" , action_setScale }, { "GV_SetOrientation" , action_setOrientation }, { "GV_SetPageMark" , action_setPageMark }, { "GV_SetPageMedia" , action_setPagemedia }, { "GV_Toc" , action_toc }, { "GV_TogDialPrefBut" , action_preferDialogPopupButton }, { "GV_TogConfPrefBut" , action_preferConfirmPopupButton }, { "GV_WatchFile" , action_watchFile }, }; /*-------------------------------------------------------------- dummyCvtStringToPixmap Dummy String to Pixmap converter. Used to suppress warnings about missing String to Pixmap converter. Background: on Motif displays 'xrdb -q' shows resource entries "*topShadowPixmap: unspecified_pixmap" and "*bottomShadowPixmap: unspecified_pixmap". Since the ThreeD widget of Xaw3d also uses these resources without installing a converter we get tons of warnings. ###jp### --------------------------------------------------------------*/ static Boolean dummyCvtStringToPixmap(Display *dpy _GL_UNUSED, XrmValue *args _GL_UNUSED, Cardinal *num_args _GL_UNUSED, XrmValue *fromVal _GL_UNUSED, XrmValue *toVal _GL_UNUSED, XtPointer *converter_data _GL_UNUSED) { BEGINMESSAGE(dummyCvtStringToPixmap) # ifdef MESSAGES { char *name = (char*) fromVal->addr; INFSMESSAGE(will not convert,name) } # endif ENDMESSAGE(dummyCvtStringToPixmap) return(False); } /*### Procedure and Macro Declarations ###########################################*/ static void main_createMenu(MenuEntry*,Widget*,Cardinal*); void main_setGhostscriptResources(XrmDatabase); void main_setInternResource(XrmDatabase,String*,char*); void main_setResolutions(int); void main_createScaleMenu(void); #ifdef max # undef max #endif #define max(a,b) ((a)>(b)?(a):(b)) #ifdef min # undef min #endif #define min(a,b) ((a)<(b)?(a):(b)) /*################################################################################# Main #################################################################################*/ int main(int argc, char *argv[]) { MAINBEGINMESSAGE(main) gv_safe_gs_workdir = GV_LIBDIR "/safe-gs-workdir"; gv_safe_gs_tempdir = 0; { Arg args[20]; Cardinal n; int number; Widget cont_child[50]; Cardinal cont_child_num=0; Dimension maximum_width,maximum_height; unsigned int gwidth=0,gheight=0; int dim_forced; int c; /*### initializing global variables ####################################*/ INFMESSAGE(initializing global variables) gv_bin = argv[0]; gv_scroll_mode = SCROLL_MODE_NONE; gv_class = GV_CLASS; gv_pending_page_request=NO_CURRENT_PAGE; gv_gs_arguments = NULL; gv_psfile = NULL; gv_filename = NULL; gv_filename_unc = NULL; gv_filename_dsc = NULL; gv_filename_old = NULL; gv_filename_raw = NULL; toc_text = NULL; infopopup = NULL; confirmpopup = NULL; dialogpopup = NULL; notepopup = NULL; versionpopup = NULL; FileSel_popup = NULL; pagemediaEntry = NULL; gv_print_kills_file = 0; gv_infoSkipErrors = 0; antialias_p = 0; noantialias_p = 0; safer_p = 0; nosafer_p = 0; safedir_p = 0; nosafedir_p = 0; pixmap_p = 0; nopixmap_p = 0; color_p = 0; grayscale_p = 0; quiet_p = 0; infoverbose_p = -1; monochrome_p = 0; noquiet_p = 0; media_p = 0; orientation_p = 0; page_p = 0; spartan_p = 0; widgetless_p = 0; center_p = 0; nocenter_p = 0; scale_p = 0; magstep_p = 0; scalebase_p = 0; resize_p = 0; noresize_p = 0; swap_p = 0; noswap_p = 0; dsc_p = 0; nodsc_p = 0; eof_p = 0; noeof_p = 0; watch_p = 0; nowatch_p = 0; ad_p = 0; style_p = 0; arguments_p = 0; fullscreen_p = 0; ascale_p = 1.0; /*### initializing toolkit and the application context ########*/ /* Make sure that LC_NUMERIC is POSIX. LC_NUMERIC must not use locales like de_DE.UTF-8 or de_DE@euro where the decimal separator is ',' or gv will fail with the message "**** Unable to open the initial device, quitting." */ if (getenv("LC_ALL")) { char *locale; locale = getenv("LC_ALL"); gnu_gv_unsetenv("LC_ALL"); gnu_gv_setenv("LC_CTYPE", locale, 1); gnu_gv_setenv("LC_NUMERIC", locale, 1); gnu_gv_setenv("LC_TIME", locale, 1); gnu_gv_setenv("LC_COLLATE", locale, 1); gnu_gv_setenv("LC_MONETARY", locale, 1); gnu_gv_setenv("LC_MESSAGES", locale, 1); gnu_gv_setenv("LC_PAPER", locale, 1); gnu_gv_setenv("LC_NAME", locale, 1); gnu_gv_setenv("LC_ADDRESS", locale, 1); gnu_gv_setenv("LC_TELEPHONE", locale, 1); gnu_gv_setenv("LC_MEASUREMENT", locale, 1); gnu_gv_setenv("LC_IDENTIFICATION", locale, 1); } gnu_gv_setenv("LC_NUMERIC", "POSIX", 1); XtSetLanguageProc(NULL, NULL, NULL); INFMESSAGE(initializing toolkit and the application context) XtToolkitInitialize(); app_con = XtCreateApplicationContext(); XtAppAddActions(app_con, actions, XtNumber(actions)); /*### opening display #######################################################*/ INFMESSAGE(opening display) { /* The following doesn't work for XFILESEARCHPATH since stupid XtResolvePathname, when passed a NULL path, checks XFILESEARCHPATH only on the first call. (jp) */ const char *xufsp="XUSERFILESEARCHPATH"; char *xuf; xuf = getenv(xufsp); if (xuf) xuf = XtNewString(xuf); gnu_gv_setenv(xufsp,"___",1); gv_display = XtOpenDisplay(app_con,NULL,NULL,gv_class,NULL,0,&argc,argv); if (xuf) { gnu_gv_setenv(xufsp,xuf,1); XtFree(xuf); } else gnu_gv_unsetenv(xufsp); if (gv_display) XtGetApplicationNameAndClass(gv_display,&gv_name,&gv_class); SMESSAGE(gv_name) SMESSAGE(gv_class) } /*### Manage GNU command line arguments ########################*/ while ((c = getopt_long_only (argc, argv, "vhu", GNU_longOptions, NULL)) != -1) { switch (c) { case CENTER_ARG: center_p = 1; break; case NOCENTER_ARG: nocenter_p = 1; break; case SCALE_ARG: if (strstr(optarg, ".")) { scale_p = 1; scale_value = "-1002"; sscanf(optarg, "%f", &ascale_p); } else { scale_p = 1; scale_value = optarg; } break; case MAGSTEP_ARG: magstep_p = 1; magstep_value = optarg; break; case SCALEBASE_ARG: scalebase_p = 1; scalebase_value = optarg; break; case RESIZE_ARG: resize_p = 1; break; case NORESIZE_ARG: noresize_p = 1; break; case FULLSCREEN_ARG: fullscreen_p = 1; break; case PRESENTATION_ARG: fullscreen_p = 1; noresize_p = 1; widgetless_p = 1; scale_p = 1; scale_value = "-1000"; break; case SWAP_ARG: swap_p = 1; break; case NOSWAP_ARG: noswap_p = 1; break; case DSC_ARG: dsc_p = 1; break; case NODSC_ARG: nodsc_p = 1; break; case EOF_ARG: eof_p = 1; break; case NOEOF_ARG: noeof_p = 1; break; case WATCH_ARG: watch_p = 1; break; case NOWATCH_ARG: nowatch_p = 1; break; case AD_ARG: ad_p = 1; ad_value = optarg; break; case STYLE_ARG: style_p = 1; style_value = optarg; break; case ARGUMENTS_ARG: arguments_p = 1; arguments_value = optarg; break; case PIXMAP_ARG: pixmap_p = 1; break; case NOPIXMAP_ARG: nopixmap_p = 1; break; case SAFER_ARG: safer_p = 1; break; case NOSAFER_ARG: nosafer_p = 1; break; case SAFEDIR_ARG: safedir_p = 1; break; case NOSAFEDIR_ARG: nosafedir_p = 1; break; case ANTIALIAS_ARG: antialias_p = 1; break; case NOANTIALIAS_ARG: noantialias_p = 1; break; case COLOR_ARG: color_p = 1; break; case GRAYSCALE_ARG: grayscale_p = 1; break; case HELP_ARG: /* Show some help and return */ fprintf(stdout,"%s\n", message_usage); exit(0); case QUIET_ARG: quiet_p = 1; break; case INFOSILENT_ARG: infoverbose_p = 0; break; case INFOERRORS_ARG: infoverbose_p = 1; break; case INFOALL_ARG: infoverbose_p = 2; break; case DEBUG_ARG: debug_p = 1; break; case MONOCHROME_ARG: monochrome_p = 1; break; case NOQUIET_ARG: noquiet_p = 1; break; case MEDIA_ARG: { media_p = 1; media_value = optarg; break; } case ORIENTATION_ARG: { orientation_p = 1; orientation_value = optarg; break; } case PAGE_ARG: { page_p = 1; page_value = optarg; break; } case USAGE_ARG: /* Show usage */ fprintf(stdout,"%s\n", message_usage); exit(0); case PASSWORD_ARG: gv_pdf_password = XtNewString(optarg); break; case SPARTAN_ARG: spartan_p = 1; break; case WIDGETLESS_ARG: widgetless_p = 1; break; case VERSION_ARG: /* Show the program version */ fprintf(stdout,"%s\n", versionIdentification[0]); exit(0); default: /* Error, usage and exit */ fprintf(stdout, "%s\n", message_usage); exit(1); break; } } if (!gv_display) { fprintf(stderr, "%s: Unable to open the display.\n", GV_APPLICATION_NAME); exit(EXIT_STATUS_ERROR); } /*### getting resources ############################################*/ gv_database = resource_buildDatabase (gv_display, gv_class, gv_name, &argc,argv); /*### initializing widget set and creating application shell #########################*/ INFMESSAGE(initializing widget set) XawInitializeWidgetSet(); XtAppSetTypeConverter(app_con,XtRString,XtRPixmap,dummyCvtStringToPixmap,NULL,0,XtCacheNone,NULL); old_Xerror = XSetErrorHandler(catch_Xerror); wm_delete_window = XInternAtom(gv_display, "WM_DELETE_WINDOW", False); dim_forced=resource_checkGeometryResource(&gv_database,gv_class,gv_name); INFMESSAGE(creating the application shell) n=0; XtSetArg(args[n], XtNallowShellResize, (dim_forced?False:True));n++; XtSetArg(args[n], XtNtitle,versionIdentification[0]); n++; toplevel = XtAppCreateShell(NULL,gv_class,applicationShellWidgetClass,gv_display,args,n); /* support for Editres ###jp### 06/18/95 */ XtAddEventHandler(toplevel, (EventMask) 0, TRUE,_XEditResCheckMessages, (XtPointer)NULL); /*### getting application resources ####################################*/ INFMESSAGE(retrieving and analyzing application resources) XtGetApplicationResources(toplevel,(XtPointer) &app_res,resources,XtNumber(resources),NULL,ZERO); if (!resource_checkResources(gv_name,app_res.version,versionCompatibility)) { XtDestroyApplicationContext(app_con); exit(EXIT_STATUS_ERROR); } /*### initialization of global variables based on resource ##################*/ if (access(gv_safe_gs_workdir, R_OK | X_OK)) { char buffer[512]; strcpy(buffer, app_res.scratch_dir); strcat(buffer,"gv-safe-workdir-XXXXXX"); file_translateTildeInPath(buffer, sizeof(buffer)); gv_safe_gs_workdir = strdup(mkdtemp(buffer)); gv_safe_gs_tempdir = 1; if (!gv_safe_gs_workdir) { perror("Cannot create safe workdir"); exit(1); } } main_setGhostscriptResources(gv_database); main_setInternResource(gv_database,&gv_print_command,"printCommand"); { char* tmp_savepos_filename; main_setInternResource(gv_database,&tmp_savepos_filename,"saveposFilename"); strcpy(gv_savepos_filename, tmp_savepos_filename); file_translateTildeInPath(gv_savepos_filename, sizeof(gv_savepos_filename)); } main_setInternResource(gv_database,&gv_uncompress_command,"uncompressCommand"); gv_user_defaults_file = resource_userDefaultsFile(); gv_screen = XtScreen(toplevel); gv_scanstyle = 0; gv_scanstyle |= (app_res.ignore_eof ? SCANSTYLE_IGNORE_EOF : 0); gv_scanstyle |= (app_res.respect_dsc ? 0 : SCANSTYLE_IGNORE_DSC); if (dim_forced) app_res.auto_resize=False; app_res.minimum_width = app_res.minimum_width < 300 ? 300 : app_res.minimum_width; app_res.minimum_height = app_res.minimum_height < 300 ? 300 : app_res.minimum_height; gv_medias_res = resource_getResource(gv_database,gv_class,gv_name,"medias","Medias"); gv_medias_res = XtNewString(gv_medias_res); gv_medias = media_parseMedias(gv_medias_res); gv_num_std_pagemedia = media_numMedias(gv_medias); gv_magmenu_entries_res = resource_getResource(gv_database,gv_class,gv_name,"magMenu","MagMenu"); gv_magmenu_entries_res = XtNewString(gv_magmenu_entries_res); gv_magmenu_entries = magmenu_parseMagMenuEntries(gv_magmenu_entries_res); gv_miscmenu_entries_res = resource_getResource(gv_database,gv_class,gv_name,"miscMenuEntries","MiscMenuEntries"); gv_miscmenu_entries_res = XtNewString(gv_miscmenu_entries_res); gv_miscmenu_entries = miscmenu_parseMiscMenuEntries(gv_miscmenu_entries_res); gv_scales_res = resource_getResource(gv_database,gv_class,gv_name,"scales","Scales"); gv_scales_res = XtNewString(gv_scales_res); gv_scales = scale_parseScales(gv_scales_res); gv_scale_current = gv_scale_base_current = -1; gv_ascale = 1.0; if (app_res.scale == -1000) { int j; gv_scale = scale_checkScaleNum(gv_scales,0|SCALE_REL) & SCALE_VAL; for (j=0; gv_scales[j]; j++) if (!gv_scales[j]->scale) { gv_scale = j; break; } } else if (app_res.scale == -1001) { int j; gv_scale = scale_checkScaleNum(gv_scales,0|SCALE_REL) & SCALE_VAL; for (j=0; gv_scales[j]; j++) if (fabs(gv_scales[j]->scale+1) <= 0.001) { gv_scale = j; break; } gv_ascale = sqrt(ascale_p); } else if (app_res.scale == -1002) { int j; gv_scale = scale_checkScaleNum(gv_scales,0|SCALE_REL) & SCALE_VAL; for (j=0; gv_scales[j]; j++) if (fabs(gv_scales[j]->scale+2) <= 0.001) { gv_scale = j; break; } gv_ascale = sqrt(ascale_p); } else if (app_res.scale == -1003) { int j; gv_scale = scale_checkScaleNum(gv_scales,0|SCALE_REL) & SCALE_VAL; for (j=0; gv_scales[j]; j++) if (fabs(gv_scales[j]->scale+3) <= 0.001) { gv_scale = j; break; } gv_ascale = sqrt(ascale_p); } else { if (app_res.scale < 0) app_res.scale = (-app_res.scale)|SCALE_MIN; app_res.scale &= (SCALE_VAL|SCALE_MIN); gv_scale = scale_checkScaleNum(gv_scales,app_res.scale|SCALE_REL); if (gv_scale < 0) gv_scale = scale_checkScaleNum(gv_scales,0|SCALE_REL); gv_scale &= SCALE_VAL; } if (app_res.scale_base<1) app_res.scale_base = 1; app_res.scale_base &= SCALE_VAL; gv_scale_base = scale_checkScaleNum(gv_scales,(app_res.scale_base-1)|SCALE_BAS); if (gv_scale_base < 0) gv_scale_base = 0; gv_scale_base &= SCALE_VAL; if (app_res.confirm_quit < 0) app_res.confirm_quit = 0; else if (app_res.confirm_quit > 2) app_res.confirm_quit = 2; if (app_res.watch_file_frequency < 500) app_res.watch_file_frequency = 500; main_setResolutions(1); default_xdpi = gv_real_xdpi; default_ydpi = gv_real_ydpi; /*### creating bitmaps #####################################################*/ INFMESSAGE(setting the icon) { Pixmap icon_pixmap; XtSetArg(args[0], XtNiconPixmap, &icon_pixmap); XtGetValues(toplevel, args, 1); if (icon_pixmap == None) { icon_pixmap = XCreateBitmapFromData(gv_display, RootWindowOfScreen(gv_screen), BITMAP_ARGS(FALLBACK_ICON_NAME)); XtSetArg(args[0], XtNiconPixmap, icon_pixmap); XtSetValues(toplevel, args, 1); } } if (app_res.mark_odd_bitmap == None) app_res.mark_odd_bitmap = XCreateBitmapFromData(gv_display, RootWindowOfScreen(gv_screen), BITMAP_ARGS(FALLBACK_MARK_ODD_NAME)); if (app_res.mark_even_bitmap == None) app_res.mark_even_bitmap = XCreateBitmapFromData(gv_display, RootWindowOfScreen(gv_screen), BITMAP_ARGS(FALLBACK_MARK_EVEN_NAME)); if (app_res.mark_current_bitmap == None) app_res.mark_current_bitmap = XCreateBitmapFromData(gv_display, RootWindowOfScreen(gv_screen), BITMAP_ARGS(FALLBACK_MARK_CURRENT_NAME)); if (app_res.mark_unmark_bitmap == None) app_res.mark_unmark_bitmap = XCreateBitmapFromData(gv_display, RootWindowOfScreen(gv_screen), BITMAP_ARGS(FALLBACK_MARK_UNMARK_NAME)); if (app_res.mark_empty_bitmap == None) app_res.mark_empty_bitmap = XCreateBitmapFromData(gv_display, RootWindowOfScreen(gv_screen), BITMAP_ARGS(FALLBACK_MARK_EMPTY_NAME)); if (app_res.selected_bitmap == None) app_res.selected_bitmap = XCreateBitmapFromData(gv_display, RootWindowOfScreen(gv_screen), BITMAP_ARGS(FALLBACK_SELECTED_NAME)); if (app_res.document_bitmap == None) app_res.document_bitmap = XCreateBitmapFromData(gv_display, RootWindowOfScreen(gv_screen), BITMAP_ARGS(FALLBACK_DOCUMENT_NAME)); /*### Parsing maximum width, maximum height resources, creating control ####################*/ { char *pos; int width,height; char* max_size_screen = "screen"; INFMESSAGE(parsing maximum size resources) pos= strstr(app_res.maximum_width,max_size_screen); if (pos) { width=WidthOfScreen(gv_screen)+atoi(pos+strlen(max_size_screen)); } else { width=atoi(app_res.maximum_width); } maximum_width = (width > 0 ? (Dimension) width : 0); maximum_width = max(maximum_width,(Dimension)app_res.minimum_width); if (maximum_width<(Dimension)gwidth) maximum_width=(Dimension)gwidth; pos= strstr(app_res.maximum_height,max_size_screen); if (pos) { height=HeightOfScreen(gv_screen)+atoi(pos+strlen(max_size_screen)); } else { height=atoi(app_res.maximum_height); } maximum_height = (height > 0 ? (Dimension) height : 0); maximum_height = max(maximum_height,(Dimension)app_res.minimum_height); if (maximum_height<(Dimension)gheight) maximum_height=(Dimension)gheight; IIMESSAGE(maximum_width,maximum_height) INFMESSAGE(creating control) n=0; if (gwidth) { app_res.auto_resize=False; XtSetArg(args[n], XtNresizeWidth, False); n++; XtSetArg(args[n], XtNwidth, (Dimension)gwidth);n++; INFIMESSAGE(forcing width for control:,gwidth) } else { XtSetArg(args[n], XtNresizeWidth, True); n++; } if (gheight) { app_res.auto_resize=False; XtSetArg(args[n], XtNresizeHeight, False); n++; XtSetArg(args[n], XtNheight, (Dimension)gheight);n++; INFIMESSAGE(forcing height for control:,gheight) } else { XtSetArg(args[n], XtNresizeHeight, True); n++; } XtSetArg(args[n], XtNmaximumWidth, maximum_width); n++; XtSetArg(args[n], XtNmaximumHeight,maximum_height);n++; XtSetArg(args[n], XtNminimumWidth, (Dimension)app_res.minimum_width); n++; XtSetArg(args[n], XtNminimumHeight,(Dimension)app_res.minimum_height);n++; main_control = XtCreateWidget("control",aaaWidgetClass,toplevel,args,n); } /*### Creating the Menus ###############################################################*/ INFMESSAGE(menus) { MenuEntry m[] = { { &fileButton, "fileButton", NULL , NULL}, { &fileMenu, "menu", NULL ,NULL}, { &openEntry, "open", cb_openFile, NULL}, { &reopenEntry, "reopen", cb_reopen, NULL}, { &saveposEntry, "savepos", cb_savepos, NULL}, { &updateEntry, "update", cb_checkFile, (XtPointer)CHECK_FILE_VERSION }, { NULL, "line", NULL, NULL }, { &printAllEntry, "printAllPages", cb_print, (XtPointer)PAGE_MODE_ALL}, { &printMarkedEntry, "printMarkedPages",cb_print , (XtPointer)(PAGE_MODE_MARKED|PAGE_MODE_CURRENT)}, { &saveAllEntry, "saveAllPages", cb_save, (XtPointer)PAGE_MODE_ALL}, { &saveMarkedEntry, "saveMarkedPages",cb_save , (XtPointer)(PAGE_MODE_MARKED|PAGE_MODE_CURRENT)}, { NULL, "line", NULL, NULL }, { ©rightEntry, "copyright", cb_popupVersionPopup, NULL}, { NULL, "line", NULL, NULL }, { &quitEntry, "quit", cb_quitGhostview, NULL}, { NULL, NULL, NULL, NULL }, }; main_createMenu(m,cont_child,&cont_child_num); } { MenuEntry m[] = { { &stateButton, "stateButton",NULL ,NULL}, { &stateMenu, "menu", NULL, NULL}, { &stopEntry, "stop", cb_stopInterpreter, NULL}, { &dscEntry, "dsc", cb_handleDSC, (XtPointer)1}, { &eofEntry, "eof", cb_handleEOF, (XtPointer)1}, { &antialiasEntry, "antialias", cb_antialias, (XtPointer)1}, { &watchFileEntry, "watchFile", cb_watchFile, (XtPointer)1}, { &sizeEntry, "size", cb_autoResize, (XtPointer)1}, { NULL, "line", NULL, NULL }, { &optiongvEntry, "optionsgv", NULL, NULL}, { &optiongsEntry, "optionsgs", NULL, NULL}, { &optionfsEntry, "optionsfs", NULL, NULL}, { &optionsetupEntry,"optionssetup", NULL, NULL}, { NULL, "line", NULL, NULL }, { &presentationEntry, "presentation", cb_presentation, NULL}, { NULL, NULL, NULL, NULL }, }; main_createMenu(m,cont_child,&cont_child_num); XtAddCallback(optionfsEntry, XtNcallback,options_cb_popup,(XtPointer)gv_options_fs); XtAddCallback(optiongvEntry, XtNcallback,options_cb_popup,(XtPointer)gv_options_gv); XtAddCallback(optiongsEntry, XtNcallback,options_cb_popup,(XtPointer)gv_options_gs); XtAddCallback(optionsetupEntry, XtNcallback,options_cb_popup,(XtPointer)gv_options_setup); cb_handleDSC(dscEntry,NULL,NULL); cb_handleEOF(eofEntry,NULL,NULL); cb_antialias(dscEntry,NULL,NULL); } { MenuEntry m[] = { { &pageButton, "pageButton", NULL, NULL}, { &pageMenu, "menu", NULL, NULL}, { &nextEntry, "next", cb_page, "+1"}, { &redisplayEntry, "redisplay", cb_redisplay, NULL}, { &prevEntry, "prev", cb_page, "-1"}, { NULL, "line", NULL, NULL }, { ¢erEntry, "center", cb_positionPage, (XtPointer)1}, { NULL, "line", NULL, NULL }, { ¤tEntry, "current" , cb_setPageMark, (XtPointer)(SPM_CURRENT|SPM_TOGGLE) }, { &oddEntry , "odd" , cb_setPageMark, (XtPointer)(SPM_ODD|SPM_TOGGLE) }, { &evenEntry , "even" , cb_setPageMark, (XtPointer)(SPM_EVEN|SPM_TOGGLE) }, { &unmarkEntry , "unmark" , cb_setPageMark, (XtPointer)(SPM_ALL|SPM_UNMARK) }, { NULL, NULL, NULL, NULL }, }; main_createMenu(m,cont_child,&cont_child_num); } { MenuEntry m[] = { { &orientationButton, "orientationButton", NULL, NULL}, { &orientationMenu, "menu", NULL, NULL}, { &autoOrientEntry, "automatic", cb_setOrientation, (XtPointer)O_AUTOMATIC}, { NULL, "line", NULL, NULL }, { &portraitEntry, "portrait", cb_setOrientation, (XtPointer)O_PORTRAIT}, { &landscapeEntry, "landscape", cb_setOrientation, (XtPointer)O_LANDSCAPE}, { &upsidedownEntry, "upsidedown",cb_setOrientation , (XtPointer)O_UPSIDEDOWN}, { &seascapeEntry, "seascape", cb_setOrientation, (XtPointer)O_SEASCAPE}, { NULL, "line", NULL, NULL }, { &swapEntry, "swap", cb_setOrientation, (XtPointer)O_SWAP_LANDSCAPE}, { NULL, NULL, NULL, NULL }, }; main_createMenu(m,cont_child,&cont_child_num); } { n=0; XtSetArg(args[n], XtNresize, True); n++; pagemediaButton = XtCreateWidget("pagemediaButton",mbuttonWidgetClass,main_control,args,n); cont_child[cont_child_num] = pagemediaButton; cont_child_num++; } { n=0; XtSetArg(args[n], XtNresize, False); n++; processButton = XtCreateWidget("processButton", mbuttonWidgetClass,main_control,args,n); cont_child[cont_child_num] = processButton; cont_child_num++; processMenu=NULL; } n=0; scaleButton = XtCreateWidget("scaleButton",mbuttonWidgetClass,main_control,args,n); cont_child[cont_child_num] =scaleButton; cont_child_num++; main_createScaleMenu(); /*### Optional Widgets ##############################################################*/ { char *layout; char *widgetname; layout = resource_getResource(gv_database,gv_class,gv_name,"control.layout","Aaa.Layout"); #if 0 if (!layout) { fprintf(stderr," %s: Error, layout resource not found\n",versionIdentification[0]); clean_safe_tempdir(); exit(EXIT_STATUS_ERROR); } #endif { int i=0; struct { Widget *widget; Bool *show; String name; XtCallbackProc callback; XtPointer client_data; } b[] = { { &w_nextPage , &show_nextPage , "nextPage" , NULL , (XtPointer)NULL }, { &w_prevPage , &show_prevPage , "prevPage" , NULL , (XtPointer)NULL }, { &w_toggleCurrentPage , &show_toggleCurrentPage , "toggleCurrent" , cb_setPageMark , (XtPointer)(SPM_CURRENT|SPM_TOGGLE) }, { &w_toggleEvenPages , &show_toggleEvenPages , "toggleEven" , cb_setPageMark , (XtPointer)(SPM_EVEN|SPM_TOGGLE) }, { &w_toggleOddPages , &show_toggleOddPages , "toggleOdd" , cb_setPageMark , (XtPointer)(SPM_ODD|SPM_TOGGLE) }, { &w_unmarkAllPages , &show_unmarkAllPages , "unmarkAll" , cb_setPageMark , (XtPointer)(SPM_ALL|SPM_UNMARK) }, { &w_printMarkedPages , &show_printMarkedPages , "printMarked" , cb_print , (XtPointer)(PAGE_MODE_MARKED|PAGE_MODE_CURRENT)}, { &w_printAllPages , &show_printAllPages , "printAll" , cb_print , (XtPointer)PAGE_MODE_ALL }, { &w_saveMarkedPages , &show_saveMarkedPages , "saveMarked" , cb_save , (XtPointer)(PAGE_MODE_MARKED|PAGE_MODE_CURRENT)}, { &w_saveAllPages , &show_saveAllPages , "saveAll" , cb_save , (XtPointer)PAGE_MODE_ALL }, { &w_openFile , &show_openFile , "openFile" , cb_openFile , (XtPointer)NULL }, { &w_autoResize , &show_autoResize , "autoResize" , cb_autoResize , (XtPointer)1 }, { &w_showThisPage , &show_showThisPage , "redisplay" , cb_redisplay , (XtPointer)NULL }, { &w_updateFile , &show_updateFile , "updateFile" , cb_checkFile , (XtPointer)CHECK_FILE_VERSION }, { &w_checkFile , &show_checkFile , "checkFile" , cb_checkFile , (XtPointer)CHECK_FILE_DATE }, { NULL , NULL , NULL , NULL , NULL }, }; INFMESSAGE(optional widgets: buttons) n=0; XtSetArg(args[n], XtNresize, True); n++; while (b[i].widget) { INFSMESSAGE(creating widget,b[i].name) *(b[i].show) = strstr(layout,b[i].name) ? True : False; if (*(b[i].show)) { *(b[i].widget) = XtCreateWidget(b[i].name,buttonWidgetClass,main_control,args,n); if (b[i].callback) XtAddCallback(*(b[i].widget),XtNcallback,b[i].callback,b[i].client_data); cont_child[cont_child_num] = *(b[i].widget); cont_child_num++; } ++i; } #define SET_BITMAP(w,s,b)\ if ((s) && (b)!= None) {\ n=0;\ XtSetArg(args[n], XtNbitmap, (b)); n++;\ XtSetValues((w),args,n);\ } SET_BITMAP(w_toggleCurrentPage,show_toggleCurrentPage,app_res.mark_current_bitmap) SET_BITMAP(w_toggleEvenPages,show_toggleEvenPages,app_res.mark_even_bitmap) SET_BITMAP(w_toggleOddPages,show_toggleOddPages,app_res.mark_odd_bitmap) SET_BITMAP(w_unmarkAllPages,show_unmarkAllPages,app_res.mark_unmark_bitmap) #undef SET_BITMAP cb_autoResize(sizeEntry,NULL,NULL); } INFMESSAGE(optional widgets: informational widgets) # define _mw_(widget,show,name) \ widgetname=name; \ show = strstr(layout,widgetname) ? True : False; \ if (show) { \ widget = XtCreateWidget(widgetname,mbuttonWidgetClass,main_control,args,n);\ cont_child[cont_child_num] = widget; cont_child_num++; \ } n=0; XtSetArg(args[n], XtNresize, True); n++; _mw_( titlebutton , show_title , "titleButton" ); _mw_( datebutton , show_date , "dateButton" ); widgetname="locator"; show_locator = strstr(layout,widgetname) ? True : False; if (show_locator) { char buf[MAX_LOCATOR_LENGTH]; sprintf(buf,app_res.locator_format,9999,9999); XtSetArg(args[n], XtNlabel,buf); n++; locator = XtCreateWidget(widgetname,labelWidgetClass,main_control,args,n); cont_child[cont_child_num] =locator; cont_child_num++; } # undef _mw_ INFMESSAGE(panner) widgetname="pannerFrame"; show_panner = strstr(layout,widgetname) ? True : False; if (show_panner) { n=0; pannerFrame = XtCreateWidget("pannerFrame",frameWidgetClass,main_control,args,n); cont_child[cont_child_num] = pannerFrame; cont_child_num++; n=0; panner = XtCreateManagedWidget("panner", compositeWidgetClass,pannerFrame, args, n); n=0; XtSetArg(args[n], XtNresize,False); n++; XtSetArg(args[n], XtNlabel,""); n++; slider = XtCreateManagedWidget("slider", labelWidgetClass,panner, args, n); } } /* end of optional widgets */ /*### Table of Contents ###########################################################*/ INFMESSAGE(table of contents) n=0; newtocFrame = XtCreateWidget("newtocFrame",frameWidgetClass,main_control,args,n); cont_child[cont_child_num] = newtocFrame; cont_child_num++; n=0; newtocClip = XtCreateManagedWidget("newtocClip", clipWidgetClass,newtocFrame, args, n); n=0; newtocControl = XtCreateManagedWidget("newtocControl", aaaWidgetClass,newtocClip, args, n); n=0; newtoc = XtCreateManagedWidget("newtoc", vlistWidgetClass,newtocControl, args, n); XtAddCallback(newtoc, XtNreportCallback,cb_newtocVisibleAdjust, (XtPointer)NULL); n=0; newtocScroll = XtCreateWidget("newtocScroll", scrollbarWidgetClass,main_control, args, n); XtAddCallback(newtocScroll, XtNscrollProc,cb_newtocScrollbar, (XtPointer)1); XtAddCallback(newtocScroll, XtNjumpProc,cb_newtocScrollbar, (XtPointer)2); cont_child[cont_child_num] = newtocScroll; cont_child_num++; /*### The Page View ###########################################################*/ INFMESSAGE(viewport) n=0; viewFrame = XtCreateWidget("viewFrame", frameWidgetClass,main_control,args,n); cont_child[cont_child_num] = viewFrame; cont_child_num++; n=0; viewClip = XtCreateManagedWidget("viewClip", clipWidgetClass,viewFrame,args,n); if (show_panner) XtAddCallback(viewClip, XtNreportCallback,cb_adjustSlider,(XtPointer)NULL); XtAddCallback(viewClip, XtNreportCallback,cb_pageAdjustNotify,(XtPointer)NULL); n=0; viewControl = XtCreateManagedWidget("viewControl", aaaWidgetClass,viewClip,args,n); { Boolean b; n=0; XtSetArg(args[n], XtNinterpreter,gv_gs_interpreter); n++; b = gv_gs_safeDir ? True : False; XtSetArg(args[n], XtNsafeDir,b); n++; b = gv_gs_safer ? True : False; XtSetArg(args[n], XtNsafer,b); n++; b = gv_gs_quiet ? True : False; XtSetArg(args[n], XtNquiet,b); n++; XtSetArg(args[n], XtNinfoVerbose,gv_infoVerbose); n++; b = app_res.use_bpixmap ? True : False; XtSetArg(args[n], XtNuseBackingPixmap,b); n++; XtSetArg(args[n], XtNarguments,gv_gs_arguments); n++; XtSetArg(args[n], XtNlxdpi, (1000*default_xdpi)); n++; XtSetArg(args[n], XtNlydpi, (1000*default_ydpi)); n++; page = XtCreateManagedWidget("page", ghostviewWidgetClass,viewControl, args,n); num_ghosts++; XtAddCallback(page, XtNcallback, cb_track, (XtPointer)NULL); XtAddCallback(page, XtNdestroyCallback, cb_destroyGhost, (XtPointer)page); XtAddCallback(page, XtNmessageCallback, cb_message, (XtPointer)page); XtAddCallback(page, XtNoutputCallback,cb_appendInfoPopup, (XtPointer)NULL); } /*### checking gv_filename and opening psfile #############################*/ INFMESSAGE(checking gv_filename and opening psfile) if (argc == optind + 1) { gv_filename=XtNewString(argv[optind]); } if (gv_filename && strcmp(gv_filename, "-")) { if (misc_changeFile(gv_filename)) { open_fail_error(errno,GV_ERROR_OPEN_FAIL,gv_filename,1); clean_safe_tempdir(); exit(EXIT_STATUS_ERROR); } else { XtFree(gv_filename_old); gv_filename_old = NULL; } } /*### remaining initialization #####################################################*/ INFMESSAGE(remaining initialization) #ifdef USE_SIGNAL_HANDLER signal_setSignalHandlers(1); #endif GhostviewDisableInterpreter(page); gv_pagemedia = MEDIA_ID_INVALID; setup_ghostview(); { int o; gv_orientation_old = O_UNSPECIFIED; o = doc_convStringToDocOrient(app_res.default_orientation); if (o == O_AUTOMATIC) { gv_orientation_auto = 1; gv_orientation_auto_old = 0; gv_orientation = O_UNSPECIFIED; } else { gv_orientation_auto = 0; gv_orientation_auto_old = 1; gv_orientation = o; } } gv_fallback_orientation = doc_convStringToDocOrient(app_res.fallback_orientation); if (gv_fallback_orientation != O_PORTRAIT && gv_fallback_orientation != O_LANDSCAPE && gv_fallback_orientation != O_UPSIDEDOWN && gv_fallback_orientation != O_SEASCAPE) gv_fallback_orientation = O_PORTRAIT; gv_fallback_pagemedia = doc_convStringToPageMedia(NULL,app_res.fallback_pagemedia); if (gv_fallback_pagemedia == MEDIA_ID_INVALID) gv_fallback_pagemedia = doc_convStringToPageMedia(NULL,"A4"); if (gv_fallback_pagemedia == MEDIA_ID_INVALID) { gv_fallback_pagemedia=1; while (!gv_medias[gv_fallback_pagemedia]->used) gv_fallback_pagemedia++; } gv_swap_landscape_old = -1; if (app_res.swap_landscape) gv_swap_landscape = 1; else gv_swap_landscape = 0; gv_exiting = 0; number = doc_convStringToPage(doc,app_res.page); number = doc_putPageInRange(doc,number); /*### managing the children ######################################################*/ INFMESSAGE(managing children of control) XtManageChildren((WidgetList)cont_child,cont_child_num); INFMESSAGE(managing control) XtManageChild(main_control); XtSetMappedWhenManaged(toplevel, False); INFMESSAGE(realizing toplevel) XtRealizeWidget(toplevel); XSetWMProtocols(gv_display, XtWindow(toplevel), &wm_delete_window, 1); /*### Creating the File Selection Popup ###########################################*/ INFMESSAGE(creating file selection popup) n=0; XtSetArg(args[n], XtNallowShellResize,True);n++; FileSel_popup = XtCreatePopupShell("fileSelPopup",transientShellWidgetClass,toplevel,args,n); n=0; XtSetArg(args[n], XtNbuttons, 2); n++; XtSetArg(args[n], XtNpreferredButton, 2); n++; XtSetArg(args[n], XtNreverseScrolling,app_res.reverse_scrolling);n++; if (app_res.scratch_dir) { XtSetArg(args[n], XtNtmpDir, app_res.scratch_dir); n++; } FileSel = XtCreateManagedWidget("fileSel",file_selectionWidgetClass,FileSel_popup,args,n); XtAddCallback(XtNameToWidget(FileSel,"button1"), XtNcallback,cb_popdownPopup,FileSel_popup); XtAddCallback(XtNameToWidget(FileSel,"button1"), XtNcallback,cb_popdownNotePopup,(XtPointer)NULL); XtRealizeWidget(FileSel_popup); XSetWMProtocols(gv_display,XtWindow(FileSel_popup),&wm_delete_window,1); n=0; XtSetArg(args[n], XtNfilters, &gv_filters); n++; XtSetArg(args[n], XtNdirs, &gv_dirs); n++; XtSetArg(args[n], XtNfilter, &gv_filter); n++; XtGetValues(FileSel,args,n); gv_filters = XtNewString(gv_filters); gv_dirs = XtNewString(gv_dirs); gv_filter = XtNewString(gv_filter); /*### now we become visible ######################################################*/ INFMESSAGE(switching off resize for buttons and labels) n=0; XtSetArg(args[0], XtNresize, False); n++; if (show_nextPage) XtSetValues(w_nextPage,args,n); if (show_prevPage) XtSetValues(w_prevPage,args,n); if (show_toggleCurrentPage) XtSetValues(w_toggleCurrentPage,args,n); if (show_toggleEvenPages) XtSetValues(w_toggleEvenPages,args,n); if (show_toggleOddPages) XtSetValues(w_toggleOddPages,args,n); if (show_unmarkAllPages) XtSetValues(w_unmarkAllPages,args,n); if (show_saveMarkedPages) XtSetValues(w_saveMarkedPages,args,n); if (show_printMarkedPages) XtSetValues(w_printMarkedPages,args,n); if (show_printAllPages) XtSetValues(w_printAllPages,args,n); if (show_openFile) XtSetValues(w_openFile,args,n); if (show_autoResize) XtSetValues(w_autoResize,args,n); if (show_showThisPage) XtSetValues(w_showThisPage,args,n); if (show_updateFile) XtSetValues(w_updateFile,args,n); if (show_checkFile) XtSetValues(w_checkFile,args,n); if (show_locator) { XtSetArg(args[n], XtNlabel,""); n++; XtSetValues(locator,args,n); } process_menu(NULL,PROCESS_MENU_HIDE); /* hide the process button */ setup_layout_ghostview(); if (gv_filename) current_page=number; show_page(REQUEST_SETUP,NULL); cb_watchFile(watchFileEntry,NULL,NULL); /* must allow control to resize */ AaaWidgetAllowResize((AaaWidget)main_control,True,True); if (fullscreen_p) { Atom net_wm_state; net_wm_state = XInternAtom(XtDisplay(toplevel), "_NET_WM_STATE", True); if (net_wm_state != None) { Atom wm_fullstate; wm_fullstate = XInternAtom(XtDisplay(toplevel), "_NET_WM_STATE_FULLSCREEN", False); XtRealizeWidget(toplevel); XChangeProperty(XtDisplay(toplevel), XtWindow(toplevel), net_wm_state, XA_ATOM, 32, PropModeReplace, (unsigned char *)&wm_fullstate, 1); } } INFMESSAGE(mapping toplevel) XtMapWidget(toplevel); cb_showTitle(toplevel, NULL, NULL); } INFMESSAGE(waiting for events now) XtAppMainLoop(app_con); /* should never get here */ return 1; } /*-------------------------------------------------- main_createMenu --------------------------------------------------*/ static void main_createMenu(m,list,numP) MenuEntry *m; Widget *list; Cardinal *numP; { Arg args[1]; Cardinal n; int i; BEGINMESSAGE(main_createMenu) SMESSAGE(m[0].name) n=0; *(m[0].widgetP) = XtCreateManagedWidget(m[0].name,mbuttonWidgetClass,main_control,args,n); list[*numP] = *(m[0].widgetP); (*numP)++; n=0; *(m[1].widgetP) = XtCreatePopupShell(m[1].name, simpleMenuWidgetClass,*(m[0].widgetP),args,n); i=2; while (m[i].name) { if (!strcmp(m[i].name,"line")) { XtCreateManagedWidget("line", smeLineObjectClass,*(m[1].widgetP),args,n); } else { *(m[i].widgetP) = XtCreateManagedWidget(m[i].name, smeBSBObjectClass,*(m[1].widgetP),args,n); if (m[i].callback) XtAddCallback(*(m[i].widgetP), XtNcallback,m[i].callback,m[i].client_data); } ++i; } ENDMESSAGE(main_createMenu) } /*################################################## main_setInternResource ##################################################*/ void main_setInternResource(db,sP,name) XrmDatabase db; String *sP; char *name; { BEGINMESSAGE(main_setInternResource) *sP = resource_getResource(db,gv_class,gv_class,name,NULL); if (!*sP) *sP=""; *sP = XtNewString(*sP); ENDMESSAGE(main_setInternResource) } /*################################################## main_setGhostscriptResources ##################################################*/ void main_setGhostscriptResources(db) XrmDatabase db; { char *s; BEGINMESSAGE(main_setGhostscriptResources) main_setInternResource(db,&gv_gs_interpreter,"gsInterpreter"); main_setInternResource(db,&gv_gs_cmd_scan_pdf,"gsCmdScanPDF"); main_setInternResource(db,&gv_gs_cmd_conv_pdf,"gsCmdConvPDF"); main_setInternResource(db,&gv_gs_x11_device,"gsX11Device"); main_setInternResource(db,&gv_gs_x11_alpha_device,"gsX11AlphaDevice"); main_setInternResource(db,&gv_gs_arguments,"gsArguments"); s = resource_getResource(db,gv_class,gv_name,"arguments","Arguments"); if (s) gv_gs_arguments = s; s = resource_getResource(db,gv_class,gv_name,"gsSafeDir",NULL); if (!strcasecmp(s,"true")) gv_gs_safeDir = 1; else gv_gs_safeDir = 0; s = resource_getResource(db,gv_class,gv_name,"gsSafer",NULL); if (s && !strcasecmp(s,"true")) gv_gs_safer = 1; else gv_gs_safer = 0; s = resource_getResource(db,gv_class,gv_name,"safer","Safer"); if (s) { if (!strcasecmp(s,"true")) gv_gs_safer = 1; else if (!strcasecmp(s,"false")) gv_gs_safer = 0; } s = resource_getResource(db,gv_class,gv_name,"gsQuiet",NULL); if (s && !strcasecmp(s,"true")) gv_gs_quiet = 1; else gv_gs_quiet = 0; s = resource_getResource(db,gv_class,gv_name,"quiet","Quiet"); if (s) { if (!strcasecmp(s,"true")) gv_gs_quiet = 1; else if (!strcasecmp(s,"false")) gv_gs_quiet = 0; } s = resource_getResource(db,gv_class,gv_name,"infoVerbose",NULL); if (!strcasecmp(s, "Silent")) gv_infoVerbose=0; else if (!strcasecmp(s, "Errors")) gv_infoVerbose=1; else if (!strcasecmp(s, "All")) gv_infoVerbose=2; else gv_infoVerbose = 1; s = resource_getResource(db,gv_class,gv_name,"xinerama",NULL); if (!strcasecmp(s, "Off")) gv_xinerama=0; else if (!strcasecmp(s, "On")) gv_xinerama=1; else if (!strcasecmp(s, "Auto")) gv_xinerama=-1; else gv_xinerama = 0; ENDMESSAGE(main_setGhostscriptResources) } /*################################################## main_setResolutions ##################################################*/ void main_setResolutions(query) int query; { int checkXinerama = 1; int sizeX, sizeY; float ratio; BEGINMESSAGE(main_setResolutions) if (query) scale_getScreenSize(gv_display,gv_screen,gv_database,gv_class,gv_name,&gv_screen_width,&gv_screen_height); if (debug_p) printf("Your detected screen size is: %i mm x %i mm\n", gv_screen_width, gv_screen_height); /* Some Xinerama implementations summarize the size over all displays. In this case you must use the summarized resolution, too. Other systems return the size of one (which?) display. In this case you have to ask Xinerama about the size of one display. */ ratio = (float) gv_screen_width / (float) gv_screen_height; if ( ratio >= 2 || ratio < 1 ) /* does not look like a single monitor */ { checkXinerama = 0; if (debug_p) printf ("That does not look like a single monitor, as the ratio is %.2f.\n", ratio); } else if (debug_p) printf ("That looks like a single monitor, as the ratio is %.2f.\n", ratio); sizeX = WidthOfScreen(gv_screen); sizeY = HeightOfScreen(gv_screen); if (debug_p) printf("Your detected screen resolution is: %i x %i\n", sizeX, sizeY); #if HAVE_LIBXINERAMA /* In case we do not have Xinerama at all */ if (gv_xinerama == 0) checkXinerama = 0; else if (gv_xinerama == 1) checkXinerama = 1; if (!XineramaIsActive(gv_display)) checkXinerama = 0; if (checkXinerama) { int num_heads; XineramaScreenInfo *head_info; head_info = (XineramaScreenInfo *) XineramaQueryScreens(gv_display,&num_heads); sizeX = head_info[0].width; sizeY = head_info[0].height; if (debug_p) printf("Xinerama's resolution of screen 0 is: %i x %i\n", sizeX, sizeY); } #endif gv_real_xdpi = 72.0 * 72.0 * (float)gv_screen_width / (25.4 * sizeX); gv_real_ydpi = 72.0 * 72.0 * (float)gv_screen_height / (25.4 * sizeY); gv_pixel_xdpi = 72.0; gv_pixel_ydpi = 72.0; IIMESSAGE(gv_screen_width,gv_screen_height) FMESSAGE(gv_real_xdpi) FMESSAGE(gv_real_ydpi) FMESSAGE(gv_pixel_xdpi) FMESSAGE(gv_pixel_ydpi) ENDMESSAGE(main_setResolutions) } /*################################################## main_createScaleMenu ##################################################*/ void main_createScaleMenu(void) { Arg args[1]; Cardinal n; int i; Boolean have_line = False; BEGINMESSAGE(main_createScaleMenu) n=0; scaleMenu = XtCreatePopupShell("menu", simpleMenuWidgetClass,scaleButton,args,n); for (i=0; gv_scales[i]; i++); scaleEntry = (Widget*) XtMalloc(i*sizeof(Widget)); for (i=0; gv_scales[i]; i++) { if (!have_line && !gv_scales[i]->is_base) { XtCreateManagedWidget("line", smeLineObjectClass,scaleMenu,NULL,(Cardinal)0); have_line=True; } scaleEntry[i] = XtCreateManagedWidget(gv_scales[i]->name, smeBSBObjectClass,scaleMenu,args,n); if (gv_scales[i]->is_base) XtAddCallback(scaleEntry[i], XtNcallback,cb_setScale,(XtPointer)(intptr_t)(i|SCALE_BAS)); else XtAddCallback(scaleEntry[i], XtNcallback,cb_setScale,(XtPointer)(intptr_t)(i|SCALE_ABS)); } ENDMESSAGE(main_createScaleMenu) } gv-3.7.4/src/misc.h0000664000076400007640000000372511735103745011004 00000000000000/* ** ** misc.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** */ #ifndef _GV_MISC_H_ #define _GV_MISC_H_ extern void misc_drawEyeGuide (Widget, int, int, int); extern void misc_savePagePosition (void); extern int misc_restorePagePosition (int *, int *); extern void misc_resetPagePosition (void); extern void misc_setPageMarker (int /* entry */, int /* kind */, XEvent*, Boolean); extern String misc_testFile (String); extern String misc_changeFile (String); extern String close_file (FILE *, String); extern int check_file (int); extern void show_page (int, XtPointer); extern Boolean setup_ghostview (void); extern void setup_layout_ghostview (void); extern void misc_buildPagemediaMenu (void); extern int catch_Xerror (Display*, XErrorEvent*); extern char * quote_filename (char*); extern Widget build_label_menu(Widget, String, String, Pixmap); #endif /* _GV_MISC_H_ */ gv-3.7.4/src/Makefile.in0000664000076400007640000013241512121323352011730 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Makefile.am for gv/src # # Copyright (C) 2004 José E. Marchesi # Process this file with automake to get Makefile.in VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = gv$(EXEEXT) @ENABLE_FALLBACK_STYLES_FALSE@am__append_1 = gv_spartan.dat gv_widgetless.dat # Conditional source files @USE_SCROLLBAR_CODE_TRUE@am__append_2 = Scrollbar.c Scrollbar.h ScrollbarP.h @USE_SETENV_CODE_TRUE@am__append_3 = setenv.c setenv.h @USE_SETENV_CODE_TRUE@am__append_4 = -DUSE_SETENV_CODE subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/ac_config.h.in COPYING ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/canonicalize.m4 \ $(top_srcdir)/m4/double-slash-root.m4 \ $(top_srcdir)/m4/eealloc.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/getopt.m4 \ $(top_srcdir)/m4/gettimeofday.m4 \ $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 \ $(top_srcdir)/m4/include_next.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mkdtemp.m4 \ $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/multiarch.m4 \ $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/pathmax.m4 \ $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/signal_h.m4 \ $(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/stdbool.m4 \ $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/sys_stat_h.m4 \ $(top_srcdir)/m4/sys_time_h.m4 $(top_srcdir)/m4/tempname.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/wchar_t.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = ac_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(appdefaultsdir)" "$(DESTDIR)$(pkgdatadir)" PROGRAMS = $(bin_PROGRAMS) am__gv_SOURCES_DIST = Aaa.c Aaa_bison.c Aaa_bison.h Aaa_lex.c Button.c \ Button.h ButtonP.h Clip.c Clip.h ClipP.h FileSel.c FileSel.h \ FileSelP.h Frame.c Frame.h FrameP.h Ghostview.c Ghostview.h \ GhostviewP.h MButton.c MButton.h MButtonP.h Switch.c Switch.h \ SwitchP.h Vlist.c Vlist.h VlistP.h actions.c actions.h \ callbacks.c callbacks.h confirm.c confirm.h config.h dialog.c \ dialog.h doc_misc.c doc_misc.h error.c error.h file.c file.h \ info.c info.h magmenu.c magmenu.h main.c main_globals.h \ main_resources.h media.c media.h message.h misc.c misc.h \ miscmenu.c miscmenu.h misc_private.c misc_private.h note.c \ note.h options.c options.h options_fs.c options_fs.h \ options_gs.c options_gs.h options_gv.c options_gv.h \ options_setup.c options_setup.h paths.h process.c process.h \ popup.c popup.h ps.c ps.h resource.c resource.h save.c save.h \ scale.c scale.h secscanf.c secscanf.h gv_signal.c gv_signal.h \ version.c version.h versionp.h widgets_misc.c widgets_misc.h \ zoom.c zoom.h Aaa_intern.h Aaa.h AaaP.h gv_message.h types.h \ gv-i18n.h gv-update-userconfig.in Scrollbar.c Scrollbar.h \ ScrollbarP.h setenv.c setenv.h @USE_SCROLLBAR_CODE_TRUE@am__objects_1 = Scrollbar.$(OBJEXT) @USE_SETENV_CODE_TRUE@am__objects_2 = setenv.$(OBJEXT) am_gv_OBJECTS = Aaa.$(OBJEXT) Aaa_bison.$(OBJEXT) Aaa_lex.$(OBJEXT) \ Button.$(OBJEXT) Clip.$(OBJEXT) FileSel.$(OBJEXT) \ Frame.$(OBJEXT) Ghostview.$(OBJEXT) MButton.$(OBJEXT) \ Switch.$(OBJEXT) Vlist.$(OBJEXT) actions.$(OBJEXT) \ callbacks.$(OBJEXT) confirm.$(OBJEXT) dialog.$(OBJEXT) \ doc_misc.$(OBJEXT) error.$(OBJEXT) file.$(OBJEXT) \ info.$(OBJEXT) magmenu.$(OBJEXT) main.$(OBJEXT) \ media.$(OBJEXT) misc.$(OBJEXT) miscmenu.$(OBJEXT) \ misc_private.$(OBJEXT) note.$(OBJEXT) options.$(OBJEXT) \ options_fs.$(OBJEXT) options_gs.$(OBJEXT) options_gv.$(OBJEXT) \ options_setup.$(OBJEXT) process.$(OBJEXT) popup.$(OBJEXT) \ ps.$(OBJEXT) resource.$(OBJEXT) save.$(OBJEXT) scale.$(OBJEXT) \ secscanf.$(OBJEXT) gv_signal.$(OBJEXT) version.$(OBJEXT) \ widgets_misc.$(OBJEXT) zoom.$(OBJEXT) $(am__objects_1) \ $(am__objects_2) gv_OBJECTS = $(am_gv_OBJECTS) gv_LDADD = $(LDADD) gv_DEPENDENCIES = ../lib/libgnu.a gv_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(gv_LDFLAGS) $(LDFLAGS) -o \ $@ am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' SCRIPTS = $(bin_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(gv_SOURCES) DIST_SOURCES = $(am__gv_SOURCES_DIST) DATA = $(appdefaults_DATA) $(pkgdata_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEPS_CFLAGS = @DEPS_CFLAGS@ DEPS_LIBS = @DEPS_LIBS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ GETOPT_H = @GETOPT_H@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_READ = @GNULIB_READ@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ LDFLAGS = @LDFLAGS@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANUALEDITION = @MANUALEDITION@ MKDIR_P = @MKDIR_P@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PAPERSIZE = @PAPERSIZE@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRINT_COMMAND = @PRINT_COMMAND@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WRITE = @REPLACE_WRITE@ SAVE_DIR = @SAVE_DIR@ SCRATCH_DIR = @SCRATCH_DIR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_BACKING_PIXMAP = @USE_BACKING_PIXMAP@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ bin_SCRIPTS = gv-update-userconfig pkgdata_DATA = gv_system.ad $(am__append_1) appdefaultsdir = $(pkgdatadir) appdefaults_DATA = ../GV EXTRA_DIST = ad2c gv_font_res.dat gv_font_res-I18N_mb.dat gv_layout_res.dat gv-i18n.pl gv_misc_res.dat Aaa_bison.yacc \ gv_current.xbm gv_doc.xbm gv_empty.xbm gv_even.xbm gv_icon.xbm gv_odd.xbm \ gv_selected.xbm gv_unmark.xbm $(srcdir)/nls/* \ gv_spartan.dat gv_widgetless.dat gv_user_res.dat gv_copyright.dat # Clean files CLEANFILES = ../GV \ GV.ad \ gv_system.ad \ gv_user.ad \ gv_spartan.h \ gv_widgetless.h \ gv_intern_res_unix.h \ gv_class.ad \ gv_class.h \ gv_make_res.dat \ gv_intern_res_unix.dat \ gv-update-userconfig MAINTAINERCLEANFILES = gv-i18n.h # Compilation flags AM_CPPFLAGS = -DNON_BLOCKING_IO -DGV_CODE \ -DGV_LIBDIR=\"$(pkgdatadir)\" -I$(top_srcdir)/lib \ -I$(top_builddir)/lib -g $(X_CFLAGS) $(am__append_4) AM_CFLAGS = LDADD = ../lib/libgnu.a gv_LDFLAGS = @X_LIBS@ gv_SOURCES = Aaa.c Aaa_bison.c Aaa_bison.h Aaa_lex.c Button.c Button.h \ ButtonP.h Clip.c Clip.h ClipP.h FileSel.c FileSel.h FileSelP.h \ Frame.c Frame.h FrameP.h Ghostview.c Ghostview.h GhostviewP.h \ MButton.c MButton.h MButtonP.h Switch.c Switch.h SwitchP.h \ Vlist.c Vlist.h VlistP.h actions.c actions.h callbacks.c \ callbacks.h confirm.c confirm.h config.h dialog.c dialog.h \ doc_misc.c doc_misc.h error.c error.h file.c file.h info.c \ info.h magmenu.c magmenu.h main.c main_globals.h \ main_resources.h media.c media.h message.h misc.c misc.h \ miscmenu.c miscmenu.h misc_private.c misc_private.h note.c \ note.h options.c options.h options_fs.c options_fs.h \ options_gs.c options_gs.h options_gv.c options_gv.h \ options_setup.c options_setup.h paths.h process.c process.h \ popup.c popup.h ps.c ps.h resource.c resource.h save.c save.h \ scale.c scale.h secscanf.c secscanf.h gv_signal.c gv_signal.h \ version.c version.h versionp.h widgets_misc.c widgets_misc.h \ zoom.c zoom.h message.h Aaa_intern.h Aaa.h AaaP.h gv_message.h \ types.h gv-i18n.h gv-update-userconfig.in $(am__append_2) \ $(am__append_3) BUILT_SOURCES = gv_spartan.h gv_widgetless.h gv_intern_res_unix.h gv_class.h gv-i18n.h sysdocdir = /usr/doc all: $(BUILT_SOURCES) ac_config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): ac_config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/ac_config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status src/ac_config.h $(srcdir)/ac_config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f ac_config.h stamp-h1 install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) gv$(EXEEXT): $(gv_OBJECTS) $(gv_DEPENDENCIES) @rm -f gv$(EXEEXT) $(gv_LINK) $(gv_OBJECTS) $(gv_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Aaa.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Aaa_bison.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Aaa_lex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Button.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Clip.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FileSel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Frame.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Ghostview.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MButton.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Scrollbar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Switch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Vlist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/actions.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/callbacks.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/confirm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/doc_misc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gv_signal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/magmenu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/media.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc_private.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miscmenu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/note.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/options.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/options_fs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/options_gs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/options_gv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/options_setup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/popup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/process.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ps.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resource.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/save.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scale.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/secscanf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setenv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/widgets_misc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoom.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` install-appdefaultsDATA: $(appdefaults_DATA) @$(NORMAL_INSTALL) test -z "$(appdefaultsdir)" || $(MKDIR_P) "$(DESTDIR)$(appdefaultsdir)" @list='$(appdefaults_DATA)'; test -n "$(appdefaultsdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appdefaultsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(appdefaultsdir)" || exit $$?; \ done uninstall-appdefaultsDATA: @$(NORMAL_UNINSTALL) @list='$(appdefaults_DATA)'; test -n "$(appdefaultsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(appdefaultsdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(appdefaultsdir)" && rm -f $$files install-pkgdataDATA: $(pkgdata_DATA) @$(NORMAL_INSTALL) test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" @list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \ done uninstall-pkgdataDATA: @$(NORMAL_UNINSTALL) @list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgdatadir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgdatadir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) ac_config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) ac_config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) ac_config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) ac_config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) ac_config.h installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appdefaultsdir)" "$(DESTDIR)$(pkgdatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-appdefaultsDATA install-data-local \ install-pkgdataDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-appdefaultsDATA uninstall-binPROGRAMS \ uninstall-binSCRIPTS uninstall-pkgdataDATA .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-generic distclean-hdr distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-appdefaultsDATA install-binPROGRAMS install-binSCRIPTS \ install-data install-data-am install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pkgdataDATA install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags uninstall uninstall-am uninstall-appdefaultsDATA \ uninstall-binPROGRAMS uninstall-binSCRIPTS \ uninstall-pkgdataDATA # Additional rules for generating styles ../GV : GV.ad @echo "creating GV" sed -e 's/^[^!]/!&/' GV.ad > ../GV GV.ad : gv_system.ad @echo "creating GV.ad" @cp gv_system.ad GV.ad gv_system.ad : gv_user.ad @echo "creating gv_system.ad" @cp gv_user.ad gv_system.ad gv_user.ad : $(srcdir)/gv_user_res.dat gv_intern_res_unix.dat gv_make_res.dat @echo "creating gv_user.ad" @echo "!" > gv_user.ad @echo "! gv_user.ad" >> gv_user.ad @echo "! User specific application defaults for gv" >> gv_user.ad @echo "! Copyright (C) 1995, 1996, 1997 Johannes Plass" >> gv_user.ad @echo "! Copyright (C) 2004,2005,2006,2007 José E. Marchesi" >> gv_user.ad @echo "!" >> gv_user.ad @cat $(srcdir)/gv_user_res.dat >> gv_user.ad @cat gv_intern_res_unix.dat >> gv_user.ad @cat gv_make_res.dat >> gv_user.ad gv_spartan.h : $(srcdir)/gv_spartan.dat @sh $(srcdir)/ad2c $(srcdir)/gv_spartan.dat > gv_spartan.h gv_widgetless.h : $(srcdir)/gv_widgetless.dat @sh $(srcdir)/ad2c $(srcdir)/gv_widgetless.dat > gv_widgetless.h gv_intern_res_unix.h : gv_intern_res_unix.dat @echo "creating gv_intern_res_unix.h" @sh $(srcdir)/ad2c gv_intern_res_unix.dat > gv_intern_res_unix.h gv_intern_res_unix.dat : @echo "creating gv_intern_res_unix.dat" @echo "" > gv_intern_res_unix.dat @echo "!########## gv_intern_res.dat (generated by makefile)" >> gv_intern_res_unix.dat @echo "" >> gv_intern_res_unix.dat @echo "GV.gsInterpreter: gs" >> gv_intern_res_unix.dat @echo "GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s %s pdf2dsc.ps -c quit" >> gv_intern_res_unix.dat @echo "GV.gsCmdConvPDF: gs -dNOPAUSE -dQUIET -dBATCH -sDEVICE=pswrite -sOutputFile=%s -f %s -c save pop quit" >> gv_intern_res_unix.dat @echo "GV.gsX11Device: -sDEVICE=x11" >> gv_intern_res_unix.dat @echo "GV.gsX11AlphaDevice: -sDEVICE=x11 -dTextAlphaBits=4 -dGraphicsAlphaBits=2 -dMaxBitmap=10000000 -dNOPLATFONTS" >> gv_intern_res_unix.dat @echo "GV.gsSafeDir: True" >> gv_intern_res_unix.dat @echo "GV.gsSafer: True" >> gv_intern_res_unix.dat @echo "GV.gsQuiet: True" >> gv_intern_res_unix.dat @echo "GV.infoVerbose: Warnings" >> gv_intern_res_unix.dat @echo "GV.xinerama: Auto" >> gv_intern_res_unix.dat @echo "GV.gsArguments: -dFIXEDMEDIA" >> gv_intern_res_unix.dat @echo "GV.uncompressCommand: gzip -d -c %s > %s" >> gv_intern_res_unix.dat @echo "GV.printCommand: $(PRINT_COMMAND)" >> gv_intern_res_unix.dat gv_class.h : gv_class.ad @echo "creating gv_class.h" @sh $(srcdir)/ad2c gv_class.ad > gv_class.h gv-i18n.h: $(srcdir)/nls/LANGUAGES $(srcdir)/nls/*.dat perl $(srcdir)/gv-i18n.pl $(srcdir) > gv-i18n.h || { rm gv-i18n.h ; exit 1 ; } gv_class.ad : $(srcdir)/gv_font_res.dat $(srcdir)/gv_font_res-I18N_mb.dat $(srcdir)/gv_layout_res.dat gv_make_res.dat $(srcdir)/gv_misc_res.dat $(srcdir)/gv_user_res.dat gv_intern_res_unix.dat @echo "creating gv_class.ad" cp $(srcdir)/gv_copyright.dat gv_class.ad chmod u+w gv_class.ad @echo "!" >> gv_class.ad @echo "! gv_class.ad" >> gv_class.ad @echo "! Application class defaults for gv" >> gv_class.ad @echo "! Copyright (C) 1995, 1996, 1997 Johannes Plass" >> gv_class.ad @echo "! Copyright (C) 2004,2005,2006,2007 José E. Marchesi" >> gv_class.ad @echo "!" >> gv_class.ad @echo "" >> gv_class.ad @cat $(srcdir)/gv_user_res.dat >> gv_class.ad @cat gv_intern_res_unix.dat >> gv_class.ad @cat gv_make_res.dat >> gv_class.ad @ENABLE_INTERNATIONAL_TRUE@ echo "GV*international: TRUE" >> gv_class.ad @cat $(srcdir)/gv_font_res-I18N_mb.dat >> gv_class.ad @cat $(srcdir)/gv_font_res.dat >> gv_class.ad @cat $(srcdir)/gv_misc_res.dat >> gv_class.ad @cat $(srcdir)/gv_layout_res.dat >> gv_class.ad gv_make_res.dat : @echo "creating gv_make_res.dat" @echo "" > gv_make_res.dat @echo "!########## gv_make_res.dat (generated by makefile)" >> gv_make_res.dat @echo "" >> gv_make_res.dat @echo "GV.scratchDir: $(SCRATCH_DIR)" >> gv_make_res.dat @echo "GV.defaultSaveDir: $(SAVE_DIR)" >> gv_make_res.dat @echo "GV.fallbackPageMedia: $(PAPERSIZE)" >> gv_make_res.dat @echo "GV.useBackingPixmap: $(USE_BACKING_PIXMAP)" >> gv_make_res.dat @echo "GV*dirs: Home\n\\" >> gv_make_res.dat @echo " Tmp\n\\" >> gv_make_res.dat @echo " $(sysdocdir)\n\\" >> gv_make_res.dat @echo " /usr/local/doc" >> gv_make_res.dat @echo "GV*filter: no .*" >> gv_make_res.dat @echo "GV*filters: None\n\\" >> gv_make_res.dat @echo " *.*ps* *.pdf* no .*\n\\" >> gv_make_res.dat @echo " *.*ps* no .*\n\\" >> gv_make_res.dat @echo " *.pdf* no .*\n\\" >> gv_make_res.dat @echo " no .*" >> gv_make_res.dat @echo "" >> gv_make_res.dat gv-update-userconfig: $(srcdir)/gv-update-userconfig.in GV.ad cat $(srcdir)/gv-update-userconfig.in > gv-update-userconfig echo "__END__" >> gv-update-userconfig cat GV.ad >> gv-update-userconfig cat $(srcdir)/gv_misc_res.dat >> gv-update-userconfig install-data-local: $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)/safe-gs-workdir" chmod 755 "$(DESTDIR)$(pkgdatadir)/safe-gs-workdir" # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gv-3.7.4/src/miscmenu.h0000664000076400007640000000254311735103745011666 00000000000000/* ** ** miscmenu.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_MISCMENU_H_ #define _GV_MISCMENU_H_ extern void miscmenu_freeMiscMenuEntries (MiscMenuEntry*); extern MiscMenuEntry * miscmenu_parseMiscMenuEntries (char *); extern void miscmenu_a_miscMenu (Widget, XEvent *, String *, Cardinal *); #endif /* _GV_MISCMENU_H_ */ gv-3.7.4/src/note.c0000664000076400007640000001210511735103746011002 00000000000000/* ** ** note.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include "config.h" #include #include "paths.h" #include INC_X11(IntrinsicP.h) #include INC_X11(StringDefs.h) #include INC_XAW(Label.h) #include INC_X11(Shell.h) #include "Aaa.h" #include "Button.h" #include "popup.h" #ifndef max # define max(a, b) ((a) > (b) ? (a) : (b)) #endif /*### Application dependencies ##############################################*/ #define NOTE_TOPLEVEL toplevel /* the Application Shell */ #define NOTE_POPUP notepopup #define NOTE_POPUP_NAME "notePopup" #include "types.h" #include "main_resources.h" #include "main_globals.h" #include "note.h" #include "widgets_misc.h" static Bool notePopupVisible = False; static Bool notePopupCreated = False; static Widget doneButton=NULL; /*############################################################################### cb_popupNotePopup ###############################################################################*/ void cb_popupNotePopup(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { BEGINMESSAGE(cb_popupNotePopup) if (!notePopupVisible) { if (!notePopupCreated) makeNotePopup(); popup_positionPopup(NOTE_POPUP,NOTE_TOPLEVEL,POPUP_POSITION_CENTER,0,0); widgets_preferButton(doneButton,1); XtPopup(NOTE_POPUP, XtGrabNone); notePopupVisible = True; } ENDMESSAGE(cb_popupNotePopup) } /*############################################################################### cb_popdownNotePopup ###############################################################################*/ void cb_popdownNotePopup(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { BEGINMESSAGE(cb_popdownNotePopup) if (notePopupVisible) { XtPopdown(NOTE_POPUP); notePopupVisible = False; } ENDMESSAGE(cb_popdownNotePopup) } /*############################################################################### makeNotePopup ###############################################################################*/ void makeNotePopup(void) { Arg args[10]; Cardinal n; Widget noteAaa; Widget messageLabel; BEGINMESSAGE(makeNotePopup) n=0; XtSetArg(args[n], XtNallowShellResize, True); n++; NOTE_POPUP = XtCreatePopupShell(NOTE_POPUP_NAME,transientShellWidgetClass,NOTE_TOPLEVEL, args, n); n=0; noteAaa = XtCreateManagedWidget("noteAaa",aaaWidgetClass,NOTE_POPUP,args,n); n=0; XtSetArg(args[n], XtNresize, True); ++n; messageLabel = XtCreateManagedWidget("message", labelWidgetClass,noteAaa, args, n); n=0; doneButton = XtCreateManagedWidget("done", buttonWidgetClass,noteAaa, args, n); XtAddCallback(doneButton, XtNcallback, cb_popdownNotePopup,(XtPointer)NULL); XtRealizeWidget(NOTE_POPUP); n=0; XtSetArg(args[n], XtNminWidth, 100); ++n; XtSetArg(args[n], XtNminHeight, 50); ++n; XtSetArg(args[n], XtNmaxWidth, XtUnspecifiedShellInt); ++n; XtSetArg(args[n], XtNmaxHeight, XtUnspecifiedShellInt); ++n; XtSetValues(NOTE_POPUP, args, n); XtSetKeyboardFocus(noteAaa,doneButton); XSetWMProtocols(XtDisplay(NOTE_POPUP),XtWindow(NOTE_POPUP),&wm_delete_window,1); notePopupCreated =True; ENDMESSAGE(makeNotePopup) } /*############################################################################### NotePopupShowMessage ###############################################################################*/ void NotePopupShowMessage(String message) { Arg args[5]; Cardinal n; Widget label; BEGINMESSAGE(NotePopupShowMessage) if (!message) {INFMESSAGE(no message) ENDMESSAGE(NotePopupShowMessage) return;} if (!notePopupCreated) makeNotePopup(); label = XtNameToWidget(NOTE_POPUP, "*message"); n=0; XtSetArg(args[n], XtNlabel, message); n++; XtSetValues(label, args, n); cb_popupNotePopup((Widget)NULL,(XtPointer)NULL,(XtPointer)NULL); ENDMESSAGE(NotePopupShowMessage) } gv-3.7.4/src/FileSelP.h0000664000076400007640000000770611735103745011517 00000000000000/* ** ** FileSelP.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _XawFileSelectionP_h #define _XawFileSelectionP_h #include "paths.h" #include "AaaP.h" #include #include "FileSel.h" /*#################################################################### Private Delarations ####################################################################*/ typedef struct { String *entry; int num_of_entries; } FSDir; typedef struct _FileSelectionClassPart { int foo; /* keep compiler happy. */ } FileSelectionClassPart; typedef struct { /* resources */ Pixel highlight_pixel; String path; String filter; String filters; String dirs; int buttons; int preferred_button; Boolean reverse_scrolling; /* private data */ Widget pathframeFS; Widget pathFS; Widget filterframeFS; Widget filterFS; Widget old_textfieldFS; Widget rescanbuttonFS; Widget filtersbuttonFS; Widget filtersmenuFS; Widget dirsmenuFS; Widget dirsbuttonFS; Widget panedFS; Widget topscrollFS; Widget topframeFS; Widget topclipFS; Widget topaaaFS; Widget toplistFS; Widget curscrollFS; Widget curframeFS; Widget curclipFS; Widget curaaaFS; Widget curlistFS; Widget subscrollFS; Widget subframeFS; Widget subclipFS; Widget subaaaFS; Widget sublistFS; Widget button1FS; Widget button2FS; Widget button3FS; Widget button4FS; FSDir topdir; int topdir_alloc; FSDir curdir; int curdir_alloc; FSDir subdir; int subdir_alloc; String app_dir; String current_path; char *current_dir; char *current_file; String tmp_dir; String path_field_value; String filter_field_value; int internal_buttons; unsigned long multiclick; Pixel old_highlight_pixel; } FileSelectionPart; typedef struct _FileSelectionClassRec { CoreClassPart core_class; CompositeClassPart composite_class; ConstraintClassPart constraint_class; AaaClassPart aaa_class; FileSelectionClassPart file_selection_class; } FileSelectionClassRec; extern FileSelectionClassRec file_selectionClassRec; /************************************************************************** * * Full instance record declaration * **************************************************************************/ typedef struct {int empty;} FileSelectionConstraintsPart; typedef struct _FileSelectionConstraintsRec { SubInfoRec aaa; FileSelectionConstraintsPart file_selection; } FileSelectionConstraintsRec, *FileSelectionConstraints; typedef struct _FileSelectionRec { CorePart core; CompositePart composite; ConstraintPart constraint; AaaPart aaa; FileSelectionPart file_selection; } FileSelectionRec; #endif /* _XawFileSelectionP_h */ gv-3.7.4/src/gv_copyright.dat0000664000076400007640000000163311735103745013072 00000000000000! !** Copyright (C) 1995, 1996, 1997 Johannes Plass !** Copyright (C) 2004,2005,2006 Jose E. Marchesi ! ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with GNU gv; see the file COPYING. If not, write to ! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. ! ! GNU Maintainer: Jose E. Marchesi (jemarch@gnu.org) ! Original Author: Johannes Plass ! gv-3.7.4/src/version.h0000664000076400007640000000260711735103746011535 00000000000000/* ** ** version.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_VERSION_H_ #define _GV_VERSION_H_ extern void cb_popupVersionPopup(Widget, XtPointer, XtPointer); extern void cb_popdownVersionPopup(Widget, XtPointer, XtPointer); extern char *versionIdentification[]; extern char versionCompatibility[]; extern char versionResource[]; #endif /* _GV_VERSION_H_ */ gv-3.7.4/src/VlistP.h0000664000076400007640000000470011735103745011264 00000000000000/* ** ** VlistP.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _VlistP_h #define _VlistP_h #include "paths.h" #include "Vlist.h" #include INC_XAW(LabelP.h) typedef struct _VlistClass { int makes_compiler_happy; /* not used */ } VlistClassPart; typedef struct _VlistClassRec { CoreClassPart core_class; SimpleClassPart simple_class; ThreeDClassPart threeD_class; LabelClassPart label_class; VlistClassPart vlist_class; } VlistClassRec; extern VlistClassRec vlistClassRec; typedef struct { /* resources */ String vlist; String highlighted_geometry; String selected_geometry; Dimension mark_shadow_width; Dimension selected_shadow_width; Dimension highlighted_shadow_width; Pixel mark_background; Pixel selected_background; Pixel highlighted_background; Boolean allow_marks; /* private state */ int entries; GC background_GC; GC mark_background_GC; GC selected_background_GC; GC highlighted_background_GC; int firstVisible; int selected; int highlighted; int hulx; int huly; int hlrx; int hlry; int sulx; int suly; int slrx; int slry; int ydelta; int yofs; XtCallbackList report_callbacks; } VlistPart; typedef struct _VlistRec { CorePart core; SimplePart simple; ThreeDPart threeD; LabelPart label; VlistPart vlist; } VlistRec; #endif /* _VlistP_h */ gv-3.7.4/src/versionp.h0000664000076400007640000000571512117144306011710 00000000000000/* ** ** versionp.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physicss ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_VERSIONP_H_ #define _GV_VERSIONP_H_ #include "version.h" #define VERSION_SHELL_TITLE "gv Copyright Information" #define VERSION_TOPLEVEL toplevel /* the Application Shell */ #define VERSION_APPLIC_CONTEXT app_con /* the Application Context */ char *versionIdentification[] = { "gv 3.7.4", "March 2013", 0 }; /* declare it writable due to problems with sscanf() in main_versionIsCompatible() on HP/UX 9.07 [suggested by Christian Illinger (illinger@lepsi.in2p3.fr)] */ char versionResource[] = "gv 3.6.7.90"; char versionCompatibility[] = "gv 3.6.7.90"; char * copyright = "\ gv -- An X11 user interface for Ghostscript. \n\ \n\ Copyright (C) 1992-1997 Johannes Plass, Timothy O. Theisen \n\ Copyright (C) 2004,2005,2006,2007 Jose E. Marchesi \n\ Copyright (C) 2007,2008,2009,2010 Markus Steinborn \n\ \n\ This program is free software; you can redistribute it and/or modify \n\ it under the terms of the GNU General Public License as published by \n\ the Free Software Foundation; either version 3 of the License, or \n\ (at your option) any later version. \n\ \n\ This program is distributed in the hope that it will be useful, \n\ but WITHOUT ANY WARRANTY; without even the implied warranty of \n\ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the \n\ GNU General Public License for more details. \n\ \n\ You should have received a copy of the GNU General Public License\n\ along with GNU gv; see the file COPYING. If not, see\n\ ."; char *author[] = { "\ GNU Maintainer: Markus Steinborn (gnugv_maintainer@yahoo.de)\n\ Original Author: Johannes Plass\n\ \n\ %s\n\ \n\ See the `AUTHORS' file for a complete contributors list\ ", "\ Please send error reports to: bug-gv@gnu.org \n\ ", 0 }; #endif /* _GV_VERSIONP_H_ */ gv-3.7.4/src/gv_font_res-I18N_mb.dat0000664000076400007640000003204711735103745014037 00000000000000!##### FontSets GV*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*SmeBSB.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*Button.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV.?.processButton.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV.?.Label*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV.?.Button*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV.?.locator*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV.?.dateButton*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV.?.titleButton*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*optiongvPopup*infoVerboseButton.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV.?.infoVerboseButton*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV.?.prevPage*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV.?.nextPage*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*newtoc.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*fileSel*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*fileSel*button1.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*fileSel*button2.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*fileSel*button3.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*fileSel*button4.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*fileSel*pathtext*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*optionsetupPopup*Label*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*optionsetupPopup*confirmButton.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*optionsetupPopup*Switch*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*optionsetupPopup*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*optionsetupPopup*Button.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*optiongvPopup*Label*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*optiongvPopup*Switch*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*optiongvPopup*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*optiongvPopup*Button.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*optionfsPopup*Label*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*optionfsPopup*Switch*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*optionfsPopup*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*optionfsPopup*Button.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*optiongsPopup*Label*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*optiongsPopup*Switch*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*optiongsPopup*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*optiongsPopup*Button.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*dialogPopup*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*dialogPopup*Button.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*dialogPopup*message*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*notePopup*Button.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*notePopup*message*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*confirmPopup*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*confirmPopup*Button.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*versionPopup*Label*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*versionPopup*versionTexta*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*versionPopup*versionTextb*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* GV*infoPopup*Text*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* gv-3.7.4/src/options.c0000664000076400007640000002640111735103746011534 00000000000000/* ** ** options.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include "config.h" #include #include #include #include "paths.h" #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_X11(Shell.h) #include INC_XAW(Label.h) #include INC_XAW(SimpleMenu.h) #include INC_XAW(SmeBSB.h) #include "Aaa.h" #include "MButton.h" #include "types.h" #include "main_resources.h" #include "main_globals.h" #include "file.h" #include "note.h" #include "options.h" #include "popup.h" #include "widgets_misc.h" #include #define MESSAGE_STRING_LEN 512 #define MAX_RECORD_LENGTH 512 /*###################################################### options_cb_popup #######################################################*/ void options_cb_popup(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data _GL_UNUSED) { OptionPopup op = (OptionPopup) client_data; BEGINMESSAGE(options_cb_popup) if (!op->popup) (op->create)(); if (!op->visible) { (op->update)(); popup_positionPopup(op->popup,viewFrame,POPUP_POSITION_POS,4,4); XtPopup(op->popup, XtGrabNone); op->visible=True; } ENDMESSAGE(options_cb_popup) } /*###################################################### options_cb_popdown #######################################################*/ void options_cb_popdown(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data _GL_UNUSED) { OptionPopup op = (OptionPopup) client_data; BEGINMESSAGE(options_cb_popdown) if (op->visible) { cb_popdownNotePopup((Widget)NULL,(XtPointer)NULL,NULL); XtPopdown(op->popup); op->visible=False; } ENDMESSAGE(options_cb_popdown) } /*###################################################### options_cb_changeMenuLabel #######################################################*/ void options_cb_changeMenuLabel(Widget w, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { Arg args[1]; Cardinal n; char *l; Widget p; BEGINMESSAGE(options_cb_changeMenuLabel) p = XtParent(XtParent(w)); n=0; XtSetArg(args[n], XtNlabel, &l); n++; XtGetValues(w, args, n); n=0; XtSetArg(args[n], XtNlabel, l); n++; XtSetValues(p, args, n); ENDMESSAGE(options_cb_changeMenuLabel) } /*###################################################### options_textApply #######################################################*/ void options_textApply(Widget w, Boolean *bP, String *sP) { if (!bP || (bP && *bP==True)) XtFree(*sP); if (bP) *bP=True; *sP = widgets_getText(w); *sP = XtNewString(*sP); } /*###################################################### options_createLabeledMenu #######################################################*/ void options_createLabeledMenu(String name, Widget parent, Widget *lP, Widget *mbP, Widget *mP) { char s[50]; Arg args[1]; Cardinal n; BEGINMESSAGE(options_createLabeledMenu) n=0; XtSetArg(args[n], XtNresize, False); ++n; sprintf(s,"%sLabel",name); *lP = XtCreateManagedWidget(s,labelWidgetClass,parent,args,n); sprintf(s,"%sButton",name); *mbP = XtCreateManagedWidget(s,mbuttonWidgetClass,parent,args,n); *mP = XtCreatePopupShell("menu", simpleMenuWidgetClass,*mbP,NULL,(Cardinal)0); ENDMESSAGE(options_createLabeledMenu) } /*###################################################### options_realize #######################################################*/ void options_realize(Widget popup, Widget aaa) { Dimension minw,minh; Arg args[3]; Cardinal n; BEGINMESSAGE(options_realize) XtRealizeWidget(popup); AaaWidgetGetNaturalSize((AaaWidget)aaa,&minw,&minh); IIMESSAGE(minw,minh) n=0; XtSetArg(args[n], XtNminWidth, minw); ++n; XtSetArg(args[n], XtNminHeight, minh); ++n; XtSetArg(args[n], XtNmaxWidth, XtUnspecifiedShellInt); ++n; XtSetValues(popup, args, n); XSetWMProtocols(XtDisplay(popup),XtWindow(popup),&wm_delete_window,1); ENDMESSAGE(options_realize) } /*###################################################### options_setArg #######################################################*/ void options_setArg(String *argiP, String *argvP, String format, String name, String value) { *argiP = XtMalloc((strlen(format)+strlen(name)+3)*sizeof(char)); strcpy(*argiP,name); if (*format != '*') strcat(*argiP,"."); strcat(*argiP,format); strcat(*argiP,":"); *argvP = XtMalloc((strlen(value)+1)*sizeof(char)); strcpy(*argvP,value); } /*###################################################### options_squeezeMultiline #######################################################*/ String options_squeezeMultiline(String s) { char *b,*e,*d,*md; BEGINMESSAGE(options_squeezeMultiline) if (!s) s = ""; md = s = d = XtNewString(s); while (*d) { while (isspace(*d)) d++; b=e=d; while (*d && *d != '\n') if (!isspace(*d)) e=d++; else d++; while (b!=e) *s++ = *b++; if (e!=d) *s++ = *e; if (*d) *s++=*d++; } *s='\0'; d = md +strlen(md); if (d != md) while (isspace(*(--d))) *d = '\0'; ENDMESSAGE(options_squeezeMultiline) return(md); } /*###################################################### options_squeeze #######################################################*/ String options_squeeze(String s) { String d,md; BEGINMESSAGE(options_squeeze) if (!s) s = ""; md = s = d = XtNewString(s); while (isspace(*d)) d++; while (*d) { if (!isspace(*d) || !isspace(*(d+1))) { if (isspace(*d)) *s++=' '; else *s++=*d; } d++; } *s='\0'; d = md +strlen(md); if (d != md) while (isspace(*(--d))) *d = '\0'; return(md); ENDMESSAGE(options_squeeze) } /*------------------------------------------------------ options_readline ------------------------------------------------------*/ # define END_OF_RECORD "\n" static char* options_readline(FILE *infile, String *lineP) { char tmp[MAX_RECORD_LENGTH]; char *esc; int multi; BEGINMESSAGE(options_readline) while (fgets(tmp,MAX_RECORD_LENGTH,infile)) { multi = *lineP ? strlen(*lineP) : 0; *lineP = XtRealloc(*lineP,(multi+strlen(tmp)+1)*sizeof(char)); if (!multi) (*lineP)[0] = '\0'; strcat(*lineP,tmp); multi=0; esc = strrchr(tmp,'\\'); if (esc && *(esc+1) == '\n') while (esc != tmp && *esc-- == '\\') multi = !multi; if (!multi) break; } ENDMESSAGE(options_readline) return(*lineP); } /*------------------------------------------------------ options_writeline ------------------------------------------------------*/ static void options_writeline(FILE *outfile, String header, String value) { int num_nl=0; char *line; char *nl=value; int i,l; char *s; BEGINMESSAGE(options_writeline) while ((nl=strchr(nl,'\n'))) { nl++; num_nl++; } header = XtNewString(header); s = strrchr(header,':'); i=0; if (s) { s++; i = (int)(s-header); while (isspace(*s)) { if (*s=='\t') i = 8*(i/8)+8; else i += 1; *s++='\0'; } } if (i==(int)strlen(header)) i=24; line = XtMalloc((strlen(header) + strlen(value) + num_nl*3 + i + 2)*sizeof(char)); line[0]='\0'; strcpy(line,header); while (num_nl>=0) { if (num_nl>0) { nl=strchr(value,'\n'); *nl++='\0'; } l = strlen(line); while (l=0) fputs(END_OF_RECORD,tempfile); while (argn >= 0) { options_writeline(tempfile,argi[argn],argv[argn]); argn--; } fclose(tempfile); if (rename(tempfilename,gv_user_defaults_file)) { sprintf(errorMessage,"Save aborted: \nCannot rename temporary '%s'\n to '%s'",tempfilename,gv_user_defaults_file); NotePopupShowMessage(errorMessage); unlink(tempfilename); XtFree(tempfilename); INFMESSAGE(cannot rename temporary file) ENDMESSAGE(options_save) return; } XtFree(tempfilename); ENDMESSAGE(options_save) } gv-3.7.4/src/gv_spartan.dat0000664000076400007640000000314311437764362012537 00000000000000 !######################################## !##### Layouts !######################################## GV.control.MButton.font: -*-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*orientationButton*forcedWidth: 72 GV*upsidedown.Label: Up-Down GV.?.processButton.label: \ working !##### Main Layout GV*control.layout: \ |v{ \ f=4 \ sss=2 \ pbh=(100*(|height processButton)) \ pbs1=($pbh/($pbh+1)) \ $f \ |h{ \ $f \ |v{ \ titleButton<+200-[1]*-100%> \ 1 \ dateButton<+200-[1]*-100%> \ 4 \ |h{ \ 2<+[1]> \ locator<*-100%> \ 1<+[1]> \ } \ 4 \ fileButton<+50*-100%> \ 1 \ stateButton<+50*-100%> \ 1 \ pageButton<+50*-100%> \ 1 \ orientationButton<+50-100*-100%> \ 1 \ scaleButton<+50*-100%> \ 1 \ pagemediaButton<+50-[1]*-100%> \ (4*$pbs1) \ |h{ \ 0<+[1]> \ processButton<+50*-100%> \ 0<+[1]> \ } \ 4 \ |h{ \ 0<+[1]> \ pannerFrame<*-100%> \ 0<+[1]> \ } \ 4 \ |h{ \ prevPage<+60*-100%> \ 1 \ nextPage<+60*-100%> \ } \ 4 \ |h{ \ 0<+30> \ newtocScroll<*+200[1]-[1]> \ 4 \ newtocFrame<-[1]*+200[1]-[1]> \ 0<+30> \ } \ } \ $f \ |v{ \ viewFrame<+[2]-100%*+9999-100%> \ } \ $f \ } \ $f \ } gv-3.7.4/src/misc_private.h0000664000076400007640000000233111735103745012526 00000000000000/* ** ** misc_private.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_MISC_PRIVATE_H_ #define _GV_MISC_PRIVATE_H_ extern void update_label (Widget, char*); #endif /* _GV_MISC_PRIVATE_H_ */ gv-3.7.4/src/Aaa.c0000664000076400007640000011753311735103745010531 00000000000000/* * Aaa.c * Version 1.3 * * Johannes Plass, 5/96 * plass@thep.physik.uni-mainz.de * * Please note that this is a (only slightly) modified version of * Keith Packard's Layout widget. * */ /* * $XConsortium: Layout.c,v 1.1 91/09/13 18:51:44 keith Exp $ * * Copyright 1991 Massachusetts Institute of Technology * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of M.I.T. not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. M.I.T. makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T. * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Keith Packard, MIT X Consortium */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" /* Uncomment this if the resource "debug" should have an effect. Otherwise the code for layout debugging is not included. #define USE_LAYOUT_DEBUG */ #include "Aaa_intern.h" #include INC_XMU(Converters.h) #define ForAllChildren(pw, childP) \ for ( (childP) = (pw)->composite.children ; \ (childP) < (pw)->composite.children + (pw)->composite.num_children ; \ (childP)++ ) if (!XtIsManaged(*childP)) ; else # ifdef MIN # undef MIN # endif # define MIN(_a_,_b_) ((_a_)<(_b_) ? (_a_):(_b_)) # ifdef MAX # undef MAX # endif # define MAX(_a_,_b_) ((_a_)>(_b_) ? (_a_):(_b_)) #define offset(field) XtOffsetOf(AaaRec, aaa.field) static XtResource resources[] = { {XtNlayout, XtCLayout, XtRLayout, sizeof (BoxPtr), offset(layout), XtRLayout, NULL }, # ifdef USE_LAYOUT_DEBUG {XtNdebug, XtCBoolean, XtRBoolean, sizeof(Boolean), offset(debug), XtRImmediate, (XtPointer) TRUE}, # endif /* USE_LAYOUT_DEBUG */ {XtNresizeWidth, XtCResize, XtRBoolean, sizeof(Boolean), offset(resize_width), XtRImmediate, (XtPointer) TRUE}, /* introduced in 11/94 ###jp### */ {XtNresizeHeight, XtCResize, XtRBoolean, sizeof(Boolean), offset(resize_height), XtRImmediate, (XtPointer) TRUE}, /* introduced in 11/94 ###jp### */ {XtNmaximumWidth, XtCMaximumWidth, XtRDimension, sizeof(Dimension), offset(maximum_width), XtRImmediate, (XtPointer)0}, /* introduced in 11/94 ###jp### */ {XtNmaximumHeight, XtCMaximumHeight, XtRDimension, sizeof(Dimension), offset(maximum_height), XtRImmediate, (XtPointer)0}, /* introduced in 11/94 ###jp### */ {XtNminimumWidth, XtCMinimumWidth, XtRDimension, sizeof(Dimension), offset(minimum_width), XtRImmediate, (XtPointer)0}, /* introduced in 11/94 ###jp### */ {XtNminimumHeight, XtCMinimumHeight, XtRDimension, sizeof(Dimension), offset(minimum_height), XtRImmediate, (XtPointer)0}, /* introduced in 11/94 ###jp### */ {XtNborderWidth, XtCBorderWidth, XtRDimension, sizeof(Dimension), XtOffsetOf(RectObjRec,rectangle.border_width),XtRImmediate,(XtPointer)0} }; #undef offset #define offset(field) XtOffsetOf(AaaConstraintsRec, aaa.field) static XtResource aaaConstraintResources[] = { {XtNresizable, XtCResizable, XtRBoolean, sizeof(Boolean), offset(allow_resize), XtRImmediate, (XtPointer) True}, {XtNforcedWidth, XtCWidth, XtRDimension, sizeof(Dimension), offset(forced_width), XtRImmediate, (XtPointer)0}, {XtNforcedHeight, XtCHeight, XtRDimension, sizeof(Dimension), offset(forced_height), XtRImmediate, (XtPointer)0}, }; #undef offset static void ClassInitialize(void); static void Initialize(Widget,Widget,ArgList,Cardinal*); static void ComputeNaturalSizes(AaaWidget,BoxPtr,LayoutDirection); static void Destroy(Widget); static void Resize(Widget); static Boolean SetValues(Widget,Widget,Widget,ArgList,Cardinal*); static XtGeometryResult GeometryManager(Widget,XtWidgetGeometry*,XtWidgetGeometry*); static void ChangeManaged(Widget); static void InsertChild(Widget); static XtGeometryResult QueryGeometry(Widget,XtWidgetGeometry*,XtWidgetGeometry*); static void GetDesiredSize(Widget); static void AaaLayout(AaaWidget,Bool); static void AaaGetNaturalSize(AaaWidget,Dimension*,Dimension*); static void AaaFreeLayout(BoxPtr); #define SuperClass ((ConstraintWidgetClass)&constraintClassRec) AaaClassRec aaaClassRec = { { /* core class fields */ /* superclass */ (WidgetClass) SuperClass, /* class name */ "Aaa", /* size */ sizeof(AaaRec), /* class_initialize */ ClassInitialize, /* class_part init */ NULL, /* class_inited */ FALSE, /* initialize */ Initialize, /* initialize_hook */ NULL, /* realize */ XtInheritRealize, /* actions */ NULL, /* num_actions */ 0, /* resources */ resources, /* resource_count */ XtNumber(resources), /* xrm_class */ NULLQUARK, /* compress_motion */ FALSE, /* compress_exposure */ 0, /* compress_enterleave*/ FALSE, /* visible_interest */ FALSE, /* destroy */ Destroy, /* resize */ Resize, /* expose */ NULL, /* set_values */ SetValues, /* set_values_hook */ NULL, /* set_values_almost */ XtInheritSetValuesAlmost, /* get_values_hook */ NULL, /* accept_focus */ NULL, /* version */ XtVersion, /* callback_private */ NULL, /* tm_table */ NULL, /* query_geometry */ QueryGeometry, /* display_accelerator*/ XtInheritDisplayAccelerator, /* extension */ NULL }, { /* composite class fields */ /* geometry_manager */ GeometryManager, /* change_managed */ ChangeManaged, /* insert_child */ InsertChild, /* delete_child */ XtInheritDeleteChild, /* extension */ NULL }, { /* constraint class fields */ /* subresources */ aaaConstraintResources, /* subresource_count */ XtNumber(aaaConstraintResources), /* constraint_size */ sizeof(AaaConstraintsRec), /* initialize */ NULL, /* destroy */ NULL, /* set_values */ NULL, /* extension */ NULL }, { /* dummy Aaa fields */ /* foo */ 0, } }; WidgetClass aaaWidgetClass = (WidgetClass) &aaaClassRec; /*######################################################################*/ /* Functions used for layout debugging */ /*######################################################################*/ #ifdef USE_LAYOUT_DEBUG static void PrintGlue (g) GlueRec g; { if (g.order == 0 || g.value != 1.0) (void) printf ("%g", g.value); if (g.order > 0) { (void) printf ("%s", "inf"); if (g.order > 1) (void) printf ("%d", g.order); } } static void PrintDirection (dir) LayoutDirection dir; { switch (dir) { case LayoutHorizontal: (void) printf ("%s", "horizontal"); break; case LayoutVertical: (void) printf ("%s", "vertical"); break; default: (void) printf ("Unknown layout direction %d\n", dir); break; } } static void TabTo(level) int level; { while (level--) (void) printf ("%s", " "); } static void PrintBox (box, level) BoxPtr box; int level; { BoxPtr child; TabTo (level); switch (box->type) { case BoxBox: PrintDirection (box->u.box.dir); (void) printf ("%s\n", "BoxBox"); for (child = box->u.box.firstChild; child; child = child->nextSibling) PrintBox (child, level+1); TabTo (level); break; case WidgetBox: (void) printf ("%s", XrmQuarkToString (box->u.widget.quark)); break; case GlueBox: (void) printf ("%s", "glue"); break; case VariableBox: (void) printf ("variable %s", XrmQuarkToString (box->u.variable.quark)); break; } (void) printf ("%s", "<"); (void) printf ("%s", "+"); PrintGlue (box->params.stretch[LayoutHorizontal]); (void) printf ("%s", "-"); PrintGlue (box->params.shrink[LayoutHorizontal]); (void) printf ("%s", "*"); (void) printf ("%s", "+"); PrintGlue (box->params.stretch[LayoutVertical]); (void) printf ("%s", "-"); PrintGlue (box->params.shrink[LayoutVertical]); (void) printf ("%s", ">"); (void) printf (" size: %dx%d", box->size[0], box->size[1]); (void) printf (" natural: %dx%d\n", box->natural[0], box->natural[1]); } #endif /* USE_LAYOUT_DEBUG */ /************************************************************ * * Semi-public routines. * ************************************************************/ /* Function Name: ClassInitialize * Description: The Aaa widgets class initialization proc. * Arguments: none. * Returns: none. */ static Boolean CvtStringToLayout (Display *dpy _GL_UNUSED, XrmValue *args _GL_UNUSED, Cardinal *num_args _GL_UNUSED, XrmValue *from, XrmValue *to, XtPointer *converter_data _GL_UNUSED) { LayoutConverterStruct layoutConverterStruct; BEGINMESSAGE(CvtStringToLayout) layoutConverterStruct.base = layoutConverterStruct.oldfrom = layoutConverterStruct.from = (String) from->addr; layoutConverterStruct.to = (LayoutPtr *) to->addr; if (layout_parse((void*)(&layoutConverterStruct)) == 0) { INFMESSAGE(success) ENDMESSAGE(CvtStringToLayout) return TRUE; } else { INFMESSAGE(error) ENDMESSAGE(CvtStringToLayout) return FALSE; } } static void Destroy(w) Widget w; { AaaWidget l = (AaaWidget) w; BEGINMESSAGE(Destroy) if (l->aaa.layout) AaaFreeLayout (l->aaa.layout); ENDMESSAGE(Destroy) } static void ClassInitialize(void) { BEGINMESSAGE(ClassInitialize) XtSetTypeConverter ( XtRString, XtRLayout, CvtStringToLayout, (XtConvertArgList)NULL, (Cardinal)0, XtCacheNone,(XtDestructor)NULL ); ENDMESSAGE(ClassInitialize) } static XtGeometryResult GeometryManager(Widget child, XtWidgetGeometry *request, XtWidgetGeometry *reply _GL_UNUSED) { AaaWidget w = (AaaWidget) XtParent(child); SubInfoPtr p = SubInfo(child); Boolean changed=False; int bw; BEGINMESSAGE(GeometryManager) INFSMESSAGE(received request from:,XtName(child)) if (!(request->request_mode & (CWWidth | CWHeight | CWBorderWidth))) { INFMESSAGE(request not of interest) ENDMESSAGE(GeometryManager) return XtGeometryYes; } if (request->request_mode & XtCWQueryOnly) { /* query requests are not properly implemented ... ###jp### */ INFMESSAGE(request is query only and will be denied) ENDMESSAGE(GeometryManager) return XtGeometryNo; } if (!(p->allow_resize)) { INFMESSAGE(child is not allowed to resize) ENDMESSAGE(GeometryManager) return XtGeometryNo; } INFIIMESSAGE(current size of child:,child->core.width,child->core.height) bw = p->naturalBw; if ((request->request_mode & CWBorderWidth) && request->border_width != child->core.border_width) { INFMESSAGE(request for new border width) changed = True; p->naturalBw = request->border_width; if (p->forced_width) p->naturalSize[LayoutHorizontal] = p->forced_width; else p->naturalSize[LayoutHorizontal] = p->naturalSize[LayoutHorizontal]-2*bw+2*request->border_width; if (p->forced_height) p->naturalSize[LayoutVertical] = p->forced_height; else p->naturalSize[LayoutVertical] = p->naturalSize[LayoutVertical] -2*bw+2*request->border_width; } if ((request->request_mode & CWWidth) && request->width != child->core.width) { INFMESSAGE(request for new width) changed = True; if (p->forced_width) p->naturalSize[LayoutHorizontal] = p->forced_width; else p->naturalSize[LayoutHorizontal] = request->width + 2*p->naturalBw; } if ((request->request_mode & CWHeight) && request->height != child->core.height) { INFMESSAGE(request for new height) changed = True; if (p->forced_height) p->naturalSize[LayoutVertical] = p->forced_height; else p->naturalSize[LayoutVertical] = request->height + 2*p->naturalBw; } if (changed) { AaaLayout(w,TRUE); INFIIMESSAGE(new size of child:,child->core.width,child->core.height) ENDMESSAGE(GeometryManager) return XtGeometryDone; } else { ENDMESSAGE(GeometryManager) return XtGeometryYes; } } static void Initialize(Widget request _GL_UNUSED, Widget new, ArgList args _GL_UNUSED, Cardinal *num_args _GL_UNUSED) { AaaWidget l= (AaaWidget) new; Dimension prefwidth,prefheight; BEGINMESSAGE(Initialize) if ( (l->core.width <= l->aaa.minimum_width) || (l->core.height <= l->aaa.minimum_height) ) { AaaGetNaturalSize (l, &prefwidth, &prefheight); prefwidth = MAX(l->aaa.minimum_width,prefwidth); if (prefwidth<1) prefwidth =1; prefheight= MAX(l->aaa.minimum_height,prefheight); if (prefheight<1) prefheight=1; if (l->core.width <= l->aaa.minimum_width) l->core.width = prefwidth; if (l->core.height <= l->aaa.minimum_height) l->core.height = prefheight; } INFIIMESSAGE(size:,l->core.width,l->core.height) ENDMESSAGE(Initialize) } static void ChangeManaged(Widget gw) { AaaWidget w = (AaaWidget) gw; Widget *children; BEGINMESSAGE(ChangeManaged) ForAllChildren (w, children) GetDesiredSize (*children); AaaLayout ((AaaWidget)w,TRUE); ENDMESSAGE(ChangeManaged) } static void GetDesiredSize (Widget child) { XtWidgetGeometry desired; SubInfoPtr p; XtQueryGeometry (child, (XtWidgetGeometry *) NULL, &desired); p = SubInfo (child); p->naturalBw = desired.border_width; if (p->forced_width) p->naturalSize[LayoutHorizontal] = p->forced_width; else p->naturalSize[LayoutHorizontal] = desired.width + desired.border_width * 2; if (p->forced_height) p->naturalSize[LayoutVertical] = p->forced_height; else p->naturalSize[LayoutVertical] = desired.height + desired.border_width * 2;; INFSMESSAGE1(GetDesiredSize for:,XtName(child)) } static void InsertChild (Widget child) { (*SuperClass->composite_class.insert_child) (child); GetDesiredSize (child); } static void Resize(Widget gw) { BEGINMESSAGE(Resize) IIMESSAGE(gw->core.width,gw->core.height) IMESSAGE(gw->core.border_width) AaaLayout ((AaaWidget) gw, FALSE); IIMESSAGE(gw->core.width,gw->core.height) IMESSAGE(gw->core.border_width) ENDMESSAGE(Resize) } /* ARGSUSED */ static Boolean SetValues(Widget gold, Widget greq _GL_UNUSED, Widget gnew, ArgList args _GL_UNUSED, Cardinal *num_args _GL_UNUSED) { AaaWidget old = (AaaWidget) gold, new = (AaaWidget) gnew; BEGINMESSAGE(SetValues) if (old->aaa.layout != new->aaa.layout) { AaaLayout(new,TRUE); } ENDMESSAGE(SetValues) return FALSE; } /* SetValues */ static XtGeometryResult QueryGeometry (Widget gw, XtWidgetGeometry *request, XtWidgetGeometry *preferred_return) { AaaWidget w = (AaaWidget) gw; XtGeometryResult result; XtWidgetGeometry preferred_size; BEGINMESSAGE(QueryGeometry) if (request && !(request->request_mode & (CWWidth|CWHeight))) { INFMESSAGE(return XtGeometryYes) ENDMESSAGE(QueryGeometry) return XtGeometryYes; } AaaGetNaturalSize (w, &preferred_size.width, &preferred_size.height); preferred_return->request_mode = 0; result = XtGeometryYes; if (!request) { preferred_return->width = preferred_size.width; preferred_return->height= preferred_size.height; if (preferred_size.width != w->core.width) { preferred_return->request_mode |= CWWidth; result = XtGeometryAlmost; } if (preferred_size.height != w->core.height) { preferred_return->request_mode |= CWHeight; result = XtGeometryAlmost; } } else { if (request->request_mode & CWWidth) { if (preferred_size.width > request->width) { if (preferred_size.width == w->core.width) result = XtGeometryNo; else if (result != XtGeometryNo) { result = XtGeometryAlmost; preferred_return->request_mode |= CWWidth; preferred_return->width = preferred_size.width; } } } if (request->request_mode & CWHeight) { if (preferred_size.height > request->height) { if (preferred_size.height == w->core.height) result = XtGeometryNo; else if (result != XtGeometryNo) { result = XtGeometryAlmost; preferred_return->request_mode |= CWHeight; preferred_return->height = preferred_size.height; } } } } ENDMESSAGE(QueryGeometry) return result; } /* * Layout section. Exports AaaGetNaturalSize and * AaaLayout to above section */ static ExprPtr LookupVariable (BoxPtr child, XrmQuark quark) { BoxPtr parent, box; while ((parent = child->parent)) { for (box = parent->u.box.firstChild; box != child; box = box->nextSibling) { if (box->type == VariableBox && box->u.variable.quark == quark) { return box->u.variable.expr; } } child = parent; } return((ExprPtr)NULL); } static double Evaluate (AaaWidget l, BoxPtr box, ExprPtr expr, double natural) { double left, right, down; Widget widget; SubInfoPtr info; switch (expr->type) { case Constant: return expr->u.constant; case Binary: left = Evaluate (l, box, expr->u.binary.left, natural); right = Evaluate (l, box, expr->u.binary.right, natural); switch (expr->u.binary.op) { case Plus: return left + right; case Minus: return left - right; case Times: return left * right; case Divide: return left / right; case Percent: return right * left / 100.0; } case Unary: down = Evaluate (l, box, expr->u.unary.down, natural); switch (expr->u.unary.op) { case Percent: return natural * down / 100.0; case Minus: return -down; case Plus: case Times: case Divide: /* should never be reached */ INFMESSAGE(### Warning: in Evaluate: this code should never be reached) return(0); } case Width: widget = QuarkToWidget (l, expr->u.width); if (!widget) return 0; info = SubInfo (widget); return info->naturalSize[LayoutHorizontal]; case Height: widget = QuarkToWidget (l, expr->u.height); if (!widget) return 0; info = SubInfo (widget); return info->naturalSize[LayoutVertical]; case Variable: { ExprPtr tmp; tmp = LookupVariable (box, expr->u.variable); if (!tmp) { char buf[256]; (void) sprintf (buf, "Aaa Widget: Variable '%s' is undefined.\n", XrmQuarkToString (expr->u.variable)); XtError (buf); return 0.0; } return Evaluate (l, box, tmp, natural); } } /* should never be reached */ INFMESSAGE(### Warning: in Evaluate: end of routine should never be reached) return(0); } static void DisposeExpr (ExprPtr expr) { MEMBEGINMESSAGE(DisposeExpr) if (!expr) { MEMMESSAGE(null pointer) MEMENDMESSAGE(DisposeExpr) return; } switch (expr->type) { case Constant: MEMMESSAGE(freeing Constant) break; case Binary: MEMMESSAGE(freeing Binary left and right) DisposeExpr (expr->u.binary.left); DisposeExpr (expr->u.binary.right); break; case Unary: MEMMESSAGE(freeing Unary) DisposeExpr (expr->u.unary.down); break; case Width: MEMMESSAGE(freeing Width) break; case Height: MEMMESSAGE(freeing Height) break; case Variable: MEMMESSAGE(freeing Variable) break; default: MEMMESSAGE(?? trying to free unknown expression) fprintf(stderr,"AaaWidget DisposeExpr: accessed illegal memory location\n"); MEMENDMESSAGE(DisposeExpr) return; } Dispose (expr); expr = (ExprPtr)NULL; /*###jp###*/ MEMENDMESSAGE(DisposeExpr) } #define CheckGlue(l, box, glue, n) { \ if (glue.expr) glue.value = Evaluate (l, box, glue.expr, n); \ if (glue.order == 0 && glue.value == 0) glue.order = -1; \ else if (glue.order == -1 && glue.value != 0) glue.order = 0; \ } #define DoStretch(l, box, dir) \ CheckGlue (l, box, box->params.stretch[dir], (double) box->natural[dir]); #define DoShrink(l, box, dir) \ CheckGlue (l, box, box->params.shrink[dir], (double) box->natural[dir]) /* compute the natural sizes of a box */ static void ComputeNaturalSizes (AaaWidget l, BoxPtr box, LayoutDirection dir) { BoxPtr child; Widget w; SubInfoPtr info; int minStretchOrder, minShrinkOrder; LayoutDirection thisDir; switch (box->type) { case VariableBox: box->natural[LayoutHorizontal] = 0; box->natural[LayoutVertical] = 0; break; case WidgetBox: w = box->u.widget.widget = QuarkToWidget (l, box->u.widget.quark); if (!w) { box->natural[LayoutHorizontal] = 0; box->natural[LayoutVertical] = 0; } else { info = SubInfo (w); box->natural[LayoutHorizontal] = info->naturalSize[LayoutHorizontal]; box->natural[LayoutVertical] = info->naturalSize[LayoutVertical]; } DoStretch (l, box, dir); DoShrink (l, box, dir); DoStretch (l, box, !dir); DoShrink (l, box, !dir); break; case GlueBox: box->natural[dir] = Evaluate (l, box, box->u.glue.expr, 0.0); box->natural[!dir] = 0; DoStretch (l, box, dir); DoShrink (l, box, dir); break; case BoxBox: thisDir = box->u.box.dir; box->natural[0] = 0; box->natural[1] = 0; minStretchOrder = 100000; minShrinkOrder = 100000; ZeroGlue (box->params.shrink[thisDir]); ZeroGlue (box->params.stretch[thisDir]); box->params.shrink[!thisDir].order = 100000; box->params.stretch[!thisDir].order = 100000; for (child = box->u.box.firstChild; child; child = child->nextSibling) { ComputeNaturalSizes (l, child, thisDir); /* * along box axis: * normal size += child normal size * shrink += child shrink * stretch += child stretch */ box->natural[thisDir] += child->natural[thisDir]; AddGlue (box->params.shrink[thisDir], box->params.shrink[thisDir], child->params.shrink[thisDir]); AddGlue (box->params.stretch[thisDir], box->params.stretch[thisDir], child->params.stretch[thisDir]); /* * normal to box axis: * normal size = maximum child normal size of minimum shrink order * shrink = difference between normal size and minimum shrink * stretch = minimum child stretch */ if (box->natural[!thisDir] >= child->natural[!thisDir]) { if (child->params.stretch[!thisDir].order < minShrinkOrder) { box->natural[!thisDir] = child->natural[!thisDir]; minStretchOrder = child->params.stretch[!thisDir].order; if (child->params.shrink[!thisDir].order < minShrinkOrder) minShrinkOrder = child->params.shrink[!thisDir].order; } } else { if (child->params.shrink[!thisDir].order <= minStretchOrder) { box->natural[!thisDir] = child->natural[!thisDir]; minShrinkOrder = child->params.shrink[!thisDir].order; if (child->params.stretch[!thisDir].order < minStretchOrder) minStretchOrder = child->params.stretch[!thisDir].order; } } MinGlue (box->params.stretch[!thisDir],child->params.stretch[!thisDir]); MinGlue (box->params.shrink[!thisDir] ,child->params.shrink[!thisDir]); } if (box->params.shrink[!thisDir].order <= 0) { int minSize; int largestMinSize; largestMinSize = 0; for (child = box->u.box.firstChild; child; child = child->nextSibling) { if (child->params.shrink[!thisDir].order <= 0) { minSize = child->natural[!thisDir] - child->params.shrink[!thisDir].value; if (minSize > largestMinSize) largestMinSize = minSize; } } box->params.shrink[!thisDir].value = box->natural[!thisDir] - largestMinSize; if (box->params.shrink[!thisDir].value == 0) box->params.shrink[!thisDir].order = -1; else box->params.shrink[!thisDir].order = 0; } } } /* given the boxs geometry, set the geometry of the pieces */ #define GluePart(a,b,dist) \ ((a) ? ((int) (((a) * (dist)) / (b) + \ ((dist >= 0) ? 0.5 : -0.5))) : 0) static Bool ComputeSizes (BoxPtr box) { LayoutDirection dir; BoxPtr child; GlueRec stretch; GlueRec shrink; GlueRec totalGlue[2]; double remainingGlue; GluePtr glue; int size; int totalSizes; int totalChange[2]; int change; int remainingChange; Bool shrinking; Bool happy; int i; int maxGlue; dir = box->u.box.dir; size = box->size[dir]; stretch = box->params.stretch[dir]; shrink = box->params.shrink[dir]; /* pick the correct adjustment parameters based on the change direction */ totalChange[0] = size - box->natural[dir]; shrinking = totalChange[0] < 0; totalChange[1] = 0; totalGlue[1].order = 100000; totalGlue[1].value = 0; maxGlue = 1; if (shrinking) { totalGlue[0] = shrink; /* for first-order infinites, shrink it to zero and then * shrink the zero-orders */ if (shrink.order == 1) { totalSizes = 0; remainingGlue = 0; for (child = box->u.box.firstChild; child; child = child->nextSibling) { switch (child->params.shrink[dir].order) { case 0: remainingGlue += (int)child->params.shrink[dir].value; break; case 1: totalSizes += (int)child->natural[dir]; break; } } if (totalSizes < -totalChange[0]) { totalGlue[1] = shrink; totalGlue[0].order = 0; totalGlue[0].value = remainingGlue; totalChange[1] = -totalSizes; totalChange[0] = totalChange[0] - totalChange[1]; maxGlue = 2; } } if (totalGlue[0].order <= 0 && totalChange[0] > totalGlue[0].value) { totalChange[0] = totalGlue[0].value; } } else totalGlue[0] = stretch; /* adjust each box */ totalSizes = 0; remainingGlue = totalGlue[0].value + totalGlue[1].value; remainingChange = totalChange[0] + totalChange[1]; happy = True; for (child = box->u.box.firstChild; child; child = child->nextSibling) { if (shrinking) glue = &child->params.shrink[dir]; else glue = &child->params.stretch[dir]; child->size[dir] = child->natural[dir]; for (i = 0; i < maxGlue; i++) { if (glue->order == totalGlue[i].order) { remainingGlue -= glue->value; if (remainingGlue <= 0) { change = remainingChange; } else { change = GluePart (glue->value, totalGlue[i].value, totalChange[i]); } child->size[dir] += change; remainingChange -= change; } } child->size[!dir] = box->size[!dir]; totalSizes += child->size[dir]; if (child->type == BoxBox) if (!ComputeSizes (child)) happy = False; } return totalSizes == box->size[dir] && happy; } static void SetSizes (BoxPtr box, Position x, Position y) { BoxPtr child; int width, height; int bw; Widget w; SubInfoPtr info; BEGINMESSAGE1(SetSizes) switch (box->type) { case WidgetBox: w = box->u.widget.widget; if (w) { /*info = (SubInfoPtr) w->core.constraints;*/ info = SubInfo(w); width = box->size[LayoutHorizontal]; height = box->size[LayoutVertical]; bw = info->naturalBw; width = width - bw*2; height = height - bw*2; /* Widgets which grow too small are placed off screen */ if (width <= 0 || height <= 0) { width = 1; height = 1; x = -1 - 2*bw; y = -1 - 2*bw; } INFSMESSAGE1(configuring widget:,XtName(w)) XtConfigureWidget (w, x, y, (Dimension)width, (Dimension)height, (Dimension)bw); } break; case BoxBox: for (child = box->u.box.firstChild; child; child = child->nextSibling) { SetSizes (child, x, y); if (box->u.box.dir == LayoutHorizontal) x += child->size[LayoutHorizontal]; else y += child->size[LayoutVertical]; } break; case GlueBox: case VariableBox: /* should never be reached */ break; } ENDMESSAGE1(SetSizes) } static void AaaFreeLayout (BoxPtr box) { BoxPtr child, next; MEMBEGINMESSAGE(AaaFreeLayout) if (!box) { MEMMESSAGE(null pointer) MEMENDMESSAGE(AaaFreeLayout) return; } switch (box->type) { case BoxBox: MEMMESSAGE(### dispose BoxBox) for (child = box->u.box.firstChild; child; child = next) { next = child->nextSibling; AaaFreeLayout (child); } break; case WidgetBox: MEMMESSAGE(### dispose WidgetBox) DisposeExpr (box->params.stretch[LayoutHorizontal].expr); DisposeExpr (box->params.shrink[LayoutHorizontal].expr); DisposeExpr (box->params.stretch[LayoutVertical].expr); DisposeExpr (box->params.shrink[LayoutVertical].expr); break; case GlueBox: MEMMESSAGE(### dispose GlueBox) DisposeExpr (box->u.glue.expr); DisposeExpr (box->params.stretch[LayoutHorizontal].expr); DisposeExpr (box->params.shrink[LayoutHorizontal].expr); DisposeExpr (box->params.stretch[LayoutVertical].expr); DisposeExpr (box->params.shrink[LayoutVertical].expr); break; case VariableBox: /* added this case ###jp### */ MEMMESSAGE(### dispose VariableBox) DisposeExpr (box->u.variable.expr); break; default: MEMMESSAGE(### Warning: probably accessed illegal memory location) fprintf(stderr,"AaaFreeLayout: probably accessed illegal memory location\n"); MEMENDMESSAGE(AaaFreeLayout) return; } Dispose (box); box = (BoxPtr)NULL; /* ###jp###*/ MEMENDMESSAGE(AaaFreeLayout) } static void AaaGetNaturalSize (AaaWidget l, Dimension *widthp, Dimension *heightp) { BoxPtr box; BEGINMESSAGE(AaaGetNaturalSize) box = l->aaa.layout; if (box) { # ifdef MESSAGES { Dimension w,h; w=box->natural[LayoutHorizontal]; h=box->natural[LayoutVertical]; INFIIMESSAGE(before calculation:,w,h) } # endif ComputeNaturalSizes (l, box, LayoutHorizontal); *widthp = box->natural[LayoutHorizontal]; *heightp = box->natural[LayoutVertical]; } else { INFMESSAGE(no layout available) *widthp = 0; *heightp = 0; } INFIIMESSAGE(natural size:,*widthp,*heightp) ENDMESSAGE(AaaGetNaturalSize) } static void AaaLayout(AaaWidget l, Bool attemptResize) { BoxPtr box = l->aaa.layout; Dimension width, height; Dimension pwidth, pheight; BEGINMESSAGE(AaaLayout) if (!box) { INFMESSAGE(no layout specified) ENDMESSAGE(AaaLayout) return; } if (l->aaa.maximum_width > 0) l->aaa.maximum_width = MAX(l->aaa.maximum_width,l->core.width); if (l->aaa.maximum_height > 0) l->aaa.maximum_height = MAX(l->aaa.maximum_height,l->core.height); if (l->aaa.minimum_width > 0) l->aaa.minimum_width = MIN(l->aaa.minimum_width,l->core.width); if (l->aaa.minimum_height > 0) l->aaa.minimum_height = MIN(l->aaa.minimum_height,l->core.height); # ifdef MESSAGES { char *name=XtName((Widget)l); Dimension w,h; INFSMESSAGE(layouting widget:,name) w=l->core.width; h=l->core.height; INFIIMESSAGE(current size:,w,h) w=l->aaa.maximum_width; h=l->aaa.maximum_height; INFIIMESSAGE(new maximum size:,w,h) w=l->aaa.minimum_width; h=l->aaa.minimum_height; INFIIMESSAGE(new minimum size:,w,h) if (l->aaa.resize_width) { INFMESSAGE(width change is allowed) } else { INFMESSAGE(width change is not allowed) } if (l->aaa.resize_height) { INFMESSAGE(height change is allowed) } else { INFMESSAGE(height change is not allowed) } } # endif AaaGetNaturalSize (l, &pwidth, &pheight); box->size[LayoutHorizontal] = l->core.width; box->size[LayoutVertical] = l->core.height; if (!l->aaa.resize_width && !l->aaa.resize_height) attemptResize=False; # ifdef MESSAGES if (attemptResize) { INFMESSAGE(may attempt to resize) } else { INFMESSAGE(will not attempt to resize) } # endif if (attemptResize) { if (!(l->aaa.resize_width)) { pwidth = l->core.width; } else { if (l->aaa.maximum_width > 0) pwidth = MIN(pwidth,l->aaa.maximum_width); if (l->aaa.minimum_width > 0) pwidth = MAX(pwidth,l->aaa.minimum_width); } if (!(l->aaa.resize_height)) { pheight = l->core.height; } else { if (l->aaa.maximum_height > 0) pheight = MIN(pheight,l->aaa.maximum_height); if (l->aaa.minimum_height > 0) pheight = MAX(pheight,l->aaa.minimum_height); } if ((pwidth == l->core.width) && (pheight == l->core.height)) { INFMESSAGE(resize attempt is unnecessary) attemptResize=False; } } if (attemptResize) { XtGeometryResult result; INFIIMESSAGE(proposing resize:,pwidth,pheight) result = XtMakeResizeRequest ((Widget) l,pwidth,pheight,&width, &height); switch (result) { case XtGeometryYes: INFMESSAGE(XtGeometryYes) break; case XtGeometryAlmost: INFIIMESSAGE(XtGeometryAlmost:,width,height) result = XtMakeResizeRequest ((Widget) l,width, height,&width, &height); if (result!=XtGeometryYes) fprintf(stderr,"Aaa widget: Warning, parent denied to set the size he proposed."); break; case XtGeometryNo: INFMESSAGE(XtGeometryNo) break; case XtGeometryDone: /* should never be reached */ INFMESSAGE(XtGeometryDone) break; } box->size[LayoutHorizontal] = l->core.width; box->size[LayoutVertical] = l->core.height; } ComputeSizes(box); # ifdef USE_LAYOUT_DEBUG if (l->aaa.debug) { PrintBox (box, 0); fflush (stdout); } # endif /* USE_LAYOUT_DEBUG */ INFMESSAGE(adjusting children) SetSizes (box,0,0); # ifdef MESSAGES { Dimension w,h; w=l->core.width; h=l->core.height; INFIIMESSAGE(new size:,w,h) } # endif ENDMESSAGE(AaaLayout) } /*###################### Public Routines ################################*/ /* ###jp### 1/94 */ void AaaWidgetGetNaturalSize( AaaWidget l, Dimension *wp, Dimension *hp ) { BEGINMESSAGE(AaaWidgetGetNaturalSize) /* *wp = (l->aaa.layout)->natural[LayoutHorizontal]; *hp = (l->aaa.layout)->natural[LayoutVertical]; */ AaaGetNaturalSize(l, wp, hp); INFIIMESSAGE(natural:,*wp,*hp) ENDMESSAGE(AaaWidgetGetNaturalSize) } void AaaWidgetAllowResize(AaaWidget l, Boolean wflag, Boolean hflag) { BEGINMESSAGE(AaaWidgetAllowResize) l->aaa.resize_width = wflag; l->aaa.resize_height = hflag; # ifdef MESSAGES if (wflag) {INFMESSAGE(horizontal resizing is enabled)} else {INFMESSAGE(horizontal resizing is disabled)} if (hflag) {INFMESSAGE(vertical resizing is enabled)} else {INFMESSAGE(vertical resizing is disabled)} # endif ENDMESSAGE(AaaWidgetAllowResize) } #if 0 /* ########## NOT USED ########### */ void AaaWidgetSetSizeBounds( AaaWidget l, Dimension *minw_p, Dimension *minh_p, Dimension *maxw_p, Dimension *maxh_p ) { BEGINMESSAGE(AaaWidgetSetSizeBounds) if (minw_p) l->aaa.minimum_width = *minw_p; if (minh_p) l->aaa.minimum_height = *minh_p; if (maxw_p) l->aaa.maximum_width = *maxw_p; if (maxh_p) l->aaa.maximum_height = *maxh_p; ENDMESSAGE(AaaWidgetSetSizeBounds) } void AaaWidgetGetSizeBounds( AaaWidget l, Dimension *minw_p, Dimension *minh_p, Dimension *maxw_p, Dimension *maxh_p ) { BEGINMESSAGE(AaaWidgetGetSizeBounds) if (minw_p) *minw_p = l->aaa.minimum_width ; if (minh_p) *minh_p = l->aaa.minimum_height; if (maxw_p) *maxw_p = l->aaa.maximum_width ; if (maxh_p) *maxh_p = l->aaa.maximum_height; ENDMESSAGE(AaaWidgetGetSizeBounds) } #endif /* ########## NOT USED ########### */ gv-3.7.4/src/Ghostview.h0000664000076400007640000001767311735103745012037 00000000000000/* * Ghostview.h -- Public header file for Ghostview widget. * Copyright (C) 1992 Timothy O. Theisen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GNU gv; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * * Author: Tim Theisen Systems Programmer * Internet: tim@cs.wisc.edu Department of Computer Sciences * UUCP: uwvax!tim University of Wisconsin-Madison * Phone: (608)262-0438 1210 West Dayton Street * FAX: (608)262-9777 Madison, WI 53706 * * Author: Jose E. Marchesi (jemarch@gnu.org) * GNU Project */ #ifndef _Ghostview_h #define _Ghostview_h /* Be sure that FILE* is defined */ #include /**************************************************************** * * Ghostview widget * ****************************************************************/ /* Resources: Name Class RepType Default Value ---- ----- ------- ------------- arguments Arguments String NULL background Background Pixel XtDefaultBackground border BorderColor Pixel XtDefaultForeground borderWidth BorderWidth Dimension 1 bottomMargin Margin int 0 busyCursor Cursor Cursor watch callback Callback Pointer NULL cursor Cursor Cursor crosshair destroyCallback Callback Pointer NULL filename Filename String "-" foreground Foreground Pixel XtDefaultForeground height Height Dimension 0 infoVerbose InfoVerbose InfoVerbose 0 interpreter Interpreter String "gs" leftMargin Margin int 0 llx BoundingBox Int 0 lly BoundingBox Int 0 mappedWhenManaged MappedWhenManaged Boolean True messageCallback Callback Pointer NULL orientation Orientation PageOrientation Portrait outputCallback Callback Pointer NULL palette Palette Palette Color quiet Quiet Boolean True rightMargin Margin int 0 safeDir SafeDir Boolean True safer Safer Boolean True topMargin Margin int 0 urx BoundingBox Int 612 ury BoundingBox Int 792 useBackingPixmap UseBackingPixmap Boolean True width Width Dimension 0 x Position Position 0 y Position Position 0 */ /* define any special resource names here that are not in INC_X11(StringDefs.h) */ #define XtNbusyCursor "busyCursor" #define XtNscrollCursor "scrollCursor" #define XtNcursor "cursor" #define XtNfilename "filename" #define XtNmessageCallback "messageCallback" #define XtNoutputCallback "outputCallback" #define XtNpalette "palette" #define XtNarguments "arguments" #define XtNquiet "quiet" #define XtNinfoVerbose "infoVerbose" #define XtNxinerama "xinerama" #define XtNllx "llx" #define XtNlly "lly" #define XtNurx "urx" #define XtNury "ury" #define XtNuseBackingPixmap "useBackingPixmap" #define XtNlxdpi "lxdpi" #define XtNlydpi "lydpi" #define XtNrightMargin "rightMargin" #define XtNleftMargin "leftMargin" #define XtNbottomMargin "bottomMargin" #define XtNtopMargin "topMargin" #define XtNpreferredWidth "preferredWidth" #define XtNpreferredHeight "preferredHeight" #define XtNsafeDir "safeDir" #define XtNsafer "safer" #define XtNinterpreter "interpreter" #define XtCBoundingBox "BoundingBox" #define XtCFilename "Filename" #define XtCPalette "Palette" #define XtCArguments "Arguments" #define XtCQuiet "Quiet" #define XtCinfoVerbose "infoVerbose" #define XtCxinerama "Xinerama" #define XtCLResolution "LResolution" #define XtCUseBackingPixmap "UseBackingPixmap" #define XtCPreferredWidth "PreferredWidth" #define XtCPreferredHeight "PreferredHeight" #define XtCSafer "Safer" #define XtCSafeDir "SafeDir" #define XtCInterpreter "Interpreter" #if 0 #define XtNhighlightPixel "highlightPixel" #define XtCHighlightPixel "HighlightPixel" #endif /****************************************************************************** * XmuCvtStringToPageOrientation */ /* Number represents clockwise rotation of the paper in degrees */ typedef enum { XtPageOrientationUnspecified = -1, /* Unspecified orientation */ XtPageOrientationPortrait = 0, /* Normal portrait orientation */ XtPageOrientationLandscape = 90, /* Normal landscape orientation */ XtPageOrientationUpsideDown = 180, /* Don't think this will be used much */ XtPageOrientationSeascape = 270 /* Landscape rotated the other way */ } XtPageOrientation; #ifndef GV_CODE # define XtEportrait "portrait" # define XtElandscape "landscape" # define XtEupsideDown "upside-down" # define XtEseascape "seascape" extern Boolean XmuCvtStringToPageOrientation(); #endif /* GV_CODE */ #define XtRPageOrientation "PageOrientation" #define XtRinfoVerbose "InfoVerbose" #define XtRxinerama "xinerama" /****************************************************************************** * XmuCvtStringToPalette */ typedef enum { XtPaletteMonochrome, XtPaletteGrayscale, XtPaletteColor } XtPalette; #define XtEmonochrome "monochrome" #define XtEgrayscale "grayscale" #define XtEcolor "color" #define XtRPalette "Palette" extern Boolean XmuCvtStringToPalette(Display*,XrmValue*,Cardinal*,XrmValue*,XrmValue*,XtPointer*); /* declare specific GhostviewWidget class and instance datatypes */ typedef struct _GhostviewClassRec* GhostviewWidgetClass; typedef struct _GhostviewRec* GhostviewWidget; /* declare the class constant */ extern WidgetClass ghostviewWidgetClass; /*###################################################################################*/ /* Public routines */ /*###################################################################################*/ extern void GhostviewDrawRectangle ( Widget, int, int, int, int ); /* The structure returned by the regular callback */ typedef struct _GhostviewReturnStruct { int width, height; int psx, psy; float xdpi, ydpi; } GhostviewReturnStruct; extern void GhostviewCoordsPStoX ( Widget, int, int, int*, int* ); extern void GhostviewCoordsXtoPS ( Widget, int, int, int*, int* ); extern void GhostviewGetBBofArea ( Widget /* w */ , int /* x1 */ , int /* y1 */ , int /* x2 */ , int /* y2 */ , GhostviewReturnStruct* /* p */ ); extern void GhostviewGetAreaOfBB ( Widget /* w */ , int /* psx1 */ , int /* psy1 */ , int /* psx2 */ , int /* psy2 */ , GhostviewReturnStruct* p ); extern void GhostviewEnableInterpreter ( Widget /* w */ ); extern void GhostviewDisableInterpreter ( Widget /* w */ ); extern void GhostviewState ( Widget /* w */ , Boolean* /* processflag_p */ , Boolean* /* busyflag_p */ , Boolean* /* inputflag_p */ ); extern Boolean GhostviewIsInterpreterReady ( Widget /* w */ ); extern Boolean GhostviewIsBusy ( Widget /* w */ ); extern Boolean GhostviewIsInterpreterRunning ( Widget /* w */ ); extern Boolean GhostviewSendPS ( Widget /* widget */, FILE* /* fp */, gv_off_t /* begin */, gv_off_t /* len */, Bool /* close */ ); extern Boolean GhostviewNextPage ( Widget /* w */ ); extern void GhostviewClearBackground ( Widget /* w */ ); extern void GhostviewSetup ( Widget /* w */ ); #endif /* _Ghostview_h */ gv-3.7.4/src/ac_config.h.in0000664000076400007640000005437112121323352012355 00000000000000/* src/ac_config.h.in. Generated from configure.ac by autoheader. */ /* Define to the number of bits in type 'ptrdiff_t'. */ #undef BITSIZEOF_PTRDIFF_T /* Define to the number of bits in type 'sig_atomic_t'. */ #undef BITSIZEOF_SIG_ATOMIC_T /* Define to the number of bits in type 'size_t'. */ #undef BITSIZEOF_SIZE_T /* Define to the number of bits in type 'wchar_t'. */ #undef BITSIZEOF_WCHAR_T /* Define to the number of bits in type 'wint_t'. */ #undef BITSIZEOF_WINT_T /* 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 to 1 if using `alloca.c'. */ #undef C_ALLOCA /* Define to 1 if // is a file system root distinct from /. */ #undef DOUBLE_SLASH_IS_DISTINCT_ROOT /* Define to 1 if realpath() can malloc memory, always gives an absolute path, and handles trailing slash correctly. */ #undef FUNC_REALPATH_WORKS /* Define if gettimeofday clobbers the localtime buffer. */ #undef GETTIMEOFDAY_CLOBBERS_LOCALTIME /* Define this to 'void' or 'struct timezone' to match the system's declaration of the second argument to gettimeofday. */ #undef GETTIMEOFDAY_TIMEZONE /* Define to make the limit macros in visible. */ #undef GL_TRIGGER_STDC_LIMIT_MACROS /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module canonicalize-lgpl shall be considered present. */ #undef GNULIB_CANONICALIZE_LGPL /* Define to 1 when the gnulib module canonicalize_file_name should be tested. */ #undef GNULIB_TEST_CANONICALIZE_FILE_NAME /* Define to 1 when the gnulib module getopt-gnu should be tested. */ #undef GNULIB_TEST_GETOPT_GNU /* Define to 1 when the gnulib module gettimeofday should be tested. */ #undef GNULIB_TEST_GETTIMEOFDAY /* Define to 1 when the gnulib module lstat should be tested. */ #undef GNULIB_TEST_LSTAT /* Define to 1 when the gnulib module mkdtemp should be tested. */ #undef GNULIB_TEST_MKDTEMP /* Define to 1 when the gnulib module mkstemp should be tested. */ #undef GNULIB_TEST_MKSTEMP /* Define to 1 when the gnulib module readlink should be tested. */ #undef GNULIB_TEST_READLINK /* Define to 1 when the gnulib module realpath should be tested. */ #undef GNULIB_TEST_REALPATH /* Define to 1 when the gnulib module stat should be tested. */ #undef GNULIB_TEST_STAT /* Define to 1 if you have 'alloca' after including , a header that may be supplied by this distribution. */ #undef HAVE_ALLOCA /* Define to 1 if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the `canonicalize_file_name' function. */ #undef HAVE_CANONICALIZE_FILE_NAME /* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. */ #undef HAVE_DECL_GETENV /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ #undef HAVE_FSEEKO /* Define to 1 if you have the `ftello' function. */ #undef HAVE_FTELLO /* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H /* Define to 1 if you have the `getopt_long_only' function. */ #undef HAVE_GETOPT_LONG_ONLY /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `fl' library (-lfl). */ #undef HAVE_LIBFL /* Define to 1 if you have the `ICE' library (-lICE). */ #undef HAVE_LIBICE /* Define to 1 if you have the `iconv' library (-liconv). */ #undef HAVE_LIBICONV /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the `SM' library (-lSM). */ #undef HAVE_LIBSM /* Define to 1 if you have the `X11' library (-lX11). */ #undef HAVE_LIBX11 /* Define to 1 if you have the `Xaw3d' library (-lXaw3d). */ #undef HAVE_LIBXAW3D /* Define to 1 if you have the `Xext' library (-lXext). */ #undef HAVE_LIBXEXT /* Define to 1 if you have the `Xinerama' library (-lXinerama). */ #undef HAVE_LIBXINERAMA /* Define to 1 if you have the `Xmu' library (-lXmu). */ #undef HAVE_LIBXMU /* Define to 1 if you have the `Xpm' library (-lXpm). */ #undef HAVE_LIBXPM /* Define to 1 if you have the `Xt' library (-lXt). */ #undef HAVE_LIBXT /* Define to 1 if the system has the type `long long int'. */ #undef HAVE_LONG_LONG_INT /* Define to 1 if you have the `lstat' function. */ #undef HAVE_LSTAT /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `mkdtemp' function. */ #undef HAVE_MKDTEMP /* Define to 1 if you have the `mkstemp' function. */ #undef HAVE_MKSTEMP /* Use fopen, ftello, fseeko, ... */ #undef HAVE_OFF_T /* Define to 1 if you have the `pathconf' function. */ #undef HAVE_PATHCONF /* Define to 1 if atoll is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ATOLL /* Define to 1 if canonicalize_file_name is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME /* Define to 1 if chown is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CHOWN /* Define to 1 if dup2 is declared even after undefining macros. */ #undef HAVE_RAW_DECL_DUP2 /* Define to 1 if dup3 is declared even after undefining macros. */ #undef HAVE_RAW_DECL_DUP3 /* Define to 1 if endusershell is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ENDUSERSHELL /* Define to 1 if environ is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ENVIRON /* Define to 1 if euidaccess is declared even after undefining macros. */ #undef HAVE_RAW_DECL_EUIDACCESS /* Define to 1 if faccessat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FACCESSAT /* Define to 1 if fchdir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FCHDIR /* Define to 1 if fchmodat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FCHMODAT /* Define to 1 if fchownat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FCHOWNAT /* Define to 1 if fstatat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FSTATAT /* Define to 1 if fsync is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FSYNC /* Define to 1 if ftruncate is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FTRUNCATE /* Define to 1 if futimens is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FUTIMENS /* Define to 1 if getcwd is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETCWD /* Define to 1 if getdomainname is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETDOMAINNAME /* Define to 1 if getdtablesize is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETDTABLESIZE /* Define to 1 if getgroups is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETGROUPS /* Define to 1 if gethostname is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETHOSTNAME /* Define to 1 if getloadavg is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETLOADAVG /* Define to 1 if getlogin is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETLOGIN /* Define to 1 if getlogin_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETLOGIN_R /* Define to 1 if getpagesize is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETPAGESIZE /* Define to 1 if getsubopt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETSUBOPT /* Define to 1 if gettimeofday is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETTIMEOFDAY /* Define to 1 if getusershell is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETUSERSHELL /* Define to 1 if grantpt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GRANTPT /* Define to 1 if imaxabs is declared even after undefining macros. */ #undef HAVE_RAW_DECL_IMAXABS /* Define to 1 if imaxdiv is declared even after undefining macros. */ #undef HAVE_RAW_DECL_IMAXDIV /* Define to 1 if initstat_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_INITSTAT_R /* Define to 1 if lchmod is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LCHMOD /* Define to 1 if lchown is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LCHOWN /* Define to 1 if link is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LINK /* Define to 1 if linkat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LINKAT /* Define to 1 if lseek is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LSEEK /* Define to 1 if lstat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LSTAT /* Define to 1 if mkdirat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKDIRAT /* Define to 1 if mkdtemp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKDTEMP /* Define to 1 if mkfifo is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKFIFO /* Define to 1 if mkfifoat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKFIFOAT /* Define to 1 if mknod is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKNOD /* Define to 1 if mknodat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKNODAT /* Define to 1 if mkostemp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKOSTEMP /* Define to 1 if mkostemps is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKOSTEMPS /* Define to 1 if mkstemp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKSTEMP /* Define to 1 if mkstemps is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKSTEMPS /* Define to 1 if pipe is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PIPE /* Define to 1 if pipe2 is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PIPE2 /* Define to 1 if pread is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PREAD /* Define to 1 if ptsname is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PTSNAME /* Define to 1 if pwrite is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PWRITE /* Define to 1 if random_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RANDOM_R /* Define to 1 if readlink is declared even after undefining macros. */ #undef HAVE_RAW_DECL_READLINK /* Define to 1 if readlinkat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_READLINKAT /* Define to 1 if realpath is declared even after undefining macros. */ #undef HAVE_RAW_DECL_REALPATH /* Define to 1 if rmdir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RMDIR /* Define to 1 if rpmatch is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RPMATCH /* Define to 1 if setenv is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETENV /* Define to 1 if setstate_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETSTATE_R /* Define to 1 if setusershell is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETUSERSHELL /* Define to 1 if sigaction is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SIGACTION /* Define to 1 if sigaddset is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SIGADDSET /* Define to 1 if sigdelset is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SIGDELSET /* Define to 1 if sigemptyset is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SIGEMPTYSET /* Define to 1 if sigfillset is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SIGFILLSET /* Define to 1 if sigismember is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SIGISMEMBER /* Define to 1 if sigpending is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SIGPENDING /* Define to 1 if sigprocmask is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SIGPROCMASK /* Define to 1 if sleep is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SLEEP /* Define to 1 if srandom_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SRANDOM_R /* Define to 1 if stat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STAT /* Define to 1 if strtod is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOD /* Define to 1 if strtoimax is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOIMAX /* Define to 1 if strtoll is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOLL /* Define to 1 if strtoull is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOULL /* Define to 1 if strtoumax is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOUMAX /* Define to 1 if symlink is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SYMLINK /* Define to 1 if symlinkat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SYMLINKAT /* Define to 1 if ttyname_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_TTYNAME_R /* Define to 1 if unlink is declared even after undefining macros. */ #undef HAVE_RAW_DECL_UNLINK /* Define to 1 if unlinkat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_UNLINKAT /* Define to 1 if unlockpt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_UNLOCKPT /* Define to 1 if unsetenv is declared even after undefining macros. */ #undef HAVE_RAW_DECL_UNSETENV /* Define to 1 if usleep is declared even after undefining macros. */ #undef HAVE_RAW_DECL_USLEEP /* Define to 1 if utimensat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_UTIMENSAT /* Define to 1 if _Exit is declared even after undefining macros. */ #undef HAVE_RAW_DECL__EXIT /* Define to 1 if you have the `readlink' function. */ #undef HAVE_READLINK /* Define to 1 if you have the `realpath' function. */ #undef HAVE_REALPATH /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV /* Define to 1 if you have the sigchld signal. */ #undef HAVE_SIGCHLD /* Define to 1 if you have the sigcld signal. */ #undef HAVE_SIGCLD /* Define to 1 if 'sig_atomic_t' is a signed integer type. */ #undef HAVE_SIGNED_SIG_ATOMIC_T /* Define to 1 if 'wchar_t' is a signed integer type. */ #undef HAVE_SIGNED_WCHAR_T /* Define to 1 if 'wint_t' is a signed integer type. */ #undef HAVE_SIGNED_WINT_T /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_BITYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIMEB_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `unsetenv' function. */ #undef HAVE_UNSETENV /* Define to 1 if the system has the type `unsigned long long int'. */ #undef HAVE_UNSIGNED_LONG_LONG_INT /* Define to 1 if you have the header file. */ #undef HAVE_WCHAR_H /* Define if you have the 'wchar_t' type. */ #undef HAVE_WCHAR_T /* Define USE_XAW3D_INTERNATIONAL */ #undef HAVE_XAW3D_INTERNATIONAL /* Have ZIO Library */ #undef HAVE_ZIO /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Define to 1 if you have the `_ftime' function. */ #undef HAVE__FTIME /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ #undef MALLOC_0_IS_NONNULL /* Define MESSAGES */ #undef MESSAGES /* Define MESSAGE_NO_ESC */ #undef MESSAGE_NO_ESC /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define if exists and defines unusable PRI* macros. */ #undef PRI_MACROS_BROKEN /* Define PRODUCE_PS_LEVEL_ONE */ #undef PSLevel1 /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'ptrdiff_t'. */ #undef PTRDIFF_T_SUFFIX /* Define to 1 if readlink fails to recognize a trailing slash. */ #undef READLINK_TRAILING_SLASH_BUG /* Define to 1 if stat needs help when passed a directory name with a trailing slash */ #undef REPLACE_FUNC_STAT_DIR /* Define to 1 if stat needs help when passed a file name with a trailing slash */ #undef REPLACE_FUNC_STAT_FILE /* Use SIGCHLD as fallback for SIGCLD. */ #undef SIGCLD /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'sig_atomic_t'. */ #undef SIG_ATOMIC_T_SUFFIX /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'size_t'. */ #undef SIZE_T_SUFFIX /* 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 runtime. 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 do not work properly. */ #undef STAT_MACROS_BROKEN /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* "Define USER_DEFAULTS" */ #undef USER_DEFAULTS /* Define USE_FALLBACK_STYLES */ #undef USE_FALLBACK_STYLES /* Define USE_MEMMOVE_CODE */ #undef USE_MEMMOVE_CODE /* Define USE_SIGNAL_HANDLER */ #undef USE_SIGNAL_HANDLER /* Version number of package */ #undef VERSION /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'wchar_t'. */ #undef WCHAR_T_SUFFIX /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'wint_t'. */ #undef WINT_T_SUFFIX /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ #undef _LARGEFILE_SOURCE /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* Define to 500 only on HP-UX. */ #undef _XOPEN_SOURCE /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Define to rpl_ if the getopt replacement functions and variables should be used. */ #undef __GETOPT_PREFIX /* Ensure that defines the limit macros, since gnulib's relies on them. */ #if defined __cplusplus && !defined __STDC_LIMIT_MACROS && GL_TRIGGER_STDC_LIMIT_MACROS # define __STDC_LIMIT_MACROS 1 #endif /* Define to `int' if doesn't define. */ #undef gid_t /* Define to rpl_gmtime if the replacement function should be used. */ #undef gmtime /* 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 /* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. __APPLE__ && __MACH__ test for MacOS X. __APPLE_CC__ tests for the Apple compiler and its version. __STDC_VERSION__ tests for the C99 mode. */ #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ # define __GNUC_STDC_INLINE__ 1 #endif /* Define to rpl_localtime if the replacement function should be used. */ #undef localtime /* Define to the type of st_nlink in struct stat, or a supertype. */ #undef nlink_t /* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict /* Work around a bug in Sun C++: it does not support _Restrict or __restrict__, even though the corresponding Sun C compiler ends up with "#define restrict _Restrict" or "#define restrict __restrict__" in the previous line. Perhaps some future version of Sun C++ will work with restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict # define __restrict__ #endif /* Define to `int' if doesn't define. */ #undef uid_t /* Define as a marker that can be attached to declarations that might not be used. This helps to reduce warnings, such as from GCC -Wunused-parameter. */ #if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_UNUSED __attribute__ ((__unused__)) #else # define _GL_UNUSED #endif /* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name is a misnomer outside of parameter lists. */ #define _UNUSED_PARAMETER_ _GL_UNUSED gv-3.7.4/src/Switch.h0000664000076400007640000000265511735103745011313 00000000000000/* ** ** Switch.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _Switch_h_ #define _Switch_h_ #include "paths.h" #include "Button.h" extern WidgetClass switchWidgetClass; typedef struct _SwitchClassRec *SwitchWidgetClass; typedef struct _SwitchRec *SwitchWidget; extern void SwitchToggle (Widget, XEvent *, String *, Cardinal *); extern int SwitchIsSet (Widget); #endif /* _Switch_h_ */ gv-3.7.4/src/options_gv.c0000664000076400007640000005244212117142147012225 00000000000000/* ** ** options_gv.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include "config.h" #include #include #include #include #include #include "paths.h" #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_X11(Shell.h) #include INC_XAW(SimpleMenu.h) #include INC_XAW(SmeBSB.h) #include "Aaa.h" #include "Button.h" #include "FileSel.h" #include "Ghostview.h" #include "Frame.h" #include "MButton.h" #include "Switch.h" #include "types.h" #include "callbacks.h" #include "file.h" #include "widgets_misc.h" #include "main_resources.h" #include "main_globals.h" #include "misc.h" #include "note.h" #include "options.h" #include "options_gv.h" #include "ps.h" #include "doc_misc.h" #include "version.h" #include "resource.h" #include static Widget popup=NULL,optionControl; static Widget antialiasToggle; static Widget dscToggle,eofToggle,autoResizeToggle; static Widget swapLandscapeToggle,watchToggle; static Widget infoPopupLabel,infoPopupButton,infoPopupMenu; static Widget ascale; static Widget mediaLabel,mediaButton,mediaMenu=NULL; static Widget fmediaLabel,fmediaButton,fmediaMenu=NULL; static Widget orientLabel,orientButton,orientMenu; static Widget forientLabel,forientButton,forientMenu; static Widget scalesLabel,scalesButton,scalesMenu=NULL; static Widget scaleBaseLabel,scaleBaseButton,scaleBaseMenu=NULL; static int opt_orientation; static int opt_pagemedia; String orientations[5] = { 0 }; String popupVerb[5] = { 0 }; static String popupVerbExtern[5] = { "Silent", "Errors", "All", NULL }; static String orientationsExtern[5] = { "Portrait", "Landscape", "Upside-Down", "Seascape", 0 }; static void options_gv_create(void); static void options_gv_setOptionsAtEntry(void); /*------------------------------------------------------ OptionPopupStruct ------------------------------------------------------*/ OptionPopupStruct gv_options_gv_struct = { NULL, options_gv_create, options_gv_setOptionsAtEntry, False }; OptionPopup gv_options_gv = (OptionPopup) &gv_options_gv_struct; /*------------------------------------------------------ options_gv_setOptionsAtEntry ------------------------------------------------------*/ static void options_gv_setOptionsAtEntry(void) { String s; Arg args[2]; Cardinal n; int i; BEGINMESSAGE(options_gv_setOptionsAtEntry) widgets_setToggle(antialiasToggle, (app_res.antialias ? 1 : 0)); widgets_setToggle(dscToggle, ((gv_scanstyle & SCANSTYLE_IGNORE_DSC) ? 0 : 1)); widgets_setToggle(eofToggle, ((gv_scanstyle & SCANSTYLE_IGNORE_EOF) ? 1 : 0)); widgets_setToggle(autoResizeToggle, (app_res.auto_resize ? 1 : 0)); widgets_setToggle(swapLandscapeToggle, (gv_swap_landscape ? 1 : 0)); widgets_setToggle(watchToggle, (app_res.watch_file ? 1 : 0)); s=NULL; for (i = 0; orientations[i]; i++) { if (!strcasecmp(app_res.default_orientation,orientationsExtern[i])) s = orientations[i]; } if (!s) s = automaticLabel; n=0; XtSetArg(args[n], XtNlabel, s); n++; XtSetValues(orientButton, args, n); opt_orientation = doc_convStringToDocOrient(s); s=NULL; for (i = 0; orientations[i]; i++) { if (!strcasecmp(app_res.fallback_orientation,orientationsExtern[i])) s = orientations[i]; } if (!s) s = orientations[0]; n=0; XtSetArg(args[n], XtNlabel, s); n++; XtSetValues(forientButton, args, n); s=popupVerb[gv_infoVerbose]; n=0; XtSetArg(args[n], XtNlabel, s); n++; XtSetValues(infoPopupButton, args, n); { char number[80]; sprintf(number, "%.3f", gv_ascale*gv_ascale); widgets_setText(ascale, number); } ENDMESSAGE(options_gv_setOptionsAtEntry) } /*------------------------------------------------------ options_gv_getScales ------------------------------------------------------*/ static void options_gv_getScales(int *bP,int *sP) { Arg args[1]; Cardinal n; String bl,sl; int i,si=0,bi=0; BEGINMESSAGE(options_gv_getScales) *sP=*bP=-1; n=0; XtSetArg(args[n], XtNlabel, &bl); n++; XtGetValues(scaleBaseButton, args, n); n=0; XtSetArg(args[n], XtNlabel, &sl); n++; XtGetValues(scalesButton, args, n); for (i=0; gv_scales[i];i++) { if (gv_scales[i]->is_base) { if (!strcmp(gv_scales[i]->name,bl)) *bP=bi; si++; bi++; } else { if (!strcmp(gv_scales[i]->name,sl)) *sP=si; si++; } } ENDMESSAGE(options_gv_getScales) } /*------------------------------------------------------ options_gv_cb_apply ------------------------------------------------------*/ static void options_gv_cb_apply(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { Arg args[5]; Cardinal n; static Boolean s_media = False; static Boolean s_fmedia = False; static Boolean s_orient = False; static Boolean s_forient = False; Boolean b; int i,j,k; char* l; Boolean redisplay=False; Boolean reopen=False; String v; float Ascale; BEGINMESSAGE(options_gv_cb_apply) b = app_res.antialias; app_res.antialias = SwitchIsSet(antialiasToggle) ? True : False; cb_antialias(NULL,NULL,NULL); /* only change the menu entry */ if (b != app_res.antialias) reopen=True; i = gv_swap_landscape; gv_swap_landscape = SwitchIsSet(swapLandscapeToggle) ? 1 : 0; if (i != gv_swap_landscape) redisplay=True; b = SwitchIsSet(autoResizeToggle) ? True : False; if (b != app_res.auto_resize) { cb_autoResize(NULL,(XtPointer)1,NULL); } i = (gv_scanstyle & SCANSTYLE_IGNORE_DSC) ? 0 : 1; j = SwitchIsSet(dscToggle) ? 1 : 0; if (i != j) { gv_scanstyle = (gv_scanstyle & SCANSTYLE_IGNORE_DSC) ? (gv_scanstyle & ~SCANSTYLE_IGNORE_DSC) : (gv_scanstyle | SCANSTYLE_IGNORE_DSC); cb_handleDSC(NULL,NULL,NULL); reopen=True; } b = SwitchIsSet(watchToggle) ? True : False; if (b != app_res.watch_file) { cb_watchFile(NULL,(XtPointer)1,NULL); } i = (gv_scanstyle & SCANSTYLE_IGNORE_EOF ? 1 : 0); j = SwitchIsSet(eofToggle) ? 1 : 0; if (i != j) { gv_scanstyle = (gv_scanstyle & SCANSTYLE_IGNORE_EOF) ? (gv_scanstyle & ~SCANSTYLE_IGNORE_EOF) : (gv_scanstyle | SCANSTYLE_IGNORE_EOF); cb_handleEOF(NULL,NULL,NULL); reopen=True; } if (s_media) XtFree(app_res.default_pagemedia); n=0; XtSetArg(args[n], XtNlabel, &app_res.default_pagemedia);n++; XtGetValues(mediaButton, args, n); app_res.default_pagemedia = XtNewString(app_res.default_pagemedia); i = doc_convStringToPageMedia(NULL,app_res.default_pagemedia); if (i != opt_pagemedia) { INFMESSAGE(pagemedia changed) opt_pagemedia = i; j = gv_pagemedia_auto; k = gv_pagemedia; gv_pagemedia_auto = 0; i = doc_convStringToPageMedia(doc,app_res.default_pagemedia); cb_setPagemedia(NULL,(XtPointer)(intptr_t)i,(XtPointer)1); if ((j != gv_pagemedia_auto) || (k != gv_pagemedia)) redisplay = True; } s_media = True; if (s_fmedia) XtFree(app_res.fallback_pagemedia); n=0; XtSetArg(args[n], XtNlabel, &app_res.fallback_pagemedia);n++; XtGetValues(fmediaButton, args, n); app_res.fallback_pagemedia = XtNewString(app_res.fallback_pagemedia); gv_fallback_pagemedia = doc_convStringToPageMedia(NULL,app_res.fallback_pagemedia); s_fmedia = True; if (s_orient) XtFree(app_res.default_orientation); n=0; XtSetArg(args[n], XtNlabel, &v);n++; XtGetValues(orientButton, args, n); if (!strcmp(v, automaticLabel)) app_res.default_orientation = XtNewString("Automatic"); else if (!strcmp(v, orientations[0])) app_res.default_orientation = XtNewString(orientationsExtern[0]); else if (!strcmp(v, orientations[1])) app_res.default_orientation = XtNewString(orientationsExtern[1]); else if (!strcmp(v, orientations[2])) app_res.default_orientation = XtNewString(orientationsExtern[2]); else if (!strcmp(v, orientations[3])) app_res.default_orientation = XtNewString(orientationsExtern[3]); i = doc_convStringToDocOrient(app_res.default_orientation); if (i != opt_orientation) { INFMESSAGE(orientation changed) opt_orientation = i; j = gv_orientation_auto; k = gv_orientation; gv_orientation_auto = 0; cb_setOrientation(NULL,(XtPointer)(intptr_t)i,(XtPointer)(intptr_t)1); if ((j != gv_orientation_auto) || (k != gv_orientation)) redisplay = True; } s_orient = True; if (s_forient) XtFree(app_res.fallback_orientation); n=0; XtSetArg(args[n], XtNlabel, &v);n++; XtGetValues(forientButton, args, n); if (!strcmp(v, orientations[0])) app_res.fallback_orientation = XtNewString(orientationsExtern[0]); else if (!strcmp(v, orientations[1])) app_res.fallback_orientation = XtNewString(orientationsExtern[1]); else if (!strcmp(v, orientations[2])) app_res.fallback_orientation = XtNewString(orientationsExtern[2]); else if (!strcmp(v, orientations[3])) app_res.fallback_orientation = XtNewString(orientationsExtern[3]); gv_fallback_orientation = doc_convStringToDocOrient(app_res.fallback_orientation); s_forient = True; options_gv_getScales(&i,&j); if (i>=0 && i != gv_scale_base_current) { gv_scale_base = i; redisplay = True; } if (j>=0 && j != gv_scale_current) { gv_scale = j; redisplay = True; } n=0; XtSetArg(args[n], XtNlabel, &l); n++; XtGetValues(infoPopupButton, args, n); i=0;j=0; while (i<3) { if (!strcmp(popupVerb[i],l)) j = i; ++i; } if (j != gv_infoVerbose) { gv_infoVerbose = j; } v = options_squeeze(widgets_getText(ascale)); sscanf(v, "%f", &Ascale); Ascale=sqrt(Ascale); if (Ascale != gv_ascale) { gv_ascale = Ascale; redisplay = True; } if (reopen && gv_filename) { cb_stopInterpreter(page,NULL,NULL); show_page(REQUEST_REOPEN,NULL); } else if (redisplay) show_page(REQUEST_OPTION_CHANGE,NULL); ENDMESSAGE(options_gv_cb_apply) } static char* orientation2extern(String l) { int i; for (i=0; orientations[i]; i++) if (!strcmp(l, orientations[i])) return orientationsExtern[i]; if (!strcmp(l, automaticLabel)) return "Automatic"; return l; } static char* pagemedia2extern(String l) { if (!strcmp(l, automaticLabel)) return "Automatic"; return l; } /*------------------------------------------------------ options_gv_cb_save ------------------------------------------------------*/ static void options_gv_cb_save(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { int argn = 0; String argi[30]; String argv[30]; String l; Arg args[1]; Cardinal n; String t = "True"; String f = "False"; int i,s,b; char tmp[20]; BEGINMESSAGE(options_gv_cb_save) options_setArg(&(argi[argn]),&(argv[argn]),s_version ,gv_class ,versionResource); ++argn; options_setArg(&(argi[argn]),&(argv[argn]),s_respectDSC ,gv_class ,SwitchIsSet(dscToggle) ? t : f); ++argn; options_setArg(&(argi[argn]),&(argv[argn]),s_ignoreEOF ,gv_class ,SwitchIsSet(eofToggle) ? t : f); ++argn; options_setArg(&(argi[argn]),&(argv[argn]),s_watchFile ,gv_class ,SwitchIsSet(watchToggle) ? t : f); ++argn; options_setArg(&(argi[argn]),&(argv[argn]),s_antialias ,gv_class ,SwitchIsSet(antialiasToggle) ? t : f); ++argn; options_setArg(&(argi[argn]),&(argv[argn]),s_autoResize ,gv_class ,SwitchIsSet(autoResizeToggle) ? t : f); ++argn; options_setArg(&(argi[argn]),&(argv[argn]),s_swapLandscape ,gv_class ,SwitchIsSet(swapLandscapeToggle) ? t : f); ++argn; n=0; XtSetArg(args[n], XtNlabel, &l); n++; XtGetValues(mediaButton, args, n); options_setArg(&(argi[argn]),&(argv[argn]),s_pageMedia ,gv_class ,pagemedia2extern(l)); ++argn; XtGetValues(fmediaButton, args, n); options_setArg(&(argi[argn]),&(argv[argn]),s_fallbackPageMedia ,gv_class ,pagemedia2extern(l)); ++argn; XtGetValues(orientButton, args, n); options_setArg(&(argi[argn]),&(argv[argn]),s_orientation ,gv_class ,orientation2extern(l)); ++argn; XtGetValues(forientButton, args, n); options_setArg(&(argi[argn]),&(argv[argn]),s_fallbackOrientation,gv_class ,orientation2extern(l)); ++argn; options_gv_getScales(&b,&s); if (b>=0) { sprintf(tmp,"%d",b+1); options_setArg(&(argi[argn]),&(argv[argn]),s_scaleBase, gv_class ,tmp); ++argn; } if (s>=0) { for (i=0; gv_scales[i];i++) if (gv_scales[i]->is_center) break; sprintf(tmp,"%d",s-i); options_setArg(&(argi[argn]),&(argv[argn]),s_scale, gv_class ,tmp); ++argn; } n=0; XtSetArg(args[n], XtNlabel, &l); n++; XtGetValues(infoPopupButton, args, n); i=0; while (i<3) { if (!strcmp(popupVerb[i],l)) sprintf(tmp,"%s",popupVerbExtern[i]); ++i; } options_setArg(&(argi[argn]),&(argv[argn]),s_infoVerbose ,gv_class ,tmp); ++argn; options_save(argn,argi,argv); while (--argn >=0) { XtFree(argi[argn]); XtFree(argv[argn]); } ENDMESSAGE(options_gv_cb_save) } /*###################################################### options_gv_createScaleMenus ######################################################*/ void options_gv_createScaleMenus(void) { int i,sn=0,bn=0; Boolean change; Widget p,w; BEGINMESSAGE(options_gv_createScaleMenus) if (!popup) { INFMESSAGE(options not created) ENDMESSAGE(options_gv_createScaleMenus) return; } if (scalesMenu) { XtDestroyWidget(scalesMenu); scalesMenu = XtCreatePopupShell("menu", simpleMenuWidgetClass,scalesButton,NULL,(Cardinal)0); } else { options_createLabeledMenu("scales",optionControl,&scalesLabel,&scalesButton,&scalesMenu); } if (scaleBaseMenu) { XtDestroyWidget(scaleBaseMenu); scaleBaseMenu = XtCreatePopupShell("menu", simpleMenuWidgetClass,scaleBaseButton,NULL,(Cardinal)0); } else { options_createLabeledMenu("scaleBase",optionControl,&scaleBaseLabel,&scaleBaseButton,&scaleBaseMenu); } for (i = 0; gv_scales[i]; i++) { change=False; if (gv_scales[i]->is_base) { p = scaleBaseMenu; if (gv_scale_base_current==bn) change=True; sn++; bn++; } else { p = scalesMenu; if (gv_scale_current==sn) change=True; sn++; } w = XtCreateManagedWidget(gv_scales[i]->name,smeBSBObjectClass,p,NULL,(Cardinal)0); XtAddCallback(w, XtNcallback,options_cb_changeMenuLabel,NULL); if (change) options_cb_changeMenuLabel(w,NULL,NULL); } ENDMESSAGE(options_gv_createScaleMenus) } /*###################################################### options_gv_createMediaMenus ######################################################*/ void options_gv_createMediaMenus(void) { int i; Widget w; char *s; Arg args[1]; Cardinal n; BEGINMESSAGE(options_gv_createMediaMenus) if (!popup) { INFMESSAGE(options not created) ENDMESSAGE(options_gv_createMediaMenus) return; } if (mediaMenu) { XtDestroyWidget(mediaMenu); mediaMenu = XtCreatePopupShell("menu", simpleMenuWidgetClass,mediaButton,NULL,(Cardinal)0); } else { options_createLabeledMenu("media",optionControl,&mediaLabel,&mediaButton,&mediaMenu); } if (fmediaMenu) { XtDestroyWidget(fmediaMenu); fmediaMenu = XtCreatePopupShell("menu", simpleMenuWidgetClass,fmediaButton,NULL,(Cardinal)0); } else { options_createLabeledMenu("fmedia",optionControl,&fmediaLabel,&fmediaButton,&fmediaMenu); } w = XtCreateManagedWidget(automaticLabel,smeBSBObjectClass,mediaMenu,NULL,(Cardinal)0); XtAddCallback(w, XtNcallback,options_cb_changeMenuLabel,NULL); for (i = 0; gv_medias[i]; i++) { if (gv_medias[i]->used) { w = XtCreateManagedWidget(gv_medias[i]->name,smeBSBObjectClass, mediaMenu,NULL,(Cardinal)0); XtAddCallback(w, XtNcallback,options_cb_changeMenuLabel,NULL); if (i>0) { /* skip the bounding box */ w = XtCreateManagedWidget(gv_medias[i]->name,smeBSBObjectClass, fmediaMenu,NULL,(Cardinal)0); XtAddCallback(w, XtNcallback,options_cb_changeMenuLabel,NULL); } } } s=NULL; for (i = 0; gv_medias[i]; i++) { if (gv_medias[i]->used && !strcasecmp(app_res.default_pagemedia,gv_medias[i]->name)) s = gv_medias[i]->name; } if (!s) s = automaticLabel; n=0; XtSetArg(args[n], XtNlabel, s); n++; XtSetValues(mediaButton, args, n); opt_pagemedia = doc_convStringToPageMedia(NULL,s); s=NULL; for (i = 0; gv_medias[i]; i++) { if (gv_medias[i]->used && !strcasecmp(app_res.fallback_pagemedia,gv_medias[i]->name)) s = gv_medias[i]->name; } if (!s) { i=1; while (!gv_medias[i]->used) i++; s = gv_medias[1]->name; } n=0; XtSetArg(args[n], XtNlabel, s); n++; XtSetValues(fmediaButton, args, n); ENDMESSAGE(options_gv_createMediaMenus) } /*------------------------------------------------------ options_gv_create ------------------------------------------------------*/ void options_gv_create(void) { Arg args[10]; Cardinal n; Widget w; int i; BEGINMESSAGE(options_gv_create) if (popup) { INFMESSAGE(popup exists) ENDMESSAGE(options_gv_create) return; } n=0; XtSetArg(args[n], XtNallowShellResize, True); n++; popup = XtCreatePopupShell("optiongvPopup",transientShellWidgetClass,toplevel, args, n); gv_options_gv->popup = popup; n=0; optionControl = XtCreateManagedWidget("optionControl",aaaWidgetClass,popup,args,n); antialiasToggle = XtCreateManagedWidget("antialias",switchWidgetClass,optionControl,NULL,(Cardinal)0); autoResizeToggle = XtCreateManagedWidget("autoResize",switchWidgetClass,optionControl,NULL,(Cardinal)0); swapLandscapeToggle = XtCreateManagedWidget("swapLandscape",switchWidgetClass,optionControl,NULL,(Cardinal)0); dscToggle = XtCreateManagedWidget("respectDSC",switchWidgetClass,optionControl,NULL,(Cardinal)0); eofToggle = XtCreateManagedWidget("eof",switchWidgetClass,optionControl,NULL,(Cardinal)0); watchToggle = XtCreateManagedWidget("watch",switchWidgetClass,optionControl,NULL,(Cardinal)0); options_gv_createScaleMenus(); options_gv_createMediaMenus(); options_createLabeledMenu("orient",optionControl,&orientLabel,&orientButton,&orientMenu); w = XtCreateManagedWidget(automaticLabel,smeBSBObjectClass,orientMenu,args,n); XtAddCallback(w, XtNcallback,options_cb_changeMenuLabel,NULL); options_createLabeledMenu("forient",optionControl,&forientLabel,&forientButton,&forientMenu); for (i = 0; orientations[i]; i++) { w = XtCreateManagedWidget(orientations[i],smeBSBObjectClass, orientMenu,NULL,(Cardinal)0); XtAddCallback(w, XtNcallback,options_cb_changeMenuLabel,NULL); w = XtCreateManagedWidget(orientations[i],smeBSBObjectClass, forientMenu,NULL,(Cardinal)0); XtAddCallback(w, XtNcallback,options_cb_changeMenuLabel,NULL); } n=0; options_createLabeledMenu("infoVerbose",optionControl,&infoPopupLabel,&infoPopupButton,&infoPopupMenu); for (i = 0; popupVerb[i]; i++) { w = XtCreateManagedWidget(popupVerb[i],smeBSBObjectClass, infoPopupMenu,NULL,(Cardinal)0); XtAddCallback(w, XtNcallback,options_cb_changeMenuLabel,NULL); } ascale = widgets_createLabeledLineTextField("ascale", optionControl); w = XtCreateManagedWidget("apply", buttonWidgetClass,optionControl, args, n); XtAddCallback(w, XtNcallback, options_gv_cb_apply,NULL); XtInstallAccelerators(optionControl, w); w = XtCreateManagedWidget("save", buttonWidgetClass,optionControl, args, n); XtAddCallback(w, XtNcallback, options_gv_cb_save,NULL); XtInstallAccelerators(optionControl, w); w = XtCreateManagedWidget("dismiss", buttonWidgetClass,optionControl, args, n); XtAddCallback(w, XtNcallback, options_cb_popdown, (XtPointer)gv_options_gv); XtInstallAccelerators(optionControl, w); options_gv_setOptionsAtEntry(); options_realize(popup,optionControl); ENDMESSAGE(options_gv_create) } gv-3.7.4/src/actions.c0000664000076400007640000010673011736064614011506 00000000000000/* ** ** actions.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Authors: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** *+ Jose E. Marchesi (jemarch@gnu.org) ** GNU Project */ #include "ac_config.h" #include "message.h" #include "config.h" #include #include #include #include #include #include "paths.h" #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_XAW(Cardinals.h) #include INC_XAW(SimpleMenu.h) #include INC_XAW(SmeBSB.h) #include INC_XAW(SmeLine.h) #include INC_XAW(Scrollbar.h) #include INC_XAW(MenuButton.h) #include INC_X11(IntrinsicP.h) #include "Aaa.h" #include "Clip.h" #include "Ghostview.h" #include "MButton.h" #include "Vlist.h" #include "types.h" #include "actions.h" #include "callbacks.h" #include "ps.h" #include "doc_misc.h" #include "dialog.h" /* include the popup headers for action_delete_window */ #include "note.h" #include "info.h" #include "main_resources.h" #include "main_globals.h" #include "misc.h" #include "options.h" #include "version.h" /*##################################################################*/ /* action_shellConfigureNotify */ /*##################################################################*/ void action_shellConfigureNotify(Widget w, XEvent *event, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { static int width=0,height=0; int new_width=0,new_height=0; BEGINMESSAGE(action_shellConfigureNotify) if (w==toplevel && event->type == ConfigureNotify) { new_width = ((XConfigureEvent*)event)->width; new_height = ((XConfigureEvent*)event)->height; IIMESSAGE(new_width,new_height) } if (new_width && new_height) { if (gv_scales[gv_scale]->scale <= 0 && !app_res.auto_resize) { misc_savePagePosition(); show_page(REQUEST_NEW_SCALE,NULL); misc_resetPagePosition(); } if (width != new_width || height != new_height) { misc_setPageMarker(0,2,event,True); /* bring selected in sight */ width = new_width; height=new_height; } INFMESSAGE(action_shellConfigureNotify calling XawScrollbarSetThumb) XawScrollbarSetThumb(newtocScroll, VlistScrollPosition(newtoc), VlistVisibleLength(newtoc,newtocClip->core.height)); } ENDMESSAGE(action_shellConfigureNotify) } /*##################################################################*/ /* action_page */ /*##################################################################*/ static int scroll_success(Widget clip, int e, int x, int y, int nx, int ny) { int tx,ty; ClipWidgetCheckCoordinates(clip,nx,ny,&tx,&ty); if (((e&PAGE_H) && tx != x) || ((e&PAGE_V) && ty != y)) { INFMESSAGE(scrolling has effect) return(1); } else { INFMESSAGE(scrolling has no effect) return(0); } } static void catch_timer(XtPointer client_data, XtIntervalId *idp _GL_UNUSED) { Widget w = (Widget) client_data; Cardinal n = 0; BEGINMESSAGE(catch_timer) action_page(w,NULL,NULL,&n); ENDMESSAGE(catch_timer) } void action_page(Widget w, XEvent *event, String *params, Cardinal *num_params) { int a,e,x,y,nx,ny,cw,ch,d; float f; Widget clip,gvw,aaa; int i; char *s; static String *old_params = NULL; static int old_num_params = 0; String *pars; int npars; static XtIntervalId timer = 0; int page_changed = 0; int success=0; int old; float dc = 2.4; int dp; int z=0; BEGINMESSAGE(action_page) if (timer) { XtRemoveTimeOut(timer); timer = 0; } if (w && (XtClass(w) != ghostviewWidgetClass)) { Widget p=w; gvw=NULL; while (p && !gvw) { if (XtIsSubclass(p,shellWidgetClass)) gvw = XtNameToWidget(p,"*page"); p=XtParent(p); } } else gvw = w; aaa = XtParent(gvw); clip = XtParent(aaa); SMESSAGE(XtName(gvw)) SMESSAGE(XtName(aaa)) SMESSAGE(XtName(clip)) if (strstr(XtName(aaa),"zoomControl")) z=1; cw = (int)clip->core.width; ch = (int)clip->core.height; i = -1; while (!success) { ++i; if (i > 0 && i == old_num_params) { INFMESSAGE(freeing old parameters) i = 0; while (icore.x; ny = y = (int)aaa->core.y; if (a & PAGE_TOP) ny = 0; if (a & PAGE_BOTTOM) ny = -(int)aaa->core.height - 1000; if (a & PAGE_LEFTEDGE) nx = 0; if (a & PAGE_RIGHTEDGE) nx = -(int)aaa->core.width - 1000; if (a & (PAGE_LEFT|PAGE_RIGHT)) { d = (int)aaa->core.width-cw; if (d > 0) { /* scrolling left or right */ f = (dc*(float)d)/(float)cw; if (f<1) f = 1; d = (int)(((f/(float)abs((int)f))*(float)cw)/dc+1.0); if (a & PAGE_LEFT) nx = x + d; else nx = x - d; } } if (a & (PAGE_UP|PAGE_DOWN)) { d = (int)aaa->core.height - ch; if (d>0) { /* scrolling up or down */ f = (dc*(float)d)/(float)ch; if (f<1) f = 1; d = (int)(((f/(float)abs((int)f))*(float)ch)/dc+1.0); if (a & PAGE_UP) ny = y + d; else ny = y - d; } } if (a & PAGE_CENTER) { nx = -((int)aaa->core.width - cw)/2; ny = -((int)aaa->core.height - ch)/2; } if (a & PAGE_REDISPLAY) { if (XtIsSensitive(redisplayEntry)) { cb_redisplay(gvw,NULL,NULL); } } if (a & PAGE_PAGE) { int cp = current_page; cb_page((Widget)w,(XtPointer)s,(XtPointer)NULL); IIMESSAGE(cp,current_page) if (cp != current_page || (!toc_text && atoi(s)>0)) page_changed = 1; } if (page_changed) { if (e & PAGE_PAGE) success = 1; if (!old) goto save_params; } if (e&(PAGE_H|PAGE_V) && scroll_success(clip,e,x,y,nx,ny)) { ClipWidgetSetCoordinates(clip,nx,ny); success = 1; if (!GhostviewIsBusy(gvw)) misc_drawEyeGuide(gvw,EYEGUIDE_DRAW,x,y); } if (e&PAGE_NOT) success = success ? 0 : 1; # ifdef MESSAGES if (success) { INFMESSAGE(command successful) } else { INFMESSAGE(command failed) } # endif } ENDMESSAGE(action_page) return; save_params: INFMESSAGE(saving params) ++i; if (i<(int)*num_params) { old_num_params = *num_params - i; INFIMESSAGE(saving,old_num_params) old_params = (String*) XtMalloc(old_num_params*sizeof(String)); old=0; while (i < (int)*num_params) { old_params[old] = XtNewString(params[i]); INFSMESSAGE(saving,old_params[old]) ++i; old++; } timer = XtAppAddTimeOut(app_con,10,catch_timer,(XtPointer)w); } ENDMESSAGE(action_page) } /*##################################################################*/ /* action_menuPopdown */ /*##################################################################*/ void action_menuPopdown(Widget w, XEvent *event, String *params, Cardinal *num_params) { BEGINMESSAGE(action_menuPopdown) while (w) { w = XtParent(w); if (w && XtClass(w) == mbuttonWidgetClass) { ButtonUnset(w, event, params, num_params); w = (Widget)NULL; } } ENDMESSAGE(action_menuPopdown) } /*##################################################################*/ /* action_toc */ /*##################################################################*/ void action_toc(Widget w _GL_UNUSED, XEvent *event, String *params, Cardinal *num_params) { static int xf,yf,xo,yo,xp,yp,dyo; static Boolean scroll_initialized=False; static int startvisible; static Boolean scrolling=False; static int entryo = -1; Boolean toggle_mark=False; int entry,dy; Widget tocslider = newtocControl; Widget tocpanner = newtocClip; BEGINMESSAGE(action_toc) if (!strcmp(params[0],"scroll") && scroll_initialized) { int x,y,dh,ph; float deltay,m; ph = (int)tocpanner->core.height; if (ph<1) ph = 1; dh = ph - (int)tocslider->core.height; deltay = (float)(event->xbutton.y_root - yo); if (!app_res.reverse_scrolling) deltay = -deltay; m = 1.3*((float)tocslider->core.height/(float)ph); if (m<=1) m = 1; y = yp -(int)(m*deltay); yo = (int) event->xbutton.y_root; ph = (int)tocpanner->core.width; if (ph<1) ph = 1; dh = ph - (int)tocslider->core.width; deltay = (float)(event->xbutton.x_root - xo); if (!app_res.reverse_scrolling) deltay = -deltay; m = 1.3*((float)tocslider->core.width/(float)ph); if (m<=1) m = 1; x = xp +(int)(m*deltay); if (x0) x=0; xo = (int) event->xbutton.x_root; if (x!=xp) { ClipWidgetSetCoordinates(tocpanner,x,0); xp = x; } if (y!=yp) { VlistMoveFirstVisible(newtoc, startvisible, y); yp = y; } if (abs(xf-xo) > 6 || abs(yf-yo) > 6) scrolling = True; } else if (!strcmp(params[0],"scrollon")) { scroll_initialized = True; scrolling = False; xp = (int) tocslider->core.x; xf = xo = (int) event->xbutton.x_root; yp = 0; yf = yo = (int) event->xbutton.y_root; startvisible = VlistGetFirstVisible(newtoc); } else if (!strcmp(params[0],"scrolloff")) { scroll_initialized = False; scrolling = False; } else if (!strcmp(params[0],"select")) { if (!scrolling && toc_text) { entry = VlistEntryOfPosition(newtoc,(int)event->xbutton.y); if (entry >=0 && entry < doc->numpages) { misc_setPageMarker(entry,0,event,True); show_page(entry,NULL); } } } else if (!strcmp(params[0],"toggleon")) { toggle_mark = True; dyo = 0; yo = (int) event->xbutton.y_root; } else if (!strcmp(params[0],"toggleextend")) { entry = VlistEntryOfPosition(newtoc,(int)event->xbutton.y); dy = yo - (int) event->xbutton.y_root; if (dy*dyo < 0 || entry != entryo) toggle_mark = True; dyo = dy; yo = (int) event->xbutton.y_root; } else if (!strcmp(params[0],"toggleoff")) { entryo=-1; } else if (!strcmp(params[0],"highlight")) { entry = VlistEntryOfPosition(newtoc,(int)event->xbutton.y); if (entry != VlistHighlighted(newtoc)) VlistChangeHighlighted(newtoc,entry,XawVlistSet); } else if (!strcmp(params[0],"unhighlight")) { entry = VlistEntryOfPosition(newtoc,(int)event->xbutton.y); VlistChangeHighlighted(newtoc,entry,XawVlistUnset); } if (toggle_mark) { int st; scroll_initialized = False; entry = VlistEntryOfPosition(newtoc,(int)event->xbutton.y); if (entryo==-1 || entryo==entry) entryo=entry-1; if (entry<=entryo) st = -1; else st = 1; while (entryo != entry) { entryo += st; if (entryo>=0) VlistChangeMark(newtoc,entryo,XawVlistToggle); } } ENDMESSAGE(action_toc) } /*############################################################*/ /* action_otherPage */ /*############################################################*/ void action_otherPage(Widget w, XEvent *event, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { static int xo=0,yo=0; static Time to = 0; int x,y,vpwx,vpwy; Dimension vpww; Time t; Position px,py; Arg args[1]; Widget vpw; BEGINMESSAGE1(action_otherPage) if (event->type != ButtonRelease || w != page) { INFMESSAGE1(event not a button release or not in main window) ENDMESSAGE1(action_otherPage) return; } vpw = XtParent(XtParent(w)); XtTranslateCoords(vpw, 0, 0, &px, &py); vpwx = (int)px; vpwy = (int)py; x = ((int) event->xbutton.x_root) - vpwx + 1; y = ((int) event->xbutton.y_root) - vpwy + 1; t = ((XMotionEvent*)event)->time; #if 0 printf("to=%d xo=%d yo=%d\n",(int)to,xo,yo); printf("t= %d x= %d y= %d\n",(int)t,x,y); #endif if (t - to < 400) { if (xo - x < 2 && yo - y < 2) { XtSetArg(args[0], XtNwidth, &vpww); XtGetValues(vpw, args, ONE); if (2*x<(int)vpww) cb_page(w,(XtPointer)"-1",(XtPointer)NULL); else cb_page(w,(XtPointer)"+1",(XtPointer)NULL); } } to = t; xo = x; yo = y; ENDMESSAGE1(action_otherPage) } /*############################################################*/ /* action_movePage */ /*############################################################*/ void action_movePage(Widget w, XEvent *event, String *params, Cardinal *num_params) { # define HISTORY_POINTS 10 # define DECAY_TIME 200 int x,y; static int posx[HISTORY_POINTS+1],posix; static int posy[HISTORY_POINTS+1],posiy; static int xp,yp,pw,ph,pvw,pvh; static Bool initialized=False; static Time to; Widget vpw; BEGINMESSAGE1(action_movePage) if (XtClass(w) != ghostviewWidgetClass) { INFMESSAGE1(not a ghostview widget) ENDMESSAGE1(action_movePage) return; } vpw = XtParent(XtParent(w)); if (*num_params) { if (!strcmp(params[0],"adjusted")) { /* called by cb_pageAdjustNotify */ XawPannerReport *rep= (XawPannerReport*) params[1]; INFMESSAGE(adjusting) xp = (int) (-rep->slider_x); yp = (int) (-rep->slider_y); pw = (int) (rep->canvas_width); ph = (int) (rep->canvas_height); pvw = (int) (rep->slider_width); pvh = (int) (rep->slider_height); IIMESSAGE1(xp,yp) IIMESSAGE1(pw,ph) IIMESSAGE1(pvw,pvh) initialized = True; } else if (!strcmp(params[0],"move")) { INFMESSAGE(moving) if (event->type != MotionNotify) goto break_movePage; if (initialized==True && pvw && pvh) { int dx,dy; double relfactor=1.0; /* some default value */ double absfactor=0.0; /* some default value */ x = (int) event->xbutton.x_root; y = (int) event->xbutton.y_root; if ((((XMotionEvent*)event)->time - to) > DECAY_TIME) { if (posix>0) { posx[0]=posx[posix]; posix=0; } if (posiy>0) { posy[0]=posy[posiy]; posiy=0; } } if (posix>0 && (x-posx[posix])*(posx[posix]-posx[posix-1]) < 0) { posx[0]=posx[posix]; posix=0; } if (posiy>0 && (y-posy[posiy])*(posy[posiy]-posy[posiy-1]) < 0) { posy[0]=posy[posiy]; posiy=0; } to = ((XMotionEvent*)event)->time; ++posix; ++posiy; if (posix>HISTORY_POINTS) { posix=1; while (posix<=HISTORY_POINTS) { posx[posix-1]=posx[posix]; posix++; } posix=HISTORY_POINTS; } posx[posix] = x; if (posiy>HISTORY_POINTS) { posiy=1; while (posiy<=HISTORY_POINTS) { posy[posiy-1]=posy[posiy]; posiy++; } posiy=HISTORY_POINTS; } posy[posiy] = y; dx = (x - posx[0])/(posix); dy = (y - posy[0])/(posiy); #if 0 printf("time=%d x=%d y=%d dx=%d dy=%d\n",(int)to,x,y,dx,dy); printf("posix=%d posx[posix]=%d posx[0]=%d\n",posix,posx[posix],posx[0]); printf("posiy=%d posy[posiy]=%d posy[0]=%d\n",posiy,posy[posiy],posy[0]); #endif if (dx || dy) { if (*num_params>=2) relfactor = atof((char*)(params[1])); relfactor = relfactor >= 0 ? (relfactor<=100 ? relfactor : 100) : 0; if (*num_params>=3) absfactor = atof((char*)(params[2])); absfactor = absfactor >= 0 ? (absfactor<=200 ? absfactor : 200) : 0; DDMESSAGE1(absfactor,relfactor) if (app_res.reverse_scrolling) { dx = -dx; dy = -dy; } xp = (int) (xp-(dx*absfactor)-(relfactor*pw*dx)/pvw); yp = (int) (yp-(dy*absfactor)-(relfactor*ph*dy)/pvh); ClipWidgetSetCoordinates(vpw,xp,yp); } } } else if (!strcmp(params[0],"start")) { Position positx,posity; Arg args[2]; INFMESSAGE(start) if (event->type != ButtonPress) goto break_movePage; initialized = False; gv_scroll_mode = SCROLL_MODE_GHOSTVIEW; XtSetArg(args[0], XtNx, (Position*)&positx); XtSetArg(args[1], XtNy, (Position*)&posity); XtGetValues(XtParent(w), args, TWO); xp = (int)positx; yp = (int)posity; posix=posiy=0; posx[0] = (int) event->xbutton.x_root; posy[0] = (int) event->xbutton.y_root; to = ((XMotionEvent*)event)->time; IIMESSAGE1(xp,yp) ClipWidgetSetCoordinates(vpw,xp,yp); } else if (!strcmp(params[0],"stop")) { INFMESSAGE(stop) gv_scroll_mode = SCROLL_MODE_NONE; initialized = False; } } ENDMESSAGE1(action_movePage) return; break_movePage: INFMESSAGE1(interrupting due to wrong event type) initialized = False; gv_scroll_mode = SCROLL_MODE_NONE; ENDMESSAGE1(action_movePage) return; } /*##################################################################*/ /* action_panner */ /*##################################################################*/ void action_panner(Widget w, XEvent *event, String *params, Cardinal *num_params) { int x,y,cw,ch; static int xo,yo,xp,yp; static Bool initialized=False; BEGINMESSAGE(action_panner) if (!strcmp(params[0],"move") && initialized) { INFMESSAGE1(move) y = yp + (int)event->xbutton.y_root - yo; ch = (int)w->core.height-(int)slider->core.height; if (y>ch) y=ch; else if (y<0) y=0; x = xp + (int)event->xbutton.x_root - xo; cw = (int)w->core.width-(int)slider->core.width; if (x>cw) x=cw; else if (x<0) x=0; if (x!=xp || y!=yp) { int pxp,pyp,dw,dh; XtMoveWidget(slider,x,y); IIMESSAGE(x,y) IIMESSAGE(xp,yp) IIMESSAGE(xo,yo) dw = (int)viewControl->core.width - (int)viewClip->core.width; dh = (int)viewControl->core.height - (int)viewClip->core.height; if (cw) pxp = (x*dw+cw/2)/cw; else pxp = 0; if (ch) pyp = (y*dh+ch/2)/ch; else pyp = 0; IIMESSAGE(x,y) IIMESSAGE(xp,yp) IIMESSAGE(xo,yo) IIMESSAGE(pxp,pyp) ClipWidgetSetCoordinates(viewClip,-pxp,-pyp); xp = x; xo = (int) event->xbutton.x_root; yp = y; yo = (int) event->xbutton.y_root; } } else if (strcmp(params[0],"on") == 0) { INFMESSAGE(on) gv_scroll_mode = SCROLL_MODE_PANNER; initialized = True; xp = (int) slider->core.x; xo = (int) event->xbutton.x_root; yp = (int) slider->core.y; yo = (int) event->xbutton.y_root; } else if (strcmp(params[0],"off") == 0) { INFMESSAGE(off) gv_scroll_mode = SCROLL_MODE_NONE; initialized = False; } ENDMESSAGE(action_panner) } /*##################################################################*/ /* action_handleDSC */ /* Call the cb_handleDSC callback */ /*##################################################################*/ void action_handleDSC(Widget w, XEvent *event _GL_UNUSED, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { BEGINMESSAGE(action_handleDSC) cb_handleDSC(w, (XtPointer)1, NULL); ENDMESSAGE(action_handleDSC) } /*##################################################################*/ /* action_antialias */ /* Call the cb_antialias callback */ /*##################################################################*/ void action_antialias(Widget w, XEvent *event _GL_UNUSED, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { BEGINMESSAGE(action_antialias) cb_antialias(w, (XtPointer)1, NULL); ENDMESSAGE(action_antialias) } /*##################################################################*/ /* action_quit */ /* Call the quit callback to stop ghostview */ /*##################################################################*/ void action_quit(Widget w, XEvent *event _GL_UNUSED, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { BEGINMESSAGE(action_quit) cb_quitGhostview(w, NULL, NULL); ENDMESSAGE(action_quit) } /*##################################################################*/ /* action_open */ /* Popup the open file dialog box. */ /*##################################################################*/ void action_open(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { BEGINMESSAGE(action_open) cb_openFile((Widget)NULL,(XtPointer)NULL, NULL); ENDMESSAGE(action_open) } /*##################################################################*/ /* action_reopen */ /*##################################################################*/ void action_reopen(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { BEGINMESSAGE(action_reopen) if (!XtIsSensitive(reopenEntry)) {INFMESSAGE(insensitive) ENDMESSAGE(action_reopen) return; } cb_reopen((Widget)NULL,(XtPointer)NULL,(XtPointer)NULL); ENDMESSAGE(action_reopen) } /*##################################################################*/ /* action_savepos */ /*##################################################################*/ void action_savepos(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { BEGINMESSAGE(action_savepos) if (!XtIsSensitive(saveposEntry)) {INFMESSAGE(insensitive) ENDMESSAGE(action_savepos) return; } cb_savepos((Widget)NULL,(XtPointer)NULL,(XtPointer)NULL); ENDMESSAGE(action_savepos) } /*##################################################################*/ /* action_presentation */ /*##################################################################*/ void action_presentation(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { BEGINMESSAGE(action_savepos) if (!XtIsSensitive(presentationEntry)) {INFMESSAGE(insensitive) ENDMESSAGE(action_presentation) return; } cb_presentation((Widget)NULL,(XtPointer)NULL,(XtPointer)NULL); ENDMESSAGE(action_presentation) } /*##################################################################*/ /* action_save */ /* Popup the save file dialog box. */ /*##################################################################*/ void action_save(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, String *params, Cardinal *num_params) { BEGINMESSAGE(action_save) if (*num_params<1) { INFMESSAGE(no parameter) ENDMESSAGE(action_save) return; } SMESSAGE(params[0]) if (!strcmp(params[0],"marked")) { INFMESSAGE(saving marked) if (!XtIsSensitive(saveMarkedEntry)) { INFMESSAGE(save denied) ENDMESSAGE(action_save)return; } cb_save((Widget)NULL,(XtPointer)(PAGE_MODE_CURRENT|PAGE_MODE_MARKED),NULL); } else if (!strcmp(params[0],"all")) { INFMESSAGE(saving all) if (!XtIsSensitive(saveAllEntry)) { INFMESSAGE(save denied) ENDMESSAGE(action_save) return; } cb_save((Widget)NULL,(XtPointer)(PAGE_MODE_ALL),NULL); } ENDMESSAGE(action_save) } /*##################################################################*/ /* action_print */ /* Popup the print file dialog box. */ /*##################################################################*/ void action_print(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, String *params, Cardinal *num_params) { BEGINMESSAGE(action_print) if (*num_params<1) { INFMESSAGE(no parameter) ENDMESSAGE(action_print) return; } if (!strcmp(params[0],"marked")) { if (!XtIsSensitive(printMarkedEntry)) { INFMESSAGE(print denied) ENDMESSAGE(action_print) return; } cb_print((Widget)NULL,(XtPointer)(PAGE_MODE_CURRENT|PAGE_MODE_MARKED),NULL); } else if (!strcmp(params[0],"all")) { if (!XtIsSensitive(printAllEntry)) { INFMESSAGE(print denied) ENDMESSAGE(action_print) return; } cb_print((Widget)NULL,(XtPointer)PAGE_MODE_ALL,NULL); } ENDMESSAGE(action_print) } void action_print_pos(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { BEGINMESSAGE(action_print_pos) cb_print_pos((Widget)NULL,0,NULL); ENDMESSAGE(action_print_pos) } /*##################################################################*/ /* action_setPageMark */ /* Call the cb_setPageMark callback */ /*##################################################################*/ void action_setPageMark(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, String *params, Cardinal *num_params) { char *current = "current"; char *even = "even"; char *odd = "odd"; char *mark = "mark"; char *toggle = "toggle"; int spm=0; BEGINMESSAGE(action_setPageMark) if (*num_params<2) { INFMESSAGE(no parameters)ENDMESSAGE(action_setPageMark)return; } if (!strcmp(params[0],even)) spm=spm|SPM_EVEN; else if (!strcmp(params[0],odd)) spm=spm|SPM_ODD; else if (!strcmp(params[0],current)) spm=spm|SPM_CURRENT; else spm=spm|SPM_ALL; if (!strcmp(params[1],toggle)) spm=spm|SPM_TOGGLE; else if (!strcmp(params[1],mark)) spm=spm|SPM_MARK; else spm=spm|SPM_UNMARK; cb_setPageMark((Widget)NULL,(XtPointer)(intptr_t)spm,NULL); ENDMESSAGE(action_setPageMark) } /*##################################################################*/ /* action_autoResize */ /* Call the cb_autoResize callback */ /*##################################################################*/ void action_autoResize(Widget w, XEvent *event _GL_UNUSED, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { BEGINMESSAGE(action_autoResize) cb_autoResize(w, (XtPointer)1, NULL); ENDMESSAGE(action_autoResize) } /*##################################################################*/ /* action_setScale */ /*##################################################################*/ void action_setScale(Widget w, XEvent *event _GL_UNUSED, String *params, Cardinal *num_params) { int i; BEGINMESSAGE(action_setScale) if (*num_params < 1) { INFMESSAGE(no parameters) ENDMESSAGE(action_setScale) return; } if (!strcmp(params[0],"+")) i = (gv_scale+1)|SCALE_ABS; else if (!strcmp(params[0],"-")) i = (gv_scale-1)|SCALE_ABS; else { i = atoi(params[0]); if (i<0) i = (-i)|SCALE_MIN; i |= SCALE_REL; } cb_setScale(w, (XtPointer)(intptr_t)i, NULL); ENDMESSAGE(action_setScale) } /*##################################################################*/ /* action_setOrientation */ /* Set orientation action routine. Converts text parameter * to XtPageOrientation and calls cb_setOrientation callback */ /*##################################################################*/ void action_setOrientation(Widget w, XEvent *event _GL_UNUSED, String *params, Cardinal *num_params) { int o; BEGINMESSAGE(action_setOrientation) if (*num_params != 1) { INFMESSAGE(no parameter) ENDMESSAGE(action_set_orientation) return; } o = doc_convStringToDocOrient(params[0]); if (o != O_UNSPECIFIED) cb_setOrientation(w, (XtPointer)(intptr_t)o, NULL); ENDMESSAGE(action_setOrientation) } /*##################################################################*/ /* action_setPagemedia */ /* Set pagemedia action routine. Converts text parameter * to index into the pagemedia widgets and calls the cb_setPagemedia * callback. */ /*##################################################################*/ void action_setPagemedia(Widget w, XEvent *event _GL_UNUSED, String *params, Cardinal *num_params) { int m; BEGINMESSAGE(action_setPagemedia) if (*num_params != 1) { INFMESSAGE(no parameter) ENDMESSAGE(action_set_pagemedia) return; } m = doc_convStringToPageMedia(doc,params[0]); if (m!= MEDIA_ID_INVALID) cb_setPagemedia(w, (XtPointer)(intptr_t)m, NULL); ENDMESSAGE(action_setPagemedia) } /*##################################################################*/ /* action_dismissPopup */ /* dismiss a popup window */ /*##################################################################*/ #define IS_ZOOM(sss) (!strcmp(XtName(sss),"zoomPopup")) void action_dismissPopup(Widget w, XEvent *event _GL_UNUSED, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { Widget s; BEGINMESSAGE(action_dismissPopup) if (w) { INFSMESSAGE(calling widget:,XtName(w)) if (XtClass(w) == aaaWidgetClass) s = XtParent(w); else s = w; if (s==infopopup) {INFMESSAGE(infopopup) cb_popdownInfoPopup((Widget)NULL,NULL,NULL); } else if (s==dialogpopup) {INFMESSAGE(dialogpopup) cb_popdownDialogPopup((Widget)NULL,NULL,NULL); } else if (s==notepopup) {INFMESSAGE(notepopup) cb_popdownNotePopup((Widget)NULL,NULL,NULL); } else if (s==gv_options_fs->popup) { INFMESSAGE(options fs) options_cb_popdown((Widget)NULL,(XtPointer)gv_options_fs,NULL); } else if (s==gv_options_gs->popup) { INFMESSAGE(options gs) options_cb_popdown((Widget)NULL,(XtPointer)gv_options_gs,NULL); } else if (s==gv_options_gv->popup) { INFMESSAGE(options gv) options_cb_popdown((Widget)NULL,(XtPointer)gv_options_gv,NULL); } else if (s==gv_options_setup->popup) { INFMESSAGE(options setup) options_cb_popdown((Widget)NULL,(XtPointer)gv_options_setup,NULL); } else if (s==versionpopup) {INFMESSAGE(versionpopup) cb_popdownVersionPopup((Widget)NULL,NULL,NULL); } else if (s==FileSel_popup) {INFMESSAGE(Filesel_popup) XtPopdown(s); } else if IS_ZOOM(s) {INFMESSAGE(zoomPopup) XtDestroyWidget(s); } } ENDMESSAGE(action_dismissPopup) } /*##################################################################*/ /* action_deleteWindow */ /* Implement WM_DELETE_WINDOW protocol */ /*##################################################################*/ void action_deleteWindow(Widget w, XEvent *event, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { BEGINMESSAGE(action_deleteWindow) if (w) { INFSMESSAGE(widget:,XtName(w)) if (event->type == ClientMessage && (Atom)event->xclient.data.l[0] == wm_delete_window) { if (w==toplevel) { INFMESSAGE(toplevel) cb_quitGhostview((Widget)NULL,NULL,NULL); } else { action_dismissPopup(w,NULL,NULL,NULL); } } } ENDMESSAGE(action_deleteWindow) } /*##################################################################*/ /* action_eraseLocator */ /* Pop down locator window */ /*##################################################################*/ void action_eraseLocator(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { Arg args[1]; BEGINMESSAGE1(action_eraseLocator) if (!show_locator) {INFMESSAGE1(no locator)ENDMESSAGE1(action_erase_locator)return;} XtSetArg(args[0], XtNlabel, ""); XtSetValues(locator, args, ONE); ENDMESSAGE1(action_eraseLocator) } /*##################################################################*/ /* action_checkFile */ /* Check to see if file changed */ /*##################################################################*/ void action_checkFile(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, String *params, Cardinal *num_params) { BEGINMESSAGE(action_checkFile) if (*num_params != 1) {INFMESSAGE(no parameters) ENDMESSAGE(action_checkFile) return;} if (!strcmp(params[0],"date")) cb_checkFile((Widget)NULL,(XtPointer)CHECK_FILE_DATE,NULL); else if (!strcmp(params[0],"version")) cb_checkFile((Widget)NULL,(XtPointer)CHECK_FILE_VERSION,NULL); ENDMESSAGE(action_checkFile) } /*##################################################################*/ /* action_watchFile */ /*##################################################################*/ void action_watchFile(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { BEGINMESSAGE(action_watchFile) cb_watchFile(NULL,(XtPointer)1,NULL); ENDMESSAGE(action_watchFile) } void clean_safe_tempdir(void) { if (gv_safe_gs_tempdir) { chdir("/"); rmdir(gv_safe_gs_workdir); } } gv-3.7.4/src/nls/0000775000076400007640000000000012121323370010531 500000000000000gv-3.7.4/src/nls/nl.UTF-8.dat0000664000076400007640000001526712117147722012403 00000000000000! !** Copyright (C) 2011 Gajus Dirkzwager ! ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2 of the License, 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 General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ! GV*copyright.Label: Copyright GV*miscmenuLabel.label: Overige Menu Items GV*optionsgv.Label: gv Opties ... GV*mark.Label: Markeer GV*dismiss.Label: Annuleer GV*x11devLabel.label: Apparaat GV*scratchDirLabel.label: Klad Directory GV*quitstyle.always.Label: Altijd GV*misc.label: Overig GV*miscMenu.stop.label: Stop Interpreter GV*strings.stillInProgress: Proces momenteel lopende: GV*miscMenu.save_all.label: Save All GV*center.Label: Center GV*saveDirLabel.label: Save Directory GV*printMarkedPages.Label: Print Gemarkeerde Pagina's ... GV*update.Label: Update GV*optionsgs.Label: Ghostscript Opties ... GV*infoPopup.title: Ghostscript Berichten GV*safeDir.label: VeiligeDir GV*dirsLabel.label: Standaard Directories GV*presentation.Label: Presentatie Modus GV*scanLabel.label: Scan PDF GV*optiongvPopup*magLabel.label: Schaal GV*button2.label: Open Bestand GV*saveAllPages.Label: Save Document ... GV*optionsetupPopup.title: Setup Opties GV*optiongvPopup*respectDSC.label: Respecteer DSC GV*miscMenu.save_marked.label: Save Gemarked GV*strings.putTexCommand: Voeg TeX commando toe aan huidige positie. GV*strings.execOfFailed: Uitvoer van %s Mislukt GV*scrolling.label: Tegengesteld Scrollen GV*optiongvPopup*forientLabel.label: Standaard Orientatie GV*pageButton*unmark.Label: Demarkeer Alles GV*button1.label: Annuleer GV*quitstyle.whenprocessing.Label: Tijdens Verwerking GV*filters.label: Filters: GV*confirmLabel.label: Bevestig Annulering GV*title.filename.Label: Bestandsnaam GV*automatic.Label: Automatisch GV*unmark.Label: Demarkeer GV*printMarked.label: Print Gemarked GV*optiongvPopup*orientLabel.label: \ Orientatie \ GV*optiongvPopup*fmediaLabel.label: Standaard Papier Afmeting GV*confirmPopup*done.label: Annuleer GV*optiongvPopup*autoResize.label: Variabele Afmeting GV*defaults.label: Systeeminstellingen GV*uncompressLabel.label: Uitpakken GV*reopen.Label: Herladen GV*miscMenu.unmark.label: Demarkeer Alles GV*safer.label: Veiliger GV*saveMarked.label: Save Gemarkeerd GV*title.notitle.Label: Geen Titel GV*dsc.Label: Respecteer Document Structuur GV*optiongvPopup*swapLandscape.label: Verwissel Landschap GV*pixmap.Label: Backing Pixmap GV*miscMenu.update.label: Update Bestand GV*strings.passwordPrompt: Wachtwoord: GV*miscMenu.print_marked.label: Print Gemarkeerd GV*strings.openFile: Open Bestand GV*scalesLabel.label: Schaalverdelingen GV*savepos.Label: Savepositie GV*pageButton.Label: Pagina GV*x11alphadevLabel.label: Anti-alias Apparaat GV*saveAll.label: Save Alles GV*open.Label: Open ... GV*miscMenu.toggle_current.label: Toggle Huidig GV*fileButton.Label: Bestand GV*miscMenu.toggle_odd.label: Toggle Oneven GV*miscMenu.toggle_even.label: Toggle Even GV*printCommandLabel.label: Print Commando GV*antialias.Label: Anti-alias GV*updateFile.label: Update Bestand GV*optiongsPopup.title: Ghostscript Opties GV*quiet.label: Stil GV*confirmPopup.title: Bevestig GV*mediasLabel.label: Media Afmetingen GV*optionfsPopup.title: Bestand Selectie Opties GV*show.Label: Herlaad GV*optiongvPopup*mediaLabel.label: \ Papier Afmeting \ GV*convLabel.label: Converteer PDF GV*zoomPopup.title: Zoem GV*optiongvPopup.title: gv Opties GV*stateButton.Label: Status GV*strings.passwordRequired: Wachtwoord Vereist GV*confirmPrint.label: Bevesting Afdrukken GV*pageButton*current.Label: Toggle huidige markering GV*optionssetup.Label: Configuratie Opties ... GV*ascaleLabel.Label: Arbitraire Schaal GV*next.Label: Volgende GV*filterLabel.label: Standaard Filter GV*seascape.Label: Zeegezicht GV*cancel.Label: Annuleer GV*watch.Label: Bestand Monitoren GV*titleLabel.Label: Beeld Titel Af GV*filtersLabel.label: Bestand Selectie Filters GV*checkFile.label: Controleer Bestand GV*processButton.Label: \ verwerken GV*toggleOdd.label: GV*strings.saveMarkedPages: Save Gemarkeerde Pagina's GV*optiongvPopup*scalesLabel.label: \ Schaal \ GV*toggleCurrent.label: GV*stop.Label: Stop Interpreter GV*dialogPopup*cancel.label: Annuleer GV*fileSelPopup.title: Open Bestand GV*eyeGuide.label: Scroll Gids GV*upsidedown.Label: Ondersteboven GV*pageButton*even.Label: Toggle Even Markeringen GV*quit.Label: Afsluiten GV*magmenuLabel.label: Mag Menu Items GV*gs.errors.none.Label: Geen GV*nextPage.Label: >> GV*eof.Label: Negeer EOF commentaar GV*rescan.label: Herlaad Directory GV*miscMenu.print_all.label: Print Alles GV*strings.copyrightTranslation: Gajus Dirkzwager GV*landscape.Label: Landschap GV*printAllPages.Label: Print Document ... GV*gsLabel.label: Interpreter GV*optiongvPopup*antialias.label: Anti-alias GV*strings.texCommand: TeX commando GV*printAll.label: Print Alles GV*argumentsLabel.label: Argumenten GV*toggleEven.label: GV*infoVerboseLabel.Label: info Popup GV*gs.errors.all.Label: Alles GV*scaleBaseLabel.label: Schaal Methode GV*screenSizeLabel.label: Scherm Afmeting (mm) GV*dialogPopup.title: Dialoog GV*unmarkAll.label: GV*strings.saveCurrentPage: Save Huidige Pagina GV*strings.quitConfirm: Weet u zeker dat u het programma wilt afsluiten? GV*autoCenter.label: Auto Centreer GV*redisplay.label: Herladen GV*size.Label: Automatisch Herschalen GV*prevPage.Label: << GV*prev.Label: Vorige GV*title.documenttitle.Label: Document Titel GV*confirmPopup*cancel.label: Annuleren GV*openFile.label: Openen GV*saveMarkedPages.Label: Save Gemarkeerde Pagina's ... GV*strings.saveDocument: Save Document GV*pageButton*odd.Label: Toggle Oneven Markeringen GV*save.label: Save GV*notePopup.title: Bericht GV*optionsfs.Label: Bestand Selectie Opties ... GV*swap.Label: Verwissel Landschap GV*portrait.Label: Portret GV*optiongvPopup*eof.label: Negeer EOF GV*strings.saveAsPDF: Save als PDF GV*gs.errors.errors.Label: Foutmeldingen GV*quitstyle.never.Label: Nooit GV*apply.label: Toepassen GV*watchFile.Label: Bestand Volgen GV*miscMenu.redisplay.label: Herladen GV*dirs.label: Directories GV*notePopup*done.label: Ok gv-3.7.4/src/nls/es.utf8.dat0000664000076400007640000001576212117147722012464 00000000000000! ! ** Copyright (C) 2011 César Gil ** ! ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, go to ! or write to the ! Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ! GV*copyright.Label: Copyright GV*miscmenuLabel.label: Entradas de menú variadas GV*optionsgv.Label: Opciones de gv ... GV*mark.Label: Marcar GV*dismiss.Label: Descartar GV*x11devLabel.label: Device GV*scratchDirLabel.label: Directorio de inicio GV*quitstyle.always.Label: Siempre GV*misc.label: Varios GV*miscMenu.stop.label: Parar intérprete GV*strings.stillInProgress: Todavía en curso: GV*miscMenu.save_all.label: Guardar todo GV*center.Label: Centrar GV*saveDirLabel.label: Guardar directorio GV*printMarkedPages.Label: Imprimir páginas marcadas ... GV*update.Label: Actualizar GV*optionsgs.Label: Opciones de Ghostscript ... GV*infoPopup.title: Mensajes de Ghostscript GV*safeDir.label: SafeDir GV*dirsLabel.label: Directorios de selección de archivos GV*presentation.Label: Modo de presentación GV*scanLabel.label: Buscar en el PDF GV*optiongvPopup*magLabel.label: Escala GV*button2.label: Abrir archivo GV*saveAllPages.Label: Guardar documento ... GV*optionsetupPopup.title: Opciones de configuración GV*optiongvPopup*respectDSC.label: Respetar DSC GV*miscMenu.save_marked.label: Guardar marcadas GV*strings.putTexCommand: Insertar comando de TeX en la posición actual GV*strings.execOfFailed: Ejecución de %s falló GV*scrolling.label: Desplazamiento inverso GV*optiongvPopup*forientLabel.label: Orientación alternativa GV*pageButton*unmark.Label: Desmarcar todas GV*button1.label: Cancelar GV*quitstyle.whenprocessing.Label: Mientras procesa GV*filters.label: Filtros: GV*confirmLabel.label: Confirme finalizar GV*title.filename.Label: Nombre de archivo GV*automatic.Label: Automático GV*unmark.Label: Desmarcar GV*printMarked.label: Imprimir marcadas GV*optiongvPopup*orientLabel.label: \ Orientación \ GV*optiongvPopup*fmediaLabel.label: Tamaño de papel alternativo GV*confirmPopup*done.label: Finalizar GV*optiongvPopup*autoResize.label: Tamaño variable GV*defaults.label: Predeterminados del sistema GV*uncompressLabel.label: Descomprimir GV*reopen.Label: Recargar GV*miscMenu.unmark.label: Desmarcar todo GV*safer.label: Safer GV*saveMarked.label: Guardar marcadas GV*title.notitle.Label: Sin título GV*dsc.Label: Respetar la estructura del documento GV*optiongvPopup*swapLandscape.label: Cambiar apaisado GV*pixmap.Label: Backing Pixmap GV*miscMenu.update.label: Actualizar archivo GV*strings.passwordPrompt: Contraseña: GV*miscMenu.print_marked.label: Imprimir marcadas GV*strings.openFile: Abrir archivo GV*scalesLabel.label: Escalas GV*savepos.Label: Guardar posición GV*pageButton.Label: Página GV*x11alphadevLabel.label: Dispositivo de suavizado GV*saveAll.label: Guardar todo GV*open.Label: Abrir ... GV*miscMenu.toggle_current.label: Marcar actual GV*fileButton.Label: Archivo GV*miscMenu.toggle_odd.label: Marcar impares GV*miscMenu.toggle_even.label: Marcar pares GV*printCommandLabel.label: Print Command GV*antialias.Label: Suavizado de bordes GV*updateFile.label: Actualizar archivo GV*optiongsPopup.title: Opciones de Ghostscript GV*quiet.label: Discreto GV*confirmPopup.title: Confirmar GV*mediasLabel.label: Tamaño del medio GV*optionfsPopup.title: Opciones de selección de archivos GV*show.Label: Refrescar imagen GV*optiongvPopup*mediaLabel.label: \ Tamaño del papel \ GV*convLabel.label: Convert PDF GV*zoomPopup.title: Zoom GV*optiongvPopup.title: Opciones de gv GV*stateButton.Label: Estado GV*strings.passwordRequired: Se requiere contraseña GV*confirmPrint.label: Confirme imprimir GV*pageButton*current.Label: Marcar página actual GV*optionssetup.Label: Opciones de configuración ... GV*ascaleLabel.Label: Escala arbitraria GV*next.Label: Siguiente GV*filterLabel.label: Filtro por defecto GV*seascape.Label: Apaisado antihorario GV*cancel.Label: Cancelar GV*watch.Label: Ver archivo GV*titleLabel.Label: Mostrar título GV*filtersLabel.label: Filtros de selección de archivos GV*checkFile.label: Comprobar archivo GV*processButton.Label: \ procesando GV*toggleOdd.label: GV*strings.saveMarkedPages: Guardar páginas marcadas GV*optiongvPopup*scalesLabel.label: \ Escala \ GV*toggleCurrent.label: GV*stop.Label: Parar intérprete GV*dialogPopup*cancel.label: Cancelar GV*fileSelPopup.title: Abrir archivo GV*eyeGuide.label: Scrolling Eye Guide GV*upsidedown.Label: Invertido GV*pageButton*even.Label: Marcar páginas pares GV*quit.Label: Finalizar GV*magmenuLabel.label: Mag Menu Entries GV*gs.errors.none.Label: Ninguno GV*nextPage.Label: >> GV*eof.Label: Ignorar comentarios de fin de fichero GV*rescan.label: Volver a buscar en directorio GV*miscMenu.print_all.label: Imprimir todo GV*strings.copyrightTranslation: César Gil GV*landscape.Label: Apaisado GV*printAllPages.Label: Imprimir documento ... GV*gsLabel.label: Interpreter GV*optiongvPopup*antialias.label: Suavizado de bordes GV*strings.texCommand: Comando de TeX GV*printAll.label: Imprimir todo GV*argumentsLabel.label: Argumentos GV*toggleEven.label: GV*infoVerboseLabel.Label: info Popup GV*gs.errors.all.Label: Todo GV*scaleBaseLabel.label: Base de la escala GV*screenSizeLabel.label: Tamaño de pantalla (mm) GV*dialogPopup.title: Diálogo GV*unmarkAll.label: GV*strings.saveCurrentPage: Guardar página actual GV*strings.quitConfirm: ¿Realmente quiere finalizar? GV*autoCenter.label: Centrado automático GV*redisplay.label: Recargar GV*size.Label: Redimensionado variable GV*prevPage.Label: << GV*prev.Label: Anterior GV*title.documenttitle.Label: Título del documento GV*confirmPopup*cancel.label: Cancelar GV*openFile.label: Abrir GV*saveMarkedPages.Label: Guardar páginas marcadas ... GV*strings.saveDocument: Guardar documento GV*pageButton*odd.Label: Marcar páginas impares GV*save.label: Guardar GV*notePopup.title: Mensaje GV*optionsfs.Label: Opciones de selección de archivos ... GV*swap.Label: Cambiar apaisado GV*portrait.Label: Vertical GV*optiongvPopup*eof.label: Ignorar fin de fichero GV*strings.saveAsPDF: Guardar como PDF GV*gs.errors.errors.Label: Errores GV*quitstyle.never.Label: Nunca GV*apply.label: Aplicar GV*watchFile.Label: Ver archivo GV*miscMenu.redisplay.label: Recargar GV*dirs.label: Directories GV*notePopup*done.label: ¡Hecho! gv-3.7.4/src/nls/fr.UTF-8.dat0000664000076400007640000001613012117147722012367 00000000000000! !** Copyright (C) 2010 Quentin Gibeaux ! ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ! GV*copyright.Label: Copyright GV*miscmenuLabel.label: Menu d'entrée diverses GV*optionsgv.Label: Options de gv... GV*mark.Label: Sélectionner GV*dismiss.Label: Annuler GV*x11devLabel.label: Périphérique GV*scratchDirLabel.label: Répertoire tampon GV*quitstyle.always.Label: Toujours GV*misc.label: Divers GV*miscMenu.stop.label: Arrêter l'interpréteur GV*strings.stillInProgress: Encore en travail : GV*miscMenu.save_all.label: Sauvegarder tout GV*center.Label: Centrer GV*saveDirLabel.label: Répertoire de sauvegarde GV*printMarkedPages.Label: Imprimer pages marquées... GV*update.Label: Actualiser GV*optionsgs.Label: Options de Ghostscript... GV*infoPopup.title: Messages Ghostscript GV*safeDir.label: SafeDir GV*dirsLabel.label: Répertoire de sélections des fichiers GV*presentation.Label: Mode présentation GV*scanLabel.label: Analyse du PDF GV*optiongvPopup*magLabel.label: Échelle GV*button2.label: Ouvrir le fichier GV*saveAllPages.Label: Sauvegarder le document... GV*optionsetupPopup.title: Paramètres GV*optiongvPopup*respectDSC.label: Respecter les DSC GV*miscMenu.save_marked.label: Sauvegarder marquées GV*strings.putTexCommand: Insérer une commande TeX à la position actuelle GV*strings.execOfFailed: L'exécution de %s a échoué GV*scrolling.label: Défilement inversé GV*optiongvPopup*forientLabel.label: Orientation Fallback GV*pageButton*unmark.Label: Déselectionner tout GV*button1.label: Annuler GV*quitstyle.whenprocessing.Label: Lorsqu'en calcul GV*filters.label: Filtres : GV*confirmLabel.label: Confirmer la fermeture GV*title.filename.Label: Nom du fichier GV*automatic.Label: Automatique GV*unmark.Label: Déselectionner GV*printMarked.label: Imprimer marquées GV*optiongvPopup*orientLabel.label: \ Orientation \ GV*optiongvPopup*fmediaLabel.label: Format papier Fallback GV*confirmPopup*done.label: Quitter GV*optiongvPopup*autoResize.label: Taille variable GV*defaults.label: Paramètres par défaut GV*uncompressLabel.label: Décompresser GV*reopen.Label: Recharger GV*miscMenu.unmark.label: Déselectionner tout GV*safer.label: Safer GV*saveMarked.label: Sauvegarder marquées GV*title.notitle.Label: Pas de titre GV*dsc.Label: Respecter la structure du document GV*optiongvPopup*swapLandscape.label: Passer en paysage GV*pixmap.Label: Sous-couche de pixels GV*miscMenu.update.label: Actualiser le fichier GV*strings.passwordPrompt: Mot de passe: GV*miscMenu.print_marked.label: Imprimer marquées GV*strings.openFile: Ouvrir un fichier GV*scalesLabel.label: Échelles GV*savepos.Label: Sauvegarde de la position GV*pageButton.Label: Page GV*x11alphadevLabel.label: Périphérique antialias GV*saveAll.label: Sauvegarder tout GV*open.Label: Ouvrir... GV*miscMenu.toggle_current.label: Marquer page courrante GV*fileButton.Label: Fichier GV*miscMenu.toggle_odd.label: Marquer impaires GV*miscMenu.toggle_even.label: Marquer paires GV*printCommandLabel.label: Commande d'affichage GV*antialias.Label: Antialias GV*updateFile.label: Actualiser le fichier GV*optiongsPopup.title: Options Ghostscript GV*quiet.label: Muet GV*confirmPopup.title: Confirmer GV*mediasLabel.label: Taille des media GV*optionfsPopup.title: Option de sélection de fichier GV*show.Label: Reafficher GV*optiongvPopup*mediaLabel.label: \ Taille du papier \ GV*convLabel.label: Convertion du PDF GV*zoomPopup.title: Zoom GV*optiongvPopup.title: Options de gv GV*stateButton.Label: État GV*strings.passwordRequired: Mot de passe requis GV*confirmPrint.label: Confirmer l'impression GV*pageButton*current.Label: Inverser marquage courrant GV*optionssetup.Label: Paramètres... GV*ascaleLabel.Label: Taille arbitraire GV*next.Label: Suivant GV*filterLabel.label: Filtre par défaut GV*seascape.Label: Paysage renversé GV*cancel.Label: Annuler GV*watch.Label: Voir le fichier GV*titleLabel.Label: Montrer le titre GV*filtersLabel.label: Filtres de sélection de fichiers GV*checkFile.label: Vérifier le fichier GV*processButton.Label: \ calcul GV*toggleOdd.label: GV*strings.saveMarkedPages: Sauvegarder pages marquées GV*optiongvPopup*scalesLabel.label: \ Échelle \ GV*toggleCurrent.label: GV*stop.Label: Arrêter l'interprêteur GV*dialogPopup*cancel.label: Annuler GV*fileSelPopup.title: Ouvrir un fichier GV*eyeGuide.label: Guide de défilement visuel GV*upsidedown.Label: Portrait renversé GV*pageButton*even.Label: Inverser marquage paire GV*quit.Label: Quitter GV*magmenuLabel.label: Menu d'entrée Mag GV*gs.errors.none.Label: Aucun GV*nextPage.Label: >> GV*eof.Label: Ignorer les commentaires de fin de fichier GV*rescan.label: Actualiser le répertoire GV*miscMenu.print_all.label: Imprimer tout GV*strings.copyrightTranslation: Quentin Gibeaux GV*landscape.Label: Paysage GV*printAllPages.Label: Impression ... GV*gsLabel.label: Interpréteur GV*optiongvPopup*antialias.label: Antialias GV*strings.texCommand: Commande TeX GV*printAll.label: Imprimer tout GV*argumentsLabel.label: Arguments GV*toggleEven.label: GV*infoVerboseLabel.Label: Message d'information GV*gs.errors.all.Label: Tout GV*scaleBaseLabel.label: Échelle de base GV*screenSizeLabel.label: Taille de l'écran (mm) GV*dialogPopup.title: Fenêtre de dialoge GV*unmarkAll.label: GV*strings.saveCurrentPage: Sauvegarder la page courrante GV*strings.quitConfirm: Voulez-vous réellement quitter ? GV*autoCenter.label: Centrer automatiquement GV*redisplay.label: Recharger GV*size.Label: Mise à l'échelle automatique GV*prevPage.Label: << GV*prev.Label: Précédent GV*title.documenttitle.Label: Titre du document GV*confirmPopup*cancel.label: Annuler GV*openFile.label: Ouvrir GV*saveMarkedPages.Label: Sauvegarder pages marquées... GV*strings.saveDocument: Sauvegarder le document GV*pageButton*odd.Label: Inverser marquage impaire GV*save.label: Sauvegarder GV*notePopup.title: Message GV*optionsfs.Label: Options de sélection de fichier... GV*swap.Label: Passer en paysage GV*portrait.Label: Portrait GV*optiongvPopup*eof.label: Ignorer le marqueur EOF GV*strings.saveAsPDF: Sauvegarder en PDF GV*gs.errors.errors.Label: Erreurs GV*quitstyle.never.Label: Jamais GV*apply.label: Appliquer GV*watchFile.Label: Voir le fichier GV*miscMenu.redisplay.label: Recharger GV*dirs.label: Réportoires GV*notePopup*done.label: Ok gv-3.7.4/src/nls/README.txt0000664000076400007640000000012411735103745012160 00000000000000This file is ignored ond only there to ensure that the nls directory is not empty. gv-3.7.4/src/nls/LANGUAGES0000664000076400007640000000014111735103745011712 00000000000000noint:de ko_KR.UTF-8 ja_JP.UTF-8 it.UTF-8 fr.UTF-8 de.UTF-8 nl.UTF-8 es.utf8 es.UTF-8 -> es.utf8 gv-3.7.4/src/nls/it.UTF-8.dat0000664000076400007640000001542712117147722012404 00000000000000! !** Copyright (C) 2010 Marco Paolone ! ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ! GV*copyright.Label: Copyright GV*miscmenuLabel.label: Altre voci del menu GV*optionsgv.Label: Opzioni di gv ... GV*mark.Label: Seleziona GV*dismiss.Label: Annulla GV*x11devLabel.label: Periferica GV*scratchDirLabel.label: Cartella base GV*quitstyle.always.Label: Sempre GV*misc.label: Varie GV*miscMenu.stop.label: Ferma interprete GV*strings.stillInProgress: Ancora in corso: GV*miscMenu.save_all.label: Salva tutto GV*center.Label: Centra GV*saveDirLabel.label: Salva cartella GV*printMarkedPages.Label: Stampa pagine selezionate ... GV*update.Label: Aggiorna GV*optionsgs.Label: Opzioni di Ghostscript ... GV*infoPopup.title: Messaggi di Ghostscript GV*safeDir.label: SafeDir GV*dirsLabel.label: Cartelle di selezione dei file GV*presentation.Label: Modalità presentazione GV*scanLabel.label: Scasiona PDF GV*optiongvPopup*magLabel.label: Scala GV*button2.label: Apri file GV*saveAllPages.Label: Salva documento ... GV*optionsetupPopup.title: Impostazioni GV*optiongvPopup*respectDSC.label: Rispetta DSC GV*miscMenu.save_marked.label: Salva selezionate GV*strings.putTexCommand: Inserisci un comando TeX nella posizione corrente GV*strings.execOfFailed: Esecuzione di %s fallita GV*scrolling.label: Scorrimento inverso GV*optiongvPopup*forientLabel.label: Orientamento sostitutivo GV*pageButton*unmark.Label: Deseleziona tutte GV*button1.label: Annulla GV*quitstyle.whenprocessing.Label: Durante l'analisi GV*filters.label: Filtri: GV*confirmLabel.label: Conferma uscita GV*title.filename.Label: Nome file GV*automatic.Label: Automatico GV*unmark.Label: Deseleziona GV*printMarked.label: Stampa selezionate GV*optiongvPopup*orientLabel.label: \ Orientamento \ GV*optiongvPopup*fmediaLabel.label: Dimensione foglio GV*confirmPopup*done.label: Esci GV*optiongvPopup*autoResize.label: Dimensione variabile GV*defaults.label: Predefiniti di sistema GV*uncompressLabel.label: Decomprimi GV*reopen.Label: Ricarica GV*miscMenu.unmark.label: Deseleziona tutto GV*safer.label: Safer GV*saveMarked.label: Salva selezionate GV*title.notitle.Label: Senza titolo GV*dsc.Label: Rispetta struttura del documento GV*optiongvPopup*swapLandscape.label: Passa a panorama GV*pixmap.Label: Backing Pixmap GV*miscMenu.update.label: Aggiorna file GV*strings.passwordPrompt: Password: GV*miscMenu.print_marked.label: Stampa selezionate GV*strings.openFile: Apri file GV*scalesLabel.label: Scale GV*savepos.Label: Salva posizione GV*pageButton.Label: Pagina GV*x11alphadevLabel.label: Periferica antialias GV*saveAll.label: Salva tutto GV*open.Label: Apri ... GV*miscMenu.toggle_current.label: Seleziona pagina corrente GV*fileButton.Label: File GV*miscMenu.toggle_odd.label: Seleziona pagine pari GV*miscMenu.toggle_even.label: Seleziona pagine dispari GV*printCommandLabel.label: Comando di stampa GV*antialias.Label: Antialias GV*updateFile.label: Aggiorna file GV*optiongsPopup.title: Opzioni Ghostscript GV*quiet.label: Silenzioso GV*confirmPopup.title: Conferma GV*mediasLabel.label: Dimensioni dei media GV*optionfsPopup.title: Opzioni di selezione del file GV*show.Label: Revisualizzare GV*optiongvPopup*mediaLabel.label: \ Dimensione foglio \ GV*convLabel.label: Converti PDF GV*zoomPopup.title: Zoom GV*optiongvPopup.title: Opzioni di gv GV*stateButton.Label: Stato GV*strings.passwordRequired: Password richiesta GV*confirmPrint.label: Conferma stampa GV*pageButton*current.Label: Inverti la selezione corrente GV*optionssetup.Label: Impostazioni ... GV*ascaleLabel.Label: Scala arbitraria GV*next.Label: Successiva GV*filterLabel.label: Filtro predefinito GV*seascape.Label: Panorama inverso GV*cancel.Label: Annulla GV*watch.Label: Osserva file GV*titleLabel.Label: Mostra titolo GV*filtersLabel.label: Filtri di selezione file GV*checkFile.label: Analizza file GV*processButton.Label: \ analisi in corso GV*toggleOdd.label: GV*strings.saveMarkedPages: Salva pagine selezionate GV*optiongvPopup*scalesLabel.label: \ Scala \ GV*toggleCurrent.label: GV*stop.Label: Ferma interprete GV*dialogPopup*cancel.label: Annulla GV*fileSelPopup.title: Apri file GV*eyeGuide.label: Guida visuale di scorrimento GV*upsidedown.Label: Sottosopra GV*pageButton*even.Label: Inverti selezione pari GV*quit.Label: Esci GV*magmenuLabel.label: Voci del meni Mag GV*gs.errors.none.Label: Nessuno GV*nextPage.Label: >> GV*eof.Label: Ignora commenti EOF GV*rescan.label: Scansiona nuovamente cartella GV*miscMenu.print_all.label: Stampa GV*strings.copyrightTranslation: Marco Paolone GV*landscape.Label: Panorama GV*printAllPages.Label: Stampa documento ... GV*gsLabel.label: Interprete GV*optiongvPopup*antialias.label: Antialias GV*strings.texCommand: Comando TeX GV*printAll.label: Stampa tutto GV*argumentsLabel.label: Argomenti GV*toggleEven.label: GV*infoVerboseLabel.Label: Messaggio di informazione GV*gs.errors.all.Label: Tutto GV*scaleBaseLabel.label: Scala di base GV*screenSizeLabel.label: Dimensione schermo (mm) GV*dialogPopup.title: Dialogo GV*unmarkAll.label: GV*strings.saveCurrentPage: Salva pagina corrente GV*strings.quitConfirm: Si desidera davvero uscire ? GV*autoCenter.label: Centra automaticamente GV*redisplay.label: Ricarica GV*size.Label: Ridimensionamento automatico GV*prevPage.Label: << GV*prev.Label: Precedente GV*title.documenttitle.Label: Titolo documento GV*confirmPopup*cancel.label: Annulla GV*openFile.label: Apri GV*saveMarkedPages.Label: Salva pagine selezionate ... GV*strings.saveDocument: Salva documento GV*pageButton*odd.Label: Inverti selezione dispari GV*save.label: Salva GV*notePopup.title: Messaggio GV*optionsfs.Label: Opzioni di selezione file ... GV*swap.Label: Passa a panorama GV*portrait.Label: Ritratto GV*optiongvPopup*eof.label: Ignora EOF GV*strings.saveAsPDF: Salva come PDF GV*gs.errors.errors.Label: Errori GV*quitstyle.never.Label: Mai GV*apply.label: Applica GV*watchFile.Label: Osserva file GV*miscMenu.redisplay.label: Ricarica GV*dirs.label: Cartelle GV*notePopup*done.label: Ok gv-3.7.4/src/nls/ja_JP.UTF-8.dat0000664000076400007640000001570711735103746012757 00000000000000! !** Copyright (C) 1995, 1996, 1997 Johannes Plass ! ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2 of the License, 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 General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ! ! Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ! Department of Physics ! Johannes Gutenberg-University ! Mainz, Germany ! ! ! gv_ja_JP.eucJP.ad ! Japanese NLS label for gv by ! 1998 Yasuyuki Furukawa (yasu@on.cs.keio.ac.jp) ! !##### Zoom Popup GV*zoomPopup.title: GV - æ‹¡å¤§ç”»é¢ !##### Info Popup GV*infoPopup.title: GhostScriptメッセージ !##### Dialog Popup GV*dialogPopup.title: ダイアログ !##### Note Popup GV*notePopup.title: メッセージ !##### Confirm Popup GV*confirmPopup.title: ç¢ºèª !##### OptionsSetup Popup GV*optionfsPopup.title: ãƒ•ã‚¡ã‚¤ãƒ«é¸æŠžã‚ªãƒ—ã‚·ãƒ§ãƒ³ !##### OptionsGS Popup GV*optiongsPopup.title: Ghostscriptオプション !##### OptionsGV Popup GV*optiongvPopup.title: GVオプション !##### OptionsSetup Popup GV*optionsetupPopup.title: セットアップオプション !##### FileSet Popup GV*fileSelPopup.title: ファイルを開ã !################################################ !##### Labels !################################################ GV*cancel.Label: キャンセル GV*dismiss.Label: é–‰ã˜ã‚‹ GV*apply.label: é©ç”¨ GV*copyright.Label: 著作権 GV*quit.Label: 終了 GV*fileButton.Label: ファイル GV*open.Label: é–‹ã ... GV*reopen.Label: å†ã‚ªãƒ¼ãƒ—ン GV*update.Label: æ›´æ–° GV*printAllPages.Label: 文章å°åˆ· ... GV*printMarkedPages.Label: マークã—ãŸãƒšãƒ¼ã‚¸ã®å°åˆ·... GV*saveAllPages.Label: 文章ä¿å­˜ ... GV*saveMarkedPages.Label: マークã—ãŸãƒšãƒ¼ã‚¸ã®ä¿å­˜... GV*stateButton.Label: 環境設定 GV*stop.Label: 割り込ã¿åœæ­¢ GV*dsc.Label: 文書構造ã«ã‚ˆã‚‹ã‚¹ãƒšã‚¯ãƒˆèª¿æ•´ GV*eof.Label: EOFコメントを無視 GV*antialias.Label: アンãƒã‚¨ã‚¤ãƒªã‚¢ã‚¹ GV*watchFile.Label: 自動ファイル更新 GV*showTitle.Label: タイトル表示 GV*pixmap.Label: Backing Pixmap GV*size.Label: 自動サイズ変更 GV*watch.Label: 自動ファイル更新 GV*optionsgv.Label: GVオプション... GV*optionsfs.Label: ãƒ•ã‚¡ã‚¤ãƒ«é¸æŠžã‚ªãƒ—ã‚·ãƒ§ãƒ³... GV*optionsgs.Label: Ghostscriptオプション... GV*optionssetup.Label: セットアップオプション... GV*pageButton.Label: ページ GV*next.Label: 次㸠GV*show.Label: å†è¡¨ç¤º GV*prev.Label: å‰ã¸ GV*center.Label: 中央 GV*pageButton*current.Label: ç¾åœ¨ã®ãƒšãƒ¼ã‚¸ã‚’マーク/解除 GV*pageButton*even.Label: å¶æ•°ãƒšãƒ¼ã‚¸ã‚’マーク/解除 GV*pageButton*odd.Label: 奇数ページをマーク/解除 GV*pageButton*unmark.Label: 全マーク解除 GV*processButton.Label: \ 実行 GV*mark.Label: マーク GV*prevPage.Label: << GV*nextPage.Label: >> GV*unmark.Label: マーク解除 GV*automatic.Label: 自動 GV*portrait.Label: ãƒãƒ¼ãƒˆãƒ¬ãƒ¼ãƒˆ GV*landscape.Label: ランドスケープ GV*upsidedown.Label: 上下å転 GV*seascape.Label: 逆ランドスケープ GV*swap.Label: ãƒ©ãƒ³ãƒ‰ã‚¹ã‚±ãƒ¼ãƒ—å¤‰æ› GV*toggleCurrent.label: ç¾åœ¨ã®ãƒšãƒ¼ã‚¸ãƒžãƒ¼ã‚¯/解除 GV*toggleEven.label: å¶æ•°ãƒšãƒ¼ã‚¸ãƒžãƒ¼ã‚¯/解除 GV*toggleOdd.label: 奇数ページマーク/解除 GV*unmarkAll.label: 全マーク解除 GV*printAll.label: å…¨å°åˆ· GV*printMarked.label: マーク部分å°åˆ· GV*saveAll.label: å…¨ä¿å­˜ GV*saveMarked.label: マーク部分ä¿å­˜ GV*openFile.label: é–‹ã GV*redisplay.label: å†è¡¨ç¤º GV*updateFile.label: ファイル更新 GV*checkFile.label: ファイルãƒã‚§ãƒƒã‚¯ GV*filters.label: フィルタ: GV*dirs.label: ディレクトリ GV*button1.label: キャンセル GV*button2.label: ファイルを開ã GV*rescan.label: ディレクトリå†èª­è¾¼ GV*screenSizeLabel.label: ç”»é¢ã‚µã‚¤ã‚º[mm] GV*versionPopup*versionDone*label: é–‰ã˜ã‚‹ GV*dialogPopup*cancel.label: キャンセル GV*notePopup*done.label: 了解 GV*confirmPopup*cancel.label: キャンセル GV*confirmPopup*done.label: 終了 GV*save.label: ä¿å­˜ GV*optiongvPopup*mediaLabel.label: \ 用紙サイズ \ GV*optiongvPopup*fmediaLabel.label: åˆ¤åˆ¥ä¸æ˜Žæ™‚ã®ç”¨ç´™ã‚µã‚¤ã‚º GV*optiongvPopup*orientLabel.label: \ 用紙ã®å‘ã \ GV*optiongvPopup*forientLabel.label: åˆ¤åˆ¥ä¸æ˜Žæ™‚ã®ç”¨ç´™å‘ã GV*optiongvPopup*magLabel.label: æ‹¡å¤§ç¸®å° GV*optiongvPopup*antialias.label: アンãƒã‚¨ã‚¤ãƒªã‚¢ã‚¹ GV*optiongvPopup*respectDSC.label: DSCを有効 GV*optiongvPopup*eof.label: EOFを無視 GV*optiongvPopup*autoResize.label: å¯å¤‰ã‚µã‚¤ã‚º GV*optiongvPopup*swapLandscape.label: ãƒ©ãƒ³ãƒ‰ã‚¹ã‚±ãƒ¼ãƒ—å¤‰æ› GV*optiongvPopup*scalesLabel.label: \ スケール \ GV*miscmenuLabel.label: ãã®ä»–メニューエントリ GV*magmenuLabel.label: 拡大メニューエントリ GV*mediasLabel.label: メディアã®å¤§ãã• GV*confirmLabel.label: 終了時ã®ç¢ºèª GV*misc.label: ãã®ä»– GV*scrolling.label: スクロールå転 GV*eyeGuide.label: スクロールガイド GV*confirmPrint.label: å°åˆ·æ™‚ã®ç¢ºèª GV*uncompressLabel.label: 圧縮展開 GV*autoCenter.label: 自動的ã«ä¸­å¤®ã¸ GV*printCommandLabel.label: å°åˆ·ã‚³ãƒžãƒ³ãƒ‰ GV*scratchDirLabel.label: スクラッãƒãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª GV*saveDirLabel.label: ä¿å­˜ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª GV*scalesLabel.label: スケール GV*scaleBaseLabel.label: スケールベース GV*safer.label: より安全㫠GV*quiet.label: 終了 GV*defaults.label: システム標準値 GV*scanLabel.label: PDF読ã¿è¾¼ã¿ GV*convLabel.label: PDFå¤‰æ› GV*gsLabel.label: Postscriptエンジン GV*x11devLabel.label: デãƒã‚¤ã‚¹ GV*x11alphadevLabel.label: アンãƒã‚¨ã‚¤ãƒªã‚¢ã‚¹ãƒ‡ãƒã‚¤ã‚¹ GV*argumentsLabel.label: 引数 GV*filtersLabel.label: ãƒ•ã‚¡ã‚¤ãƒ«é¸æŠžãƒ•ã‚£ãƒ«ã‚¿ GV*dirsLabel.label: ãƒ•ã‚¡ã‚¤ãƒ«é¸æŠžãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª GV*filterLabel.label: 標準フィルタ GV*miscMenu.update.label: ファイル更新 GV*miscMenu.redisplay.label: å†è¡¨ç¤º GV*miscMenu.stop.label: 割り込ã¿åœæ­¢ GV*miscMenu.toggle_current.label: ç¾åœ¨ã®ãƒšãƒ¼ã‚¸ãƒžãƒ¼ã‚¯/解除 GV*miscMenu.toggle_odd.label: 奇数ページマーク/解除 GV*miscMenu.toggle_even.label: å¶æ•°ãƒšãƒ¼ã‚¸ãƒžãƒ¼ã‚¯/解除 GV*miscMenu.unmark.label: 全マーク解除 GV*miscMenu.print_all.label: å…¨å°åˆ· GV*miscMenu.print_marked.label: マーク部分å°åˆ· GV*miscMenu.save_all.label: å…¨ä¿å­˜ GV*miscMenu.save_marked.label: マーク部分ä¿å­˜ gv-3.7.4/src/nls/de.UTF-8.dat0000664000076400007640000001640011735103745012352 00000000000000! !** Copyright (C) 2010 Markus Steinborn ! ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2 of the License, 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 General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ! GV*miscmenuLabel.label: Extras: Menüeinträge GV*x11devLabel.label: Gerät GV*scratchDirLabel.label: Scratch Directory GV*misc.label: Extras GV*miscMenu.stop.label: Interpreter beenden GV*miscMenu.save_all.label: Alles speichern GV*saveDirLabel.label: Ordner zum Speichern GV*infoPopup.title: Ghostscript-Meldungen GV*dirsLabel.label: Dateiauswahlordner GV*scanLabel.label: Scan PDF GV*optiongvPopup*magLabel.label: Größe GV*button2.label: Datei öffnen GV*optionsetupPopup.title: Allg. Einstellungen GV*optiongvPopup*respectDSC.label: DSC beachten GV*miscMenu.save_marked.label: Markiertes speichern GV*scrolling.label: Umgekehrtes Scrollen GV*optiongvPopup*forientLabel.label: Rückfall-Orientatierung GV*button1.label: Abbrechen GV*filters.label: Filter: GV*confirmLabel.label: Beenden bestätigen GV*printMarked.label: Markiertes drucken GV*optiongvPopup*orientLabel.label: \ Orientatierung \ GV*optiongvPopup*fmediaLabel.label: Rückfall-Papiergröße GV*confirmPopup*done.label: Beenden GV*optiongvPopup*autoResize.label: Variable Größe GV*defaults.label: Standardeinstellungen GV*uncompressLabel.label: Dekomprimieren GV*miscMenu.unmark.label: Demarkieren GV*safer.label: Safer GV*saveMarked.label: Markiertes speichern GV*optiongvPopup*swapLandscape.label: Swap Qürformat GV*miscMenu.update.label: Datei neu laden GV*miscMenu.print_marked.label: Markiertes drucken GV*scalesLabel.label: Vergrößerung GV*x11alphadevLabel.label: Antialias GV*saveAll.label: Alles speichern GV*miscMenu.toggle_current.label: Aktülle umschaltewn GV*miscMenu.toggle_odd.label: Gerade umschalten GV*miscMenu.toggle_even.label: Ungerade umschalten GV*printCommandLabel.label: Druckkommando GV*updateFile.label: Neu laden GV*optiongsPopup.title: Ghostscript Einstellungen GV*quiet.label: Quiet GV*confirmPopup.title: Bestätigen GV*mediasLabel.label: Mediengrößen GV*optionfsPopup.title: Dateiauswahloptionen GV*optiongvPopup*mediaLabel.label: \ Papiergröße \ GV*convLabel.label: Konvertiere PDF GV*zoomPopup.title: Lupe GV*optiongvPopup.title: gv Einstellungen GV*confirmPrint.label: Drucken bestätigen GV*filterLabel.label: Standard-Filter GV*filtersLabel.label: Dateiauswahlfilters GV*checkFile.label: Datei beobachten GV*toggleOdd.label: GV*optiongvPopup*scalesLabel.label: \ Vergrösßrungen \ GV*toggleCurrent.label: GV*dialogPopup*cancel.label: Abbrechen GV*fileSelPopup.title: Datei öffnen GV*eyeGuide.label: ?Scrolling Eye Guide? GV*magmenuLabel.label: Mag Menu Entries GV*rescan.label: Ordner neu einlesen GV*miscMenu.print_all.label: Alles drucken GV*gsLabel.label: Interpreter GV*optiongvPopup*antialias.label: Antialias GV*printAll.label: Alles drucken GV*argumentsLabel.label: Argumente GV*toggleEven.label: GV*scaleBaseLabel.label: Vergrößerungsbasis GV*screenSizeLabel.label: Bildschiemgröße (mm) GV*dialogPopup.title: Dialog GV*unmarkAll.label: GV*autoCenter.label: Automatisch zentrieren GV*redisplay.label: Neu laden GV*confirmPopup*cancel.label: Abbrechen GV*openFile.label: Öffnen GV*save.label: Speichern GV*notePopup.title: Nachricht GV*optiongvPopup*eof.label: EOF ignorieren GV*apply.label: Anwenden GV*miscMenu.redisplay.label: Neu laden GV*dirs.label: Ordner GV*notePopup*done.label: OK GV*copyright.Label: Copyright GV*optionsgv.Label: gv Einstellungen ... GV*mark.Label: Markieren GV*dismiss.Label: Abbrechen GV*center.Label: Zentrieren GV*printMarkedPages.Label: Drucke markierte ... GV*update.Label: Neu laden GV*optionsgs.Label: Ghostscript Einstellungen ... GV*presentation.Label: Presentationsmodus GV*saveAllPages.Label: Speichere Dokument ... GV*pageButton*unmark.Label: Alle demarkieren GV*automatic.Label: Automatik GV*unmark.Label: Demarkieren GV*reopen.Label: Neu laden GV*dsc.Label: Beachte Documentstruktur GV*pixmap.Label: ?Backing Pixmap? GV*savepos.Label: Savepos GV*pageButton.Label: Seite GV*open.Label: Öffnen... GV*fileButton.Label: Datei GV*antialias.Label: Antialias GV*show.Label: Neu anzeigen GV*stateButton.Label: Status GV*pageButton*current.Label: Aktülle Markierung wechselnn GV*optionssetup.Label: Allg. Einstellungen ... GV*ascaleLabel.Label: Beliebige Vergrößerung GV*next.Label: Nächste GV*seascape.Label: Alt. Qürformat GV*cancel.Label: Abbrechen GV*watch.Label: Datei beobachten GV*titleLabel.Label: Titel anzeigen GV*processButton.Label: \ processing GV*stop.Label: Interpreter beenden GV*upsidedown.Label: Umgedreht GV*pageButton*even.Label: Gerade Markierungen wechseln GV*quit.Label: Beenden GV*nextPage.Label: >> GV*eof.Label: EOF Kommenatre ignorieren GV*landscape.Label: Qürformat GV*printAllPages.Label: Dokument drucken ... GV*infoVerboseLabel.Label: Info.Popup GV*size.Label: Automatische Größe GV*prevPage.Label: << GV*prev.Label: Vorherige GV*saveMarkedPages.Label: Markierte Seiten speichern ... GV*pageButton*odd.Label: Ungerade Markierungen wechseln GV*optionsfs.Label: Dateiauswahloptionen ... GV*swap.Label: Qürformat umschalten GV*portrait.Label: Hochformat GV*watchFile.Label: Datei beobachten GV*gs.errors.none.Label: Keine GV*gs.errors.all.Label: Alle GV*gs.errors.errors.Label: Fehler GV.scales: Natürliche Größe, 1.000, screen \n\ Pixelbasiert, 1.000, pixel \n\ Beliebige Vergrößerung, -2 \n\ Höhe anpassen, -3 \n\ Breite anpassen, -1 \n\ Beides anpassen, 0.000 \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV*quitstyle.never.Label: Niemals GV*quitstyle.always.Label: Immer GV*quitstyle.whenprocessing.Label: Bei Verarbeitung GV*title.filename.Label: Dateiname GV*title.notitle.Label: Kein Titel GV*title.documenttitle.Label: Dokumenttitel GV*strings.saveMarkedPages: Markiere Seiten speichern GV*strings.saveCurrentPage: Aktülle Seite speichern GV*strings.saveDocument: Dokument speichern GV*strings.saveAsPDF: Als PDF speichern GV*strings.openFile: Datei öffnen GV*strings.passwordPrompt: Passwort: GV*strings.passwordRequired: Passwort erforderlich GV*strings.quitConfirm: Wollen Sie wirklich GNU gv beenden? GV*strings.putTexCommand: Schreibe eine TeX-Anweisung an die aktülle Position GV*strings.texCommand: TeX -Anweisung GV*strings.stillInProgress: Noch in Bearbeitung: GV*strings.execOfFailed: Ausführung von %s fehlgeschlagen GV*strings.copyrightTranslation: Markus Steinborn gv-3.7.4/src/nls/ko_KR.UTF-8.dat0000664000076400007640000001473211735103746012776 00000000000000! !** Copyright (C) 1995, 1996, 1997 Johannes Plass ! ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2 of the License, 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 General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ! ! Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ! Department of Physics ! Johannes Gutenberg-University ! Mainz, Germany ! ! ! gv_euc-kr.ad ! Korean NLS label for gv by ! 1999 Sang-Jin Hwang, (hsjlinux@netian.com) ! !##### Zoom Popup GV*zoomPopup.title: GV - 확대 !##### Info Popup GV*infoPopup.title: 고스트 스í¬ë¦½íЏ 메시지 !##### Dialog Popup GV*dialogPopup.title: 다ì´ì•Œë¡œê·¸ !##### Note Popup GV*notePopup.title: 메시지 !##### Confirm Popup GV*confirmPopup.title: í™•ì¸ !##### OptionsSetup Popup GV*optionfsPopup.title: íŒŒì¼ ì„ íƒ ì˜µì…˜ !##### OptionsGS Popup GV*optiongsPopup.title: 고스트 스í¬ë¦½íЏ 옵션 !##### OptionsGV Popup GV*optiongvPopup.title: GV 옵션 !##### OptionsSetup Popup GV*optionsetupPopup.title: 설정 옵션 !##### FileSet Popup GV*fileSelPopup.title: íŒŒì¼ ì—´ê¸° !################################################ !##### Labels !################################################ GV*cancel.Label: 취소 GV*dismiss.Label: 닫기 GV*apply.label: ì ìš© GV*copyright.Label: 저작권 GV*quit.Label: 종료 GV*fileButton.Label: íŒŒì¼ GV*open.Label: 열기 ... GV*reopen.Label: 재열기 GV*update.Label: 경신 GV*printAllPages.Label: 문서 ì¸ì‡„ ... GV*printMarkedPages.Label: 마í¬í•œ 페ì´ì§€ ì¸ì‡„ ... GV*saveAllPages.Label: 문서 저장 ... GV*saveMarkedPages.Label: 마í¬í•œ 페ì´ì§€ 저장 ... GV*stateButton.Label: 환경 설정 GV*stop.Label: 중지 GV*dsc.Label: 문서 구조화 GV*eof.Label: EOF ì£¼ì„ ë¬´ì‹œ GV*antialias.Label: 매ë„러운 화면 처리 GV*watchFile.Label: ìžë™ 파ì¼ê²½ì‹  GV*showTitle.Label: 타ì´í‹€ 표시 GV*pixmap.Label: Backing Pixmap GV*size.Label: ìžë™ í¬ê¸° ì¡°ì ˆ GV*watch.Label: ìžë™ 파ì¼ê²½ì‹  GV*optionsgv.Label: GV 옵션 ... GV*optionsfs.Label: íŒŒì¼ ì„ íƒ ì˜µì…˜ ... GV*optionsgs.Label: 고스트 스í¬ë¦½íЏ 옵션 ... GV*optionssetup.Label: 설정 옵션 ... GV*pageButton.Label: 페ì´ì§€ GV*next.Label: ë‹¤ìŒ GV*show.Label: 화면 재시작 GV*prev.Label: ì´ì „ GV*center.Label: 중간 GV*pageButton*current.Label: 현재페ì´ì§€ 마í¬/í•´ì œ GV*pageButton*even.Label: ì§ìˆ˜íŽ˜ì´ì§€ 마í¬/í•´ì œ GV*pageButton*odd.Label: 홀수페ì´ì§€ 마í¬/í•´ì œ GV*pageButton*unmark.Label: ì „ ë§ˆí¬ í•´ì œ GV*processButton.Label: \ 진행중 GV*mark.Label: ë§ˆí¬ GV*prevPage.Label: << GV*nextPage.Label: >> GV*unmark.Label: 표시 안함 GV*automatic.Label: ìžë™ GV*portrait.Label: Portrait GV*landscape.Label: Landscape GV*upsidedown.Label: ìƒí•˜ 반전 GV*seascape.Label: Seascape GV*swap.Label: Landscape변환 GV*toggleCurrent.label: 현재페ì´ì§€ 마í¬/í•´ì œ GV*toggleEven.label: ì§ìˆ˜íŽ˜ì´ì§€ 마í¬/í•´ì œ GV*toggleOdd.label: 홀수페ì´ì§€ 마í¬/í•´ì œ GV*unmarkAll.label: ëª¨ë‘ í‘œì‹œ 안함 GV*printAll.label: ëª¨ë‘ ì¸ì‡„ GV*printMarked.label: 마í¬ë¶€ë¶„ ì¸ì‡„ GV*saveAll.label: ëª¨ë‘ ì €ìž¥ GV*saveMarked.label: 표시 저장 GV*openFile.label: 열기 GV*redisplay.label: 화면 재시작 GV*updateFile.label: 파ì¼ê²½ì‹  GV*checkFile.label: íŒŒì¼ í™•ì¸ GV*filters.label: í•„í„° GV*dirs.label: 디렉토리 GV*button1.label: 취소 GV*button2.label: íŒŒì¼ ì—´ê¸° GV*rescan.label: 디렉토리 검색 GV*screenSizeLabel.label: 회면 사ì´ì¦ˆmm] GV*versionPopup*versionDone*label: 취소 GV*dialogPopup*cancel.label: 취소 GV*notePopup*done.label: 예 GV*confirmPopup*cancel.label: 취소 GV*confirmPopup*done.label: 종료 GV*save.label: 저장 GV*optiongvPopup*mediaLabel.label: \ 용지 사ì´ì¦ˆ \ GV*optiongvPopup*fmediaLabel.label: 불íŒëª…ì‹œì˜ ìš©ì§€ 사ì´ì¦ˆ GV*optiongvPopup*orientLabel.label: \ ì› ìƒíƒœ \ GV*optiongvPopup*forientLabel.label: 윈 ìƒíƒœë¡œ 복귀 GV*optiongvPopup*magLabel.label: 확대축소 GV*optiongvPopup*antialias.label: 다듬기 GV*optiongvPopup*respectDSC.label: DSC를 유효 GV*optiongvPopup*eof.label: EOF를 무시 GV*optiongvPopup*autoResize.label: 가변 사ì´ì¦ˆ GV*optiongvPopup*swapLandscape.label: Landscape변환 GV*optiongvPopup*scalesLabel.label: \ ìŠ¤ì¼€ì¼ \ GV*miscmenuLabel.label: 기타 메뉴 GV*magmenuLabel.label: 확대 메뉴 ëª©ë¡ GV*mediasLabel.label: 미디어 í¬ê¸° GV*confirmLabel.label: í™•ì¸ ì¢…ë£Œ GV*misc.label: 기타 GV*scrolling.label: 스í¬ë¡¤ 반전 GV*eyeGuide.label: 스í¬ë¡¤ ê°€ì´ë“œ GV*confirmPrint.label: ì¸ì‡„시 í™•ì¸ GV*uncompressLabel.label: ì••ì¶• ì „ê°œ GV*autoCenter.label: ìžë™ì ìœ¼ë¡œ 중앙으로 GV*printCommandLabel.label: ì¸ì‡„ 명령어 GV*scratchDirLabel.label: 스í¬ë ˆì¹˜ 디렉토리 GV*saveDirLabel.label: 디렉토리 저장 GV*scalesLabel.label: ìŠ¤ì¼€ì¼ GV*scaleBaseLabel.label: 기본 ìŠ¤ì¼€ì¼ GV*safer.label: 보다 안전하게 GV*quiet.label: 종료 GV*defaults.label: 시스템 표준값 GV*scanLabel.label: PDF 검색 GV*convLabel.label: PDF 변환 GV*gsLabel.label: Postscriptì¸í„°ëŸ½íЏ GV*x11devLabel.label: 디바ì´ìФ GV*x11alphadevLabel.label: 디바ì´ìФ ì¡°ì • GV*argumentsLabel.label: ì¸ìˆ˜ GV*filtersLabel.label: íŒŒì¼ ì„ íƒ í•„í„° GV*dirsLabel.label: íŒŒì¼ ì„ íƒ ë””ë ‰í† ë¦¬ GV*filterLabel.label: 기본 í•„í„° GV*miscMenu.update.label: 파ì¼ê²½ì‹  GV*miscMenu.redisplay.label: 화면 재조정 GV*miscMenu.stop.label: ì¸í„°ëŸ½íЏ 중지 GV*miscMenu.toggle_current.label: 현재페ì´ì§€ 마í¬/í•´ì œ GV*miscMenu.toggle_odd.label: 홀수페ì´ì§€ 마í¬/í•´ì œ GV*miscMenu.toggle_even.label: ì§ìˆ˜íŽ˜ì´ì§€ 마í¬/í•´ì œ GV*miscMenu.unmark.label: ëª¨ë‘ í‘œì‹œ 안함 GV*miscMenu.print_all.label: ëª¨ë‘ ì¸ì‡„ GV*miscMenu.print_marked.label: ë§ˆí¬ ë¶€ë¶„ ì¸ì‡„ GV*miscMenu.save_all.label: ëª¨ë‘ ì €ìž¥ GV*miscMenu.save_marked.label: 표시 저장 gv-3.7.4/src/nls/noint:de.dat0000664000076400007640000001640011735103746012713 00000000000000! !** Copyright (C) 2010 Markus Steinborn ! ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2 of the License, 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 General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ! GV*miscmenuLabel.label: Extras: Menueeintraege GV*x11devLabel.label: Geraet GV*scratchDirLabel.label: Scratch Directory GV*misc.label: Extras GV*miscMenu.stop.label: Interpreter beenden GV*miscMenu.save_all.label: Alles speichern GV*saveDirLabel.label: Ordner zum Speichern GV*infoPopup.title: Ghostscript-Meldungen GV*dirsLabel.label: Dateiauswahlordner GV*scanLabel.label: Scan PDF GV*optiongvPopup*magLabel.label: Groesse GV*button2.label: Datei oeffnen GV*optionsetupPopup.title: Allg. Einstellungen GV*optiongvPopup*respectDSC.label: DSC beachten GV*miscMenu.save_marked.label: Markiertes speichern GV*scrolling.label: Umgekehrtes Scrollen GV*optiongvPopup*forientLabel.label: Rueckfall-Orientatierung GV*button1.label: Abbrechen GV*filters.label: Filter: GV*confirmLabel.label: Beenden bestaetigen GV*printMarked.label: Markiertes drucken GV*optiongvPopup*orientLabel.label: \ Orientatierung \ GV*optiongvPopup*fmediaLabel.label: Rueckfall-Papiergroesse GV*confirmPopup*done.label: Beenden GV*optiongvPopup*autoResize.label: Variable Groesse GV*defaults.label: Standardeinstellungen GV*uncompressLabel.label: Dekomprimieren GV*miscMenu.unmark.label: Demarkieren GV*safer.label: Safer GV*saveMarked.label: Markiertes speichern GV*optiongvPopup*swapLandscape.label: Swap Querformat GV*miscMenu.update.label: Datei neu laden GV*miscMenu.print_marked.label: Markiertes drucken GV*scalesLabel.label: Vergroesserung GV*x11alphadevLabel.label: Antialias GV*saveAll.label: Alles speichern GV*miscMenu.toggle_current.label: Aktuelle umschaltewn GV*miscMenu.toggle_odd.label: Gerade umschalten GV*miscMenu.toggle_even.label: Ungerade umschalten GV*printCommandLabel.label: Druckkommando GV*updateFile.label: Neu laden GV*optiongsPopup.title: Ghostscript Einstellungen GV*quiet.label: Quiet GV*confirmPopup.title: Bestaetigen GV*mediasLabel.label: Mediengroessen GV*optionfsPopup.title: Dateiauswahloptionen GV*optiongvPopup*mediaLabel.label: \ Papiergroesse \ GV*convLabel.label: Konvertiere PDF GV*zoomPopup.title: Lupe GV*optiongvPopup.title: gv Einstellungen GV*confirmPrint.label: Drucken bestaetigen GV*filterLabel.label: Standard-Filter GV*filtersLabel.label: Dateiauswahlfilters GV*checkFile.label: Datei beobachten GV*toggleOdd.label: GV*optiongvPopup*scalesLabel.label: \ Vergroesserungen \ GV*toggleCurrent.label: GV*dialogPopup*cancel.label: Abbrechen GV*fileSelPopup.title: Datei oeffnen GV*eyeGuide.label: ?Scrolling Eye Guide? GV*magmenuLabel.label: Mag Menu Entries GV*rescan.label: Ordner neu einlesen GV*miscMenu.print_all.label: Alles drucken GV*gsLabel.label: Interpreter GV*optiongvPopup*antialias.label: Antialias GV*printAll.label: Alles drucken GV*argumentsLabel.label: Argumente GV*toggleEven.label: GV*scaleBaseLabel.label: Vergroesserungsbasis GV*screenSizeLabel.label: Bildschiemgroesse (mm) GV*dialogPopup.title: Dialog GV*unmarkAll.label: GV*autoCenter.label: Automatisch zentrieren GV*redisplay.label: Neu laden GV*confirmPopup*cancel.label: Abbrechen GV*openFile.label: Oeffnen GV*save.label: Speichern GV*notePopup.title: Nachricht GV*optiongvPopup*eof.label: EOF ignorieren GV*apply.label: Anwenden GV*miscMenu.redisplay.label: Neu laden GV*dirs.label: Ordner GV*notePopup*done.label: OK GV*copyright.Label: Copyright GV*optionsgv.Label: gv Einstellungen ... GV*mark.Label: Markieren GV*dismiss.Label: Abbrechen GV*center.Label: Zentrieren GV*printMarkedPages.Label: Drucke markierte ... GV*update.Label: Neu laden GV*optionsgs.Label: Ghostscript Einstellungen ... GV*presentation.Label: Presentationsmodus GV*saveAllPages.Label: Speichere Dokument ... GV*pageButton*unmark.Label: Alle demarkieren GV*automatic.Label: Automatik GV*unmark.Label: Demarkieren GV*reopen.Label: Neu laden GV*dsc.Label: Beachte Documentstruktur GV*pixmap.Label: ?Backing Pixmap? GV*savepos.Label: Savepos GV*pageButton.Label: Seite GV*open.Label: Oeffnen... GV*fileButton.Label: Datei GV*antialias.Label: Antialias GV*show.Label: Neu anzeigen GV*stateButton.Label: Status GV*pageButton*current.Label: Aktuelle Markierung wechselnn GV*optionssetup.Label: Allg. Einstellungen ... GV*ascaleLabel.Label: Beliebige Vergroesserung GV*next.Label: Naechste GV*seascape.Label: Alt. Querformat GV*cancel.Label: Abbrechen GV*watch.Label: Datei beobachten GV*titleLabel.Label: Titel anzeigen GV*processButton.Label: \ processing GV*stop.Label: Interpreter beenden GV*upsidedown.Label: Umgedreht GV*pageButton*even.Label: Gerade Markierungen wechseln GV*quit.Label: Beenden GV*nextPage.Label: >> GV*eof.Label: EOF Kommenatre ignorieren GV*landscape.Label: Querformat GV*printAllPages.Label: Dokument drucken ... GV*infoVerboseLabel.Label: Info.Popup GV*size.Label: Automatische Groesse GV*prevPage.Label: << GV*prev.Label: Vorherige GV*saveMarkedPages.Label: Markierte Seiten speichern ... GV*pageButton*odd.Label: Ungerade Markierungen wechseln GV*optionsfs.Label: Dateiauswahloptionen ... GV*swap.Label: Querformat umschalten GV*portrait.Label: Hochformat GV*watchFile.Label: Datei beobachten GV*gs.errors.none.Label: Keine GV*gs.errors.all.Label: Alle GV*gs.errors.errors.Label: Fehler GV.scales: Natuerliche Groesse, 1.000, screen \n\ Pixelbasiert, 1.000, pixel \n\ Beliebige Vergroesserung, -2 \n\ Hoehe anpassen, -3 \n\ Breite anpassen, -1 \n\ Beides anpassen, 0.000 \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV*quitstyle.never.Label: Niemals GV*quitstyle.always.Label: Immer GV*quitstyle.whenprocessing.Label: Bei Verarbeitung GV*title.filename.Label: Dateiname GV*title.notitle.Label: Kein Titel GV*title.documenttitle.Label: Dokumenttitel GV*strings.saveMarkedPages: Markiere Seiten speichern GV*strings.saveCurrentPage: Aktuelle Seite speichern GV*strings.saveDocument: Dokument speichern GV*strings.saveAsPDF: Als PDF speichern GV*strings.openFile: Datei oeffnen GV*strings.passwordPrompt: Passwort: GV*strings.passwordRequired: Passwort erforderlich GV*strings.quitConfirm: Wollen Sie wirklich GNU gv beenden? GV*strings.putTexCommand: Schreibe eine TeX-Anweisung an die aktuelle Position GV*strings.texCommand: TeX -Anweisung GV*strings.stillInProgress: Noch in Bearbeitung: GV*strings.execOfFailed: Ausfuehrung von %s fehlgeschlagen GV*strings.copyrightTranslation: Markus Steinborn gv-3.7.4/src/popup.c0000664000076400007640000001061211735103746011201 00000000000000/* ** ** popup.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include "config.h" #include #include "paths.h" #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_X11(IntrinsicP.h) #include INC_X11(ShellP.h) #include "types.h" #include "popup.h" /*##################################################################*/ /* cb_popdownPopup Callback */ /*##################################################################*/ void cb_popdownPopup(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data _GL_UNUSED) { BEGINMESSAGE(cb_popdownPopup) XtPopdown((Widget)client_data); ENDMESSAGE(cb_popdownPopup) } /*##################################################################*/ /* cb_popupPopup Callback */ /* Popup a window. */ /*##################################################################*/ void cb_popupPopup(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data _GL_UNUSED) { BEGINMESSAGE(cb_popupPopup) XtPopup((Widget)client_data,XtGrabNone); XRaiseWindow(XtDisplay((Widget)client_data), XtWindow((Widget)client_data)); ENDMESSAGE(cb_popupPopup) } /*##################################################################*/ /* popup_positionPopup */ /*##################################################################*/ static int wmtdecor = 0; static int wmbdecor = 0; static int wmsdecor = 0; void popup_positionPopup(Widget popup, Widget ref_widget, int mode, int refx, int refy) { Arg args[5]; Cardinal n; Position posx,posy; Position posrefx,posrefy; Dimension width,height; Dimension screenwidth, screenheight; BEGINMESSAGE(popup_positionPopup) if (((ShellWidget)popup)->shell.popped_up) { INFMESSAGE(will not reposition popped up popup) ENDMESSAGE(popup_positionPopup) return; } posrefx = (Position)(refx); posrefy = (Position)(refy); IIMESSAGE(posrefx,posrefy) screenwidth = XtScreen(ref_widget)->width; screenheight = XtScreen(ref_widget)->height; IIMESSAGE(screenwidth,screenheight); width = popup->core.width; height = popup->core.height; IIMESSAGE(width,height); XtTranslateCoords(ref_widget,0,0,&posx,&posy); IIMESSAGE(posx,posy); if (mode==POPUP_POSITION_POS) { posx += posrefx + (Position)(wmsdecor); posy += posrefy + (Position)(wmtdecor); } else if (mode==POPUP_POSITION_CENTER) { Dimension w,h; w = ref_widget->core.width; h = ref_widget->core.height; posx += (Position)(w/2) - (Position)(width/2); posy += (Position)(h/2) - (Position)(height/2); } else if (mode==POPUP_POSITION_POS_CENTER) { posx += posrefx - (Position)(width/2); posy += posrefy - (Position)(height/2); } INFIIMESSAGE(after adding offsets,posx,posy) if (posx + (Position)width >= (Position)screenwidth) posx = ((Position)screenwidth) - ((Position)width) - ((Position)wmsdecor); if (posx < 0) posx = 0; if (posy + (Position)height >= (Position)screenheight) posy = ((Position)screenheight) - ((Position)height) - ((Position)wmbdecor); if (posy < 0) posy = 0; INFIIMESSAGE(after adjustment,posx,posy) n=0; XtSetArg(args[n], XtNx, posx); n++; XtSetArg(args[n], XtNy, posy); n++; XtSetValues(popup, args, n); ENDMESSAGE(popup_positionPopup) } gv-3.7.4/src/gv_widgetless.dat0000664000076400007640000000176211735103745013237 00000000000000 GV*orientationButton*forcedWidth: 72 GV.control.MButton.height: 1 GV.control.MButton.forcedHeight: 1 GV.control.MButton.borderWidth: 0 GV.control.MButton.borderColor: green GV.control.MButton.background: gray GV.control.MButton.topShadowPixel: gray GV.control.MButton.bottomShadowPixel: darkgray GV.borderWidth: 0 GV.control.borderWidth: 0 GV.control.viewFrame.borderWidth: 0 GV.control.viewFrame.viewClip.borderWidth: 0 GV.control.viewFrame.viewClip.page.borderWidth: 0 GV*control.layout: \ |v{ \ |h{ \ fileButton \ stateButton \ pageButton \ orientationButton \ scaleButton \ pageMediaButton \ } \ |h{ \ newtocFrame<-[1]*+200[1]-[1]> \ viewFrame<+9999-100%*+9999-100%>\ } \ } gv-3.7.4/src/config.h0000664000076400007640000001116711736064614011317 00000000000000/* ** ** config.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Authors: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_CONFIG_H_ #define _GV_CONFIG_H_ #include /* ---------------------------------------------------------- Enabling the following option causes ghostscript to be restarted whenever a new page should be displayed but gv-vms thinks that the interpreter is busy. This may solve some problems that may occur for some incorrectly formatted files, but will slow down previewing for many correct files also. (yes Jim, this option is for you) ---------------------------------------------------------- */ /* #define GV_RESTART_IF_BUSY */ /* ########################################################## ########################################################## Private Declarations ########################################################## ########################################################## */ #define INTERN_RESOURCES_DAT "gv_intern_res_unix.dat" #define INTERN_RESOURCES_H "gv_intern_res_unix.h" /* ---------------------------------------------------------- Inline copies of optional external files. ---------------------------------------------------------- */ #ifdef USE_FALLBACK_STYLES # define FALLBACK_STYLE_1_DAT "gv_spartan.dat" # define FALLBACK_STYLE_1_H "gv_spartan.h" # define FALLBACK_STYLE_2_DAT "gv_widgetless.dat" # define FALLBACK_STYLE_2_H "gv_widgetless.h" #endif #define FALLBACK_ICON_PIXMAP "gv_icon.xbm" #define FALLBACK_SELECTED_BITMAP "gv_selected.xbm" #define FALLBACK_DOCUMENT_BITMAP "gv_doc.xbm" #define FALLBACK_MARK_BITMAPS yes_please #define FALLBACK_MARK_ODD_BITMAP "gv_odd.xbm" #define FALLBACK_MARK_EVEN_BITMAP "gv_even.xbm" #define FALLBACK_MARK_CURRENT_BITMAP "gv_current.xbm" #define FALLBACK_MARK_UNMARK_BITMAP "gv_unmark.xbm" #define FALLBACK_MARK_EMPTY_BITMAP "gv_empty.xbm" #define FALLBACK_ICON_NAME GV #define FALLBACK_SELECTED_NAME DOT #define FALLBACK_DOCUMENT_NAME DOC #define FALLBACK_MARK_ODD_NAME odd #define FALLBACK_MARK_EVEN_NAME even #define FALLBACK_MARK_CURRENT_NAME current #define FALLBACK_MARK_UNMARK_NAME unmark #define FALLBACK_MARK_EMPTY_NAME empty /* ---------------------------------------------------------- Miscellaneous defaults ---------------------------------------------------------- */ #define GV_ERROR_PRINT_FAIL "Printing via\n '%s'\nfailed." #define GV_PRINT_MESSAGE "Print Command:" #define GV_PRINT_MARKED_MESSAGE "Print Marked Pages" #define GV_PRINT_PAGE_MESSAGE "Print Current Page" #define GV_PRINT_ALL_MESSAGE "Print Document" #define GV_PRINT_BUTTON_LABEL "Print" #define GV_ERROR_OPEN_FAIL "Cannot open file" #define GV_OPEN_MESSAGE "Open" #define GV_ERROR_SAVE_FAIL "Cannot write to file" #define GV_SAVE_MESSAGE "Save" #define GV_AUTO_RESIZE_YES "Variable Size" #define GV_AUTO_RESIZE_NO "Fixed Size" #define GV_MINIMUM_SIZE 300 #define MAX_LOCATOR_LENGTH 48 #define TOC3D_INITIAL_HEIGHT 30 #define TOC3D_INITIAL_WIDTH 10 #define GV_MAX_FILENAME_LENGTH 256 #define GV_APPLICATION_NAME "gv" #define GV_CLASS "GV" #define EXIT_STATUS_NORMAL 0 #define EXIT_STATUS_ERROR 1 #define EXIT_STATUS_FATAL -1 #include "setenv.h" #ifdef HAVE_OFF_T typedef off_t gv_off_t; #define GV_FSEEK fseeko #define GV_FTELL ftello #else typedef long gv_off_t; #define GV_FSEEK fseek #define GV_FTELL ftell #endif #ifndef HAVE_GCC_VERSION #ifdef __GNUC__ #define HAVE_GCC_VERSION(MAJOR, MINOR) \ (__GNUC__ > (MAJOR) || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ >= (MINOR))) #else #define HAVE_GCC_VERSION(MAJOR, MINOR) 0 #endif #endif #endif /* _GV_CONFIG_H_ */ gv-3.7.4/src/media.c0000664000076400007640000000724011736064614011121 00000000000000/* ** ** media.c ** ** Copyright (C) 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include #include #include "paths.h" #include INC_X11(Intrinsic.h) #include INC_XMU(SysUtil.h) #include "types.h" #include "config.h" #include "types.h" #include "options.h" #include "media.h" /*################################################## media_freeMedias ##################################################*/ void media_freeMedias(medias) Media *medias; { int i=0; BEGINMESSAGE(media_freeMedias) while (medias[i]) { XtFree(medias[i]->name); XtFree((XtPointer)medias[i]); i++; } XtFree((XtPointer)medias); ENDMESSAGE(media_freeMedias) } /*################################################## media_parseMedias ##################################################*/ static Media media_mallocMedia(void) { Media media; media = (Media) XtMalloc(sizeof(MediaStruct)); memset((void*)media ,0,sizeof(MediaStruct)); return media; } Media *media_parseMedias(s) char *s; { char *c,*nl; Media *medias,*mmedias,media; int i,n,have_media=0,have_used_media=0,used,w,h; char name[100]; BEGINMESSAGE(media_parseMedias) if (!s) s = ""; s =options_squeezeMultiline(s); for (n=1,c=s; (c = strchr(c,'\n')); n++, c++); INFIMESSAGE(number of medias,n) mmedias = medias = (Media*) XtMalloc((n+3)*sizeof(Media)); media = media_mallocMedia(); media->name = XtNewString("BBox"); media->width= 0; media->height= 0; media->used= 1; *medias++ = media; c=s; if (*s) while (n>0) { nl = strchr(c,'\n'); if (nl) *nl='\0'; name[0]='\0'; used = 1; while (*c && (*c == '#' || *c == '!')) { used=0; c++; } i=sscanf(c," %[^,] , %d %d ",name,&w,&h); if (i==3 && w>0 && h>0) { media = media_mallocMedia(); media->name = XtNewString(name); media->width= w; media->height= h; media->used= used; if (used) have_used_media=1; have_media = 1; INFSMESSAGE(found media,media->name) IIMESSAGE(media->width,media->height) *medias++ = media; } n--; if (!nl) break; c=++nl; } if (!have_media) { media = media_mallocMedia(); media->name = XtNewString("A4"); media->width= 595; media->height= 842; media->used= 1; *medias++ = media; } if (!have_used_media) mmedias[1]->used=1; *medias = (Media) NULL; XtFree(s); ENDMESSAGE(media_parseMedias) return(mmedias); } /*################################################## media_numMedias ##################################################*/ int media_numMedias(medias) Media *medias; { int i; for (i=1; medias[i]; i++); return i; } gv-3.7.4/src/Ghostview.c0000664000076400007640000021503111736064614012020 00000000000000/* * Ghostview.c -- Ghostview widget. * Copyright (C) 1992 Timothy O. Theisen * Copyright (C) 2004 Jose E. Marchesi * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GNU gv; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Tim Theisen Systems Programmer * Internet: tim@cs.wisc.edu Department of Computer Sciences * UUCP: uwvax!tim University of Wisconsin-Madison * Phone: (608)262-0438 1210 West Dayton Street * FAX: (608)262-9777 Madison, WI 53706 */ /* * this code was modified by Johannes Plass, * plass@thep.physik.uni-mainz.de * February 1995, March 1996 ###jp### * */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include "config.h" #include "paths.h" #include INC_X11(IntrinsicP.h) #include INC_X11(StringDefs.h) #include INC_X11(Xatom.h) #include INC_X11(Xproto.h) #include INC_X11(Xos.h) #include INC_X11(Xfuncs.h) #include "GhostviewP.h" #include #include #include #include #include #include #include "types.h" #include "main_resources.h" #include "main_globals.h" #include "misc.h" #include "actions.h" #include "resource.h" #ifndef XlibSpecificationRelease typedef char *XPointer; #endif #include #ifdef SIGNALRETURNSINT #define SIGVAL int #else #define SIGVAL void #endif #ifdef NON_BLOCKING_IO #include /* if POSIX O_NONBLOCK is not available, use O_NDELAY */ #if !defined(O_NONBLOCK) && defined(O_NDELAY) #define O_NONBLOCK O_NDELAY #endif #endif #include /* Both error returns are checked for non-blocking I/O. */ /* Manufacture the other error code if only one exists. */ #if !defined(EWOULDBLOCK) && defined(EAGAIN) #define EWOULDBLOCK EAGAIN #endif #if !defined(EAGAIN) && defined(EWOULDBLOCK) #define EAGAIN EWOULDBLOCK #endif /* GV_BUFSIZ is set to the minimum POSIX PIPE_BUF to ensure that * nonblocking writes to ghostscript will work properly. */ #define GV_BUFSIZ 512 #define ALLOW_PDF /*###jp### 02/29/96 */ #define CURSOR_RESET 1 #define CURSOR_BUSY 2 #define CURSOR_SCROLL 3 #define CURSOR_NORMAL 4 static XtResource resources[] = { #define offset(field) XtOffsetOf(GhostviewRec, ghostview.field) { XtNarguments, XtCArguments, XtRString, sizeof(String), offset(arguments), XtRString, (XtPointer)NULL }, { XtNbottomMargin, XtCMargin, XtRInt, sizeof(int), offset(bottom_margin), XtRImmediate, (XtPointer)0 }, { XtNbusyCursor, XtCCursor, XtRCursor, sizeof(XtPointer), offset(busy_cursor), XtRString, "watch" }, { XtNcallback, XtCCallback, XtRCallback, sizeof(XtPointer), offset(callback), XtRCallback, (XtPointer)NULL }, { XtNcursor, XtCCursor, XtRCursor, sizeof(XtPointer), offset(cursor), XtRString, "crosshair" }, { XtNfilename, XtCFilename, XtRString, sizeof(String), offset(filename), XtRString, (XtPointer)NULL }, { XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), offset(foreground), XtRString, XtDefaultForeground}, { XtNleftMargin, XtCMargin, XtRInt, sizeof(int), offset(left_margin), XtRImmediate, (XtPointer)0 }, { XtNllx, XtCBoundingBox, XtRInt, sizeof(int), offset(llx), XtRImmediate, (XtPointer)0 }, { XtNlly, XtCBoundingBox, XtRInt, sizeof(int), offset(lly), XtRImmediate, (XtPointer)0 }, { XtNmessageCallback, XtCCallback, XtRCallback, sizeof(XtPointer), offset(message_callback), XtRCallback, (XtPointer)NULL }, { XtNorientation, XtCOrientation, XtRPageOrientation, sizeof(XtPageOrientation), offset(orientation), XtRImmediate, (XtPointer)XtPageOrientationPortrait }, { XtNoutputCallback, XtCCallback, XtRCallback, sizeof(XtPointer), offset(output_callback), XtRCallback, (XtPointer)NULL }, { XtNpalette, XtCPalette, XtRPalette, sizeof(XtPalette), offset(palette), XtRImmediate, (XtPointer)XtPaletteColor }, { XtNquiet, XtCQuiet, XtRBoolean, sizeof(Boolean), offset(quiet), XtRImmediate, (XtPointer)True }, { XtNinfoVerbose, XtCinfoVerbose, XtRinfoVerbose, sizeof(int), offset(infoVerbose), XtRImmediate, (XtPointer)0 }, { XtNxinerama, XtCxinerama, XtRxinerama, sizeof(int), offset(xinerama), XtRImmediate, (XtPointer)0 }, { XtNrightMargin, XtCMargin, XtRInt, sizeof(int), offset(right_margin), XtRImmediate, (XtPointer)0 }, { XtNscrollCursor, XtCCursor, XtRCursor, sizeof(XtPointer), offset(scroll_cursor), XtRString, "plus" }, { XtNtopMargin, XtCMargin, XtRInt, sizeof(int), offset(top_margin), XtRImmediate, (XtPointer)0 }, { XtNuseBackingPixmap, XtCUseBackingPixmap, XtRBoolean, sizeof(Boolean), offset(use_bpixmap), XtRImmediate, (XtPointer)False }, { XtNurx, XtCBoundingBox, XtRInt, sizeof(int), offset(urx), XtRImmediate, (XtPointer)612 }, { XtNury, XtCBoundingBox, XtRInt, sizeof(int), offset(ury), XtRImmediate, (XtPointer)792 }, { XtNlxdpi, XtCLResolution, XtRInt, sizeof(long), offset(lxdpi), XtRImmediate, (XtPointer)0 }, { XtNlydpi, XtCLResolution, XtRInt, sizeof(long), offset(lydpi), XtRImmediate, (XtPointer)0 }, {XtNpreferredWidth, XtCPreferredWidth, XtRDimension, sizeof(Dimension), offset(pref_width), XtRImmediate, (XtPointer)1}, {XtNpreferredHeight, XtCPreferredHeight, XtRDimension, sizeof(Dimension), offset(pref_height), XtRImmediate, (XtPointer)1}, {XtNsafeDir, XtCSafeDir, XtRBoolean, sizeof(Boolean), offset(safeDir), XtRImmediate, (XtPointer)True }, {XtNsafer, XtCSafer, XtRBoolean, sizeof(Boolean), offset(safer), XtRImmediate, (XtPointer)True }, {XtNinterpreter, XtCInterpreter, XtRString, sizeof(String), offset(interpreter), XtRString, "gs" }, #if 0 {XtNhighlightPixel, XtCHighlightPixel, XtRPixel, sizeof(Pixel), offset(highlight_pixel), XtRString, XtDefaultForeground}, #endif #undef offset }; static void Message(Widget,XEvent*,String*,Cardinal*); static void Notify(Widget,XEvent*,String*,Cardinal*); static void action_changeCursor(Widget,XEvent*,String*,Cardinal*); static void Input(XtPointer,int *,XtInputId*); static void Output(XtPointer,int*,XtInputId*); static void ClassInitialize(void); static void ClassPartInitialize(WidgetClass); static void Initialize(Widget,Widget,ArgList,Cardinal*); static void Realize(Widget,XtValueMask*,XSetWindowAttributes*); static void Redisplay(Widget,XEvent *,Region); static void Destroy(Widget); static void Resize(Widget); static Boolean SetValues(Widget,Widget,Widget,ArgList,Cardinal*); static XtGeometryResult QueryGeometry(Widget,XtWidgetGeometry *,XtWidgetGeometry *); static void Layout(Widget,Boolean,Boolean); static Boolean ComputeSize(Widget,Boolean,Boolean,Dimension*,Dimension*); static void SetBackground(Widget,Bool); static Boolean Setup(Widget); static void StartInterpreter(Widget); static void StopInterpreter(Widget); static void InterpreterFailed(Widget,const char *); static void ChangeCursor(GhostviewWidget,int); static XtActionsRec actions[] = { {"message", Message}, {"notify", Notify}, {"cursor", action_changeCursor}, }; static char translations[] = ":message()\n\ "; GhostviewClassRec ghostviewClassRec = { { /* core fields */ /* superclass */ (WidgetClass) &coreClassRec, /* class_name */ "Ghostview", /* widget_size */ sizeof(GhostviewRec), /* class_initialize */ ClassInitialize, /* class_part_initialize */ ClassPartInitialize, /* class_inited */ FALSE, /* initialize */ Initialize, /* initialize_hook */ NULL, /* realize */ Realize, /* actions */ actions, /* num_actions */ XtNumber(actions), /* resources */ resources, /* num_resources */ XtNumber(resources), /* xrm_class */ NULLQUARK, /* compress_motion */ TRUE, /* compress_exposure */ TRUE, /* compress_enterleave */ TRUE, /* visible_interest */ FALSE, /* destroy */ Destroy, /* resize */ Resize, /* expose */ Redisplay, /* set_values */ SetValues, /* set_values_hook */ NULL, /* set_values_almost */ XtInheritSetValuesAlmost, /* get_values_hook */ NULL, /* accept_focus */ NULL, /* version */ XtVersion, /* callback_private */ NULL, /* tm_table */ translations, /* query_geometry */ QueryGeometry, /* display_accelerator */ XtInheritDisplayAccelerator, /* extension */ NULL }, { /* ghostview fields */ /* ghostview */ NULL, /* gv_colors */ NULL, /* next */ NULL, /* page */ NULL, /* done */ NULL } }; WidgetClass ghostviewWidgetClass = (WidgetClass)&ghostviewClassRec; /*###################################################################################*/ /* * Double pixmap routines */ /*###################################################################################*/ static Pixmap pix = 0; static void Copy_pixmap(Widget w) { GhostviewWidget gvw = (GhostviewWidget) w; if(!gvw->ghostview.use_bpixmap){ if(pix) { Display *dpy = XtDisplay(w); int scr = DefaultScreen(dpy); GC gc = DefaultGC(dpy, scr); Window win = XtWindow(w); int x; unsigned int gwidth, gheight, dummy; Window r; XGetGeometry(dpy, win, &r, &x, &x, &gwidth, &gheight, &dummy, &dummy); XCopyArea(dpy, pix, win, gc, 0,0, gwidth, gheight, 0,0); } } } static void Realize_pixmap(Widget w) { if(!pix) { Display *dpy = XtDisplay(w); int scr = DefaultScreen(dpy); Window win = XtWindow(w); int x; unsigned int gwidth, gheight, dummy; Window r; XGetGeometry(dpy, win, &r, &x, &x, &gwidth, &gheight, &dummy, &dummy); /* printf("Realize_pixmap %d %d\n", gwidth, gheight); */ pix = XCreatePixmap(dpy, win, gwidth, gheight, DefaultDepth(dpy,scr)); } } static void Redisplay(Widget w, XEvent *event _GL_UNUSED, Region region _GL_UNUSED) { BEGINMESSAGE(Redisplay) Copy_pixmap(w); ENDMESSAGE(Redisplay) } /*###################################################################################*/ /* Message action routine. * Passes ghostscript message events back to application via * the message callback. It also marks the interpreter as * being not busy at the end of page, and stops the interpreter * when it send a "done" message. */ /*###################################################################################*/ static void Message(Widget w, XEvent *event, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { GhostviewWidget gvw = (GhostviewWidget) w; GhostviewWidgetClass gvc = (GhostviewWidgetClass) XtClass(w); BEGINMESSAGE(Message) gvw->ghostview.mwin = event->xclient.data.l[0]; if (event->xclient.message_type== XmuInternAtom(XtDisplay(w),gvc->ghostview_class.page)) { INFMESSAGE(interpreter completed page) gvw->ghostview.busy = False; ChangeCursor(gvw,CURSOR_RESET); XtCallCallbackList(w, gvw->ghostview.message_callback, "Page"); } else if (event->xclient.message_type==XmuInternAtom(XtDisplay(w),gvc->ghostview_class.done)) { INFMESSAGE(stopping interpreter NOW) StopInterpreter(w); XtCallCallbackList(w, gvw->ghostview.message_callback, "Done"); } if(!gvw->ghostview.use_bpixmap){ if(!pix) { StopInterpreter(w); Realize_pixmap(w); show_page(REQUEST_REDISPLAY,NULL); } else { Copy_pixmap(w); } } ENDMESSAGE(Message) } static void action_changeCursor(Widget w, XEvent *event _GL_UNUSED, String *params, Cardinal *num_params) { int which=0; BEGINMESSAGE(action_changeCursor) if (*num_params == 1) { if (*(params[0]) == 'n' || *(params[0]) == 'N') which = CURSOR_NORMAL; else if (*(params[0]) == 's' || *(params[0]) == 'S') which = CURSOR_SCROLL; if (which) ChangeCursor((GhostviewWidget)w, which); } ENDMESSAGE(action_changeCursor) } /*----------------------------------------------------------*/ /* ChangeCursor */ /*----------------------------------------------------------*/ static void ChangeCursor(GhostviewWidget gvw, int which) { Widget w = (Widget) gvw; Cursor cursor; BEGINMESSAGE(ChangeCursor) cursor = (Cursor) NULL; switch (which) { case CURSOR_RESET: if (!gvw->ghostview.busy) { if (gvw->ghostview.cursor_type == CURSOR_SCROLL) cursor = gvw->ghostview.scroll_cursor; else if (gvw->ghostview.cursor_type == CURSOR_NORMAL) cursor = gvw->ghostview.cursor; } break; case CURSOR_NORMAL: if (!gvw->ghostview.busy) cursor = gvw->ghostview.cursor; gvw->ghostview.cursor_type = CURSOR_NORMAL; break; case CURSOR_SCROLL: if (!gvw->ghostview.busy) cursor = gvw->ghostview.scroll_cursor; gvw->ghostview.cursor_type = CURSOR_SCROLL; break; case CURSOR_BUSY: cursor = gvw->ghostview.busy_cursor; break; default: break; } if (cursor) XDefineCursor(XtDisplay(w), XtWindow(w),cursor); ENDMESSAGE(ChangeCursor) } /*###################################################################################*/ /* Notify action routine. * Calculates where the user clicked in the default user coordinate system. * Call the callbacks with the point of click. */ /*###################################################################################*/ static void Notify(Widget w, XEvent *event, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { GhostviewWidget gvw = (GhostviewWidget) w; GhostviewReturnStruct ret_val; int psx,psy; BEGINMESSAGE1(Notify) GhostviewCoordsXtoPS(w,event->xbutton.x,event->xbutton.y,&psx,&psy); #if 0 { int wx,wy; GhostviewCoordsPStoX(w,psx,psy,&wx,&wy); printf("evx=%d evy=%d\n",event->xbutton.x,event->xbutton.y); printf("psx=%d psy=%d\n",psx,psy); printf("wx =%d wy =%d\n\n",wx,wy); } #endif ret_val.width = 0; ret_val.height = 0; ret_val.psx = psx; ret_val.psy = psy; XtCallCallbackList(w, gvw->ghostview.callback, (XtPointer) &ret_val); ENDMESSAGE1(Notify) } #ifndef SEEK_SET # define SEEK_SET 0 #endif static Boolean broken_pipe = False; static SIGVAL CatchPipe(int i _GL_UNUSED) { broken_pipe = True; #ifdef SIGNALRETURNSINT return 0; #endif } /*###################################################################################*/ /* Input - Feed data to ghostscript's stdin. * Write bytes to ghostscript using non-blocking I/O. * Also, pipe signals are caught during writing. The return * values are checked and the appropriate action is taken. I do * this at this low level, because it may not be appropriate for * SIGPIPE to be caught for the overall application. */ /*###################################################################################*/ static void Input(XtPointer client_data, int *source _GL_UNUSED, XtInputId *id _GL_UNUSED) { Widget w = (Widget) client_data; GhostviewWidget gvw = (GhostviewWidget) w; int bytes_written; SIGVAL (*oldsig)(int); BEGINMESSAGE(Input) oldsig = signal(SIGPIPE, CatchPipe); #ifdef NON_BLOCKING_IO do { #endif if (gvw->ghostview.buffer_bytes_left == 0) { /* Get a new section if required */ if (gvw->ghostview.ps_input && gvw->ghostview.bytes_left == 0) { struct record_list *ps_old = gvw->ghostview.ps_input; gvw->ghostview.ps_input = ps_old->next; if (ps_old->close) fclose(ps_old->fp); XtFree((char *)ps_old); } /* Have to seek at the beginning of each section */ if (gvw->ghostview.ps_input && gvw->ghostview.ps_input->seek_needed) { if (gvw->ghostview.ps_input->len > 0) GV_FSEEK(gvw->ghostview.ps_input->fp, gvw->ghostview.ps_input->begin, SEEK_SET); gvw->ghostview.ps_input->seek_needed = False; gvw->ghostview.bytes_left = gvw->ghostview.ps_input->len; } if (gvw->ghostview.bytes_left > GV_BUFSIZ) { gvw->ghostview.buffer_bytes_left = fread(gvw->ghostview.input_buffer, sizeof (char), GV_BUFSIZ, gvw->ghostview.ps_input->fp); } else if (gvw->ghostview.bytes_left > 0) { gvw->ghostview.buffer_bytes_left = fread(gvw->ghostview.input_buffer, sizeof (char), gvw->ghostview.bytes_left, gvw->ghostview.ps_input->fp); } else { gvw->ghostview.buffer_bytes_left = 0; } if (gvw->ghostview.bytes_left > 0 && gvw->ghostview.buffer_bytes_left == 0) { InterpreterFailed(w,"bytes left"); /* Error occurred */ } gvw->ghostview.input_buffer_ptr = gvw->ghostview.input_buffer; gvw->ghostview.bytes_left -= gvw->ghostview.buffer_bytes_left; } if (gvw->ghostview.buffer_bytes_left > 0) { bytes_written = write(gvw->ghostview.interpreter_input, gvw->ghostview.input_buffer_ptr, gvw->ghostview.buffer_bytes_left); #if 0 { char tmp[5000]; strncpy(tmp,gvw->ghostview.input_buffer_ptr,gvw->ghostview.buffer_bytes_left); tmp[gvw->ghostview.buffer_bytes_left] = '\0'; strcat(tmp,"###END###\n"); printf(tmp); } #endif if (broken_pipe) { broken_pipe = False; InterpreterFailed(w,"broken pope"); /* Something bad happened */ } else if (bytes_written == -1) { if ((errno != EWOULDBLOCK) && (errno != EAGAIN)) { InterpreterFailed(w,"write to pipe failed"); /* Something bad happened */ } } else { gvw->ghostview.buffer_bytes_left -= bytes_written; gvw->ghostview.input_buffer_ptr += bytes_written; /* hack alert: if the last char of a section is not a we append a by hand. This we do since gs doesn't seem to finish a page properly if the file's records are terminated by . (###jp### 02.06.96) */ IMESSAGE1(bytes_written) if (gvw->ghostview.bytes_left == 0 && gvw->ghostview.buffer_bytes_left == 0 && bytes_written > 0 && *(gvw->ghostview.input_buffer_ptr-1) != '\n') { int b; INFMESSAGE(################## appending artificial LF) b=write(gvw->ghostview.interpreter_input,"\n",1); if (broken_pipe) { broken_pipe = False; InterpreterFailed(w,"broken pipe writing NL"); /* Something bad happened */ } else if (b == -1) { if ((errno != EWOULDBLOCK) && (errno != EAGAIN)) { InterpreterFailed(w,"writing NL to pipe failed"); /* Something bad happened */ } } } } } #ifdef NON_BLOCKING_IO } while(gvw->ghostview.ps_input && gvw->ghostview.buffer_bytes_left == 0); #endif signal(SIGPIPE, oldsig); if (gvw->ghostview.ps_input == NULL && gvw->ghostview.buffer_bytes_left == 0) { INFMESSAGE(Input has no bytes left) { /* gs8.57 starts by doing a peekstring for 1023 bytes */ enum gs_peek_enum { PEEK_SIZE = 1023 }; char peek_buf[ PEEK_SIZE ]; int b; memset(peek_buf, '\n', PEEK_SIZE); INFMESSAGE(################## writing junk for peek) b = write(gvw->ghostview.interpreter_input, peek_buf, PEEK_SIZE); if (broken_pipe) { broken_pipe = False; InterpreterFailed(w,"broken pipe writing peek buf"); } else if (b == -1) { if ((errno != EWOULDBLOCK) && (errno != EAGAIN)) { InterpreterFailed(w,"writing peek buf to pipe failed"); /* Something bad happened */ } } } if (gvw->ghostview.interpreter_input_id != None) { XtRemoveInput(gvw->ghostview.interpreter_input_id); gvw->ghostview.interpreter_input_id = None; } } ENDMESSAGE(Input) } /*###################################################################################*/ /* Output - receive I/O from ghostscript's stdout and stderr. * Pass this to the application via the output_callback. */ /*###################################################################################*/ static void Output(XtPointer client_data, int *source, XtInputId *id _GL_UNUSED) { Widget w = (Widget) client_data; GhostviewWidget gvw = (GhostviewWidget) w; char buf[GV_BUFSIZ+1]; int bytes = 0; BEGINMESSAGE(Output) if (*source == gvw->ghostview.interpreter_output) { bytes = read(gvw->ghostview.interpreter_output, buf, GV_BUFSIZ); if (bytes == 0) { /* EOF occurred */ INFMESSAGE(EOF occured in interpreter_output) close(gvw->ghostview.interpreter_output); gvw->ghostview.interpreter_output = -1; XtRemoveInput(gvw->ghostview.interpreter_output_id); ENDMESSAGE(Output) return; } else if (bytes == -1) { INFMESSAGE(something bad happened in interpreter_output) InterpreterFailed(w,"read stdout from pipe failed"); /* Something bad happened */ ENDMESSAGE(Output) return; } } else if (*source == gvw->ghostview.interpreter_error) { bytes = read(gvw->ghostview.interpreter_error, buf, GV_BUFSIZ); if (bytes == 0) { /* EOF occurred */ INFMESSAGE(EOF occurred in interpreter_error) close(gvw->ghostview.interpreter_error); gvw->ghostview.interpreter_error = -1; XtRemoveInput(gvw->ghostview.interpreter_error_id); ENDMESSAGE(Output) return; } else if (bytes == -1) { INFMESSAGE(something bad happened in interpreter_error) InterpreterFailed(w,"read stderr from pipe failed"); /* Something bad happened */ ENDMESSAGE(Output) return; } } if (bytes > 0) { buf[bytes] = '\0'; XtCallCallbackList(w, gvw->ghostview.output_callback, (XtPointer) buf); } ENDMESSAGE(Output) } /*###################################################################################*/ /* Register the type converter required for the PageOrientation. */ /* Register the type converter required for the Palette. */ /* This routine is called exactly once. */ /*###################################################################################*/ static void ClassInitialize(void) { BEGINMESSAGE(ClassInitialize) #ifndef GV_CODE XtSetTypeConverter(XtRString, XtRPageOrientation, XmuCvtStringToPageOrientation, NULL, 0, XtCacheAll, NULL); #endif XtSetTypeConverter(XtRString, XtRPalette, XmuCvtStringToPalette, NULL, 0, XtCacheAll, NULL); ENDMESSAGE(ClassInitialize) } /*###################################################################################*/ /* Get atoms needed to communicate with ghostscript. */ /* This routine is called once per display. */ /*###################################################################################*/ static void ClassPartInitialize(class) WidgetClass class; { GhostviewWidgetClass gvc = (GhostviewWidgetClass)class; BEGINMESSAGE(ClassPartInitialize) gvc->ghostview_class.ghostview = XmuMakeAtom("GHOSTVIEW"); gvc->ghostview_class.gv_colors = XmuMakeAtom("GHOSTVIEW_COLORS"); gvc->ghostview_class.next = XmuMakeAtom("NEXT"); gvc->ghostview_class.page = XmuMakeAtom("PAGE"); gvc->ghostview_class.done = XmuMakeAtom("DONE"); ENDMESSAGE(ClassPartInitialize) } /*###################################################################################*/ /* Initialize private state. */ /*###################################################################################*/ static void Initialize(Widget request, Widget new, ArgList args _GL_UNUSED, Cardinal *num_args _GL_UNUSED) { XGCValues values; XtGCMask mask; GhostviewWidget ngvw = (GhostviewWidget) new; GhostviewWidget rgvw = (GhostviewWidget) request; BEGINMESSAGE(Initialize) values.foreground = new->core.background_pixel; values.background = new->core.background_pixel; values.graphics_exposures = False; mask = GCGraphicsExposures|GCForeground|GCBackground; ngvw->ghostview.gc = XtGetGC(new, mask, &values); values.foreground = new->core.background_pixel; values.background = new->core.background_pixel; values.line_width = 1; values.function = GXxor; values.graphics_exposures = False; mask=(GCFunction|GCGraphicsExposures|GCBackground|GCForeground|GCLineWidth); ngvw->ghostview.highlight_gc = XtGetGC(new,mask,&values); ngvw->ghostview.mwin = None; ngvw->ghostview.disable_start = False; ngvw->ghostview.interpreter_pid = -1; ngvw->ghostview.input_buffer = NULL; ngvw->ghostview.bytes_left = 0; ngvw->ghostview.input_buffer_ptr = NULL; ngvw->ghostview.buffer_bytes_left = 0; ngvw->ghostview.ps_input = NULL; ngvw->ghostview.interpreter_input = -1; ngvw->ghostview.interpreter_output = -1; ngvw->ghostview.interpreter_error = -1; ngvw->ghostview.interpreter_input_id = None; ngvw->ghostview.interpreter_output_id = None; ngvw->ghostview.interpreter_error_id = None; ngvw->ghostview.gs_width = 0; ngvw->ghostview.gs_height = 0; ngvw->ghostview.changed = False; ngvw->ghostview.busy = False; ngvw->ghostview.cursor_type = CURSOR_NORMAL; ngvw->ghostview.background_cleared = 0; if (ngvw->ghostview.lxdpi) { ngvw->ghostview.xdpi = (float)ngvw->ghostview.lxdpi/1000.0; ngvw->ghostview.lxdpi = 0; INFFMESSAGE(new xdpi,ngvw->ghostview.xdpi) } if (ngvw->ghostview.lydpi) { ngvw->ghostview.ydpi = (float)ngvw->ghostview.lydpi/1000.0; ngvw->ghostview.lydpi = 0; INFFMESSAGE(new ydpi,ngvw->ghostview.ydpi) } /* Compute window size */ Layout(new, (rgvw->core.width == 0), (rgvw->core.height == 0)); ENDMESSAGE(Initialize) } /*###################################################################################*/ /* Create Window and start interpreter if needed */ /*###################################################################################*/ static void Realize(Widget w, Mask *valueMask, XSetWindowAttributes *attributes) { GhostviewWidget gvw = (GhostviewWidget) w; BEGINMESSAGE(Realize) if (gvw->ghostview.cursor != None) { attributes->cursor = gvw->ghostview.cursor; *valueMask |= CWCursor; } XtCreateWindow(w,(unsigned int)InputOutput,(Visual *)CopyFromParent,*valueMask,attributes); /* Realize_pixmap(w); */ IMESSAGE(gvw->core.width) IMESSAGE(gvw->core.height) ENDMESSAGE(Realize) } /*###################################################################################*/ /* Destroy routine: kill the interpreter and release the GC */ /*###################################################################################*/ static void Destroy(Widget w) { GhostviewWidget gvw = (GhostviewWidget) w; BEGINMESSAGE(Destroy) StopInterpreter(w); XtReleaseGC(w, gvw->ghostview.gc); XtReleaseGC(w, gvw->ghostview.highlight_gc); XtFree(gvw->ghostview.input_buffer); if (gvw->core.background_pixmap != XtUnspecifiedPixmap) XFreePixmap(XtDisplay(w), gvw->core.background_pixmap); ENDMESSAGE(Destroy) } /*###################################################################################*/ /* SetBackground */ /*###################################################################################*/ static void SetBackground(Widget w, Bool clear) { GhostviewWidget gvw = (GhostviewWidget) w; BEGINMESSAGE(SetBackground) if (!XtIsRealized(w)) { INFMESSAGE(not realized) ENDMESSAGE(SetBackground) return; } if (clear) { if (!gvw->ghostview.background_cleared) { if ((gvw->core.background_pixmap != None) && (gvw->core.background_pixmap != XtUnspecifiedPixmap)) { INFMESSAGE(filling background pixmap) XFillRectangle(XtDisplay(w),gvw->core.background_pixmap, gvw->ghostview.gc, 0,0,gvw->core.width,gvw->core.height); } INFMESSAGE(clearing window) XClearWindow(XtDisplay(w), XtWindow(w)); gvw->ghostview.background_cleared = 1; } #ifdef MESSAGES else { INFMESSAGE(background already cleared) } #endif } else { if ((gvw->core.background_pixmap != XtUnspecifiedPixmap)) { INFMESSAGE(setting background pixmap) XSetWindowBackgroundPixmap(XtDisplay(w),XtWindow(w),gvw->core.background_pixmap); } } ENDMESSAGE(SetBackground) } /*###################################################################################*/ /* Resize */ /*###################################################################################*/ static void Resize(Widget w _GL_UNUSED) { BEGINMESSAGE(Resize) ENDMESSAGE(Resize) } /*###################################################################################*/ /* SetValues routine. Set new private state, based on changed values * in the widget. Always returns False, because redisplay is never needed. */ /*###################################################################################*/ static Boolean SetValues(Widget current, Widget request, Widget new, ArgList unused1 _GL_UNUSED, Cardinal *unused2 _GL_UNUSED) { GhostviewWidget cgvw = (GhostviewWidget) current; GhostviewWidget rgvw = (GhostviewWidget) request; GhostviewWidget ngvw = (GhostviewWidget) new; String cfilename; String rfilename; String carguments; String rarguments; BEGINMESSAGE(SetValues) cfilename = cgvw->ghostview.filename; if (cfilename == NULL) cfilename = "(null)"; rfilename = rgvw->ghostview.filename; if (rfilename == NULL) rfilename = "(null)"; carguments = cgvw->ghostview.arguments; if (carguments == NULL) carguments = "(null)"; rarguments = rgvw->ghostview.arguments; if (rarguments == NULL) rarguments = "(null)"; if (ngvw->ghostview.lxdpi) { ngvw->ghostview.xdpi = (float)ngvw->ghostview.lxdpi/1000.0; ngvw->ghostview.lxdpi = 0; INFFMESSAGE(new xdpi,ngvw->ghostview.xdpi) } if (ngvw->ghostview.lydpi) { ngvw->ghostview.ydpi = (float)ngvw->ghostview.lydpi/1000.0; ngvw->ghostview.lydpi = 0; INFFMESSAGE(new ydpi,ngvw->ghostview.ydpi) } if (XtIsRealized(new) && !ngvw->ghostview.busy && (cgvw->ghostview.cursor != ngvw->ghostview.cursor)) { ChangeCursor(ngvw,CURSOR_RESET); } if (XtIsRealized(new) && ngvw->ghostview.busy && (cgvw->ghostview.busy_cursor != ngvw->ghostview.busy_cursor)) { ChangeCursor(ngvw,CURSOR_BUSY); } if (cgvw->core.background_pixel != rgvw->core.background_pixel) { XGCValues values; XtGCMask mask; XtReleaseGC(current, cgvw->ghostview.gc); values.foreground = new->core.background_pixel; values.background = new->core.background_pixel; values.graphics_exposures = False; mask = GCGraphicsExposures|GCForeground|GCBackground; ngvw->ghostview.gc = XtGetGC(new, mask, &values); } IIMESSAGE(ngvw->core.width,ngvw->core.height) if ( ( (cgvw->core.width == ngvw->core.width) && (cgvw->core.height == ngvw->core.height) && (cgvw->core.border_width == ngvw->core.border_width) ) && ( (cgvw->core.background_pixel != ngvw->core.background_pixel) || (cgvw->ghostview.foreground != ngvw->ghostview.foreground) || (cgvw->ghostview.palette != ngvw->ghostview.palette) || strcmp(cgvw->ghostview.interpreter, ngvw->ghostview.interpreter) || strcmp(carguments, rarguments) || (cgvw->ghostview.quiet != ngvw->ghostview.quiet) || (cgvw->ghostview.infoVerbose != ngvw->ghostview.infoVerbose) || (cgvw->ghostview.safer != ngvw->ghostview.safer) || (cgvw->ghostview.safeDir != ngvw->ghostview.safeDir) || strcmp(cfilename, rfilename) || (cgvw->ghostview.orientation != ngvw->ghostview.orientation) || (cgvw->ghostview.use_bpixmap != ngvw->ghostview.use_bpixmap) || (cgvw->ghostview.xdpi != ngvw->ghostview.xdpi) || (cgvw->ghostview.ydpi != ngvw->ghostview.ydpi) || (cgvw->ghostview.bottom_margin != ngvw->ghostview.bottom_margin) || (cgvw->ghostview.left_margin != ngvw->ghostview.left_margin) || (cgvw->ghostview.right_margin != ngvw->ghostview.right_margin) || (cgvw->ghostview.top_margin != ngvw->ghostview.top_margin) || (cgvw->ghostview.llx != ngvw->ghostview.llx) || (cgvw->ghostview.lly != ngvw->ghostview.lly) || (cgvw->ghostview.urx != ngvw->ghostview.urx) || (cgvw->ghostview.ury != ngvw->ghostview.ury) ) ) { INFMESSAGE(change detected - redisplay unnecessary) ngvw->ghostview.changed = True; ComputeSize(new, True, True, &(ngvw->ghostview.pref_width), &(ngvw->ghostview.pref_height)); # ifdef MESSAGES { Dimension w=ngvw->ghostview.pref_width,h=ngvw->ghostview.pref_height; INFIIMESSAGE(preferred size:,w,h) } # endif } ENDMESSAGE(SetValues) return(False); } /*###################################################################################*/ /* Function Name: QueryGeometry * Description: This tells the parent what size we would like to be * given certain constraints. * Arguments: w - the widget. * intended - what the parent intends to do with us. * requested - what we want to happen. */ /*###################################################################################*/ static XtGeometryResult QueryGeometry(Widget w, XtWidgetGeometry *intended, XtWidgetGeometry *requested) { Dimension new_width, new_height; Boolean change, width_req, height_req; BEGINMESSAGE(QueryGeometry) INFIMESSAGE(received request:,intended->request_mode) width_req = (Boolean) (intended->request_mode & CWWidth); height_req = (Boolean) (intended->request_mode & CWHeight); if (!width_req && !height_req) { INFMESSAGE(not a width or height request) ENDMESSAGE(QueryGeometry) return(XtGeometryYes); } if (width_req) new_width = intended->width; else new_width = w->core.width; if (height_req) new_height = intended->height; else new_height = w->core.height; requested->request_mode = 0; change = ComputeSize(w, !width_req, !height_req, &new_width, &new_height); requested->request_mode |= CWWidth; requested->width = new_width; requested->request_mode |= CWHeight; requested->height = new_height; if (change) {INFMESSAGE(agree almost) ENDMESSAGE(QueryGeometry) return(XtGeometryAlmost);} ENDMESSAGE(QueryGeometry) return(XtGeometryYes); } /*###################################################################################*/ /* Layout */ /* Layout the widget. */ /*###################################################################################*/ static void Layout(Widget w, Boolean xfree, Boolean yfree) { Dimension width = w->core.width; Dimension height = w->core.height; BEGINMESSAGE(Layout) if (ComputeSize(w, xfree, yfree, &width, &height)) { XtWidgetGeometry request, reply; Boolean changed = False; INFMESSAGE(geometry has changed; requesting size change) request.request_mode = CWWidth | CWHeight; request.width = width; request.height = height; switch ( XtMakeGeometryRequest(w, &request, &reply) ) { case XtGeometryYes: changed = True; break; case XtGeometryNo: break; case XtGeometryDone: /* should not be reached */ break; case XtGeometryAlmost: ComputeSize(w, (request.height != reply.height), (request.width != reply.width), &(reply.width), &(reply.height)); request = reply; switch (XtMakeGeometryRequest(w, &request, &reply) ) { case XtGeometryYes: changed = True; break; case XtGeometryNo: break; case XtGeometryDone: /* should not be reached */ break; case XtGeometryAlmost: request = reply; ComputeSize(w, FALSE, FALSE, &(request.width), &(request.height)); request.request_mode = CWWidth | CWHeight; XtMakeGeometryRequest(w, &request, &reply); changed = True; break; } break; } } ENDMESSAGE(Layout) } /*###################################################################################*/ /* ComputeSize */ /* Compute new size of window, sets xdpi and ydpi if necessary. * returns True if new window size is different */ /*###################################################################################*/ static Boolean SetProperty(Widget w, Pixmap bpixmap); static Boolean ComputeSize(Widget w, Boolean xfree, Boolean yfree, Dimension *width, Dimension *height) /* xfree, yfree: Am I allowed to change width or height */ { GhostviewWidget gvw = (GhostviewWidget) w; Dimension new_width = *width; Dimension new_height = *height; float newxdpi=72, newydpi=72,xdpi,ydpi; Boolean change; int dpsw,dpsh; BEGINMESSAGE(ComputeSize) switch (gvw->ghostview.orientation) { case XtPageOrientationLandscape: case XtPageOrientationSeascape: dpsw = gvw->ghostview.ury-gvw->ghostview.lly+1; dpsh = gvw->ghostview.urx-gvw->ghostview.llx+1; xdpi = gvw->ghostview.ydpi; ydpi = gvw->ghostview.xdpi; break; case XtPageOrientationPortrait: case XtPageOrientationUpsideDown: default: dpsw = gvw->ghostview.urx-gvw->ghostview.llx+1; dpsh = gvw->ghostview.ury-gvw->ghostview.lly+1; xdpi = gvw->ghostview.xdpi; ydpi = gvw->ghostview.ydpi; break; } if (dpsw<1) dpsw = 1; if (dpsh<1) dpsh = 1; xdpi = gvw->ghostview.xdpi; ydpi = gvw->ghostview.ydpi; if (xfree && yfree) { INFMESSAGE(x and y are free) new_width = (((float)dpsw*72.0)/xdpi + 0.5); new_height = (((float)dpsh*72.0)/ydpi + 0.5); } else { if (!xfree) newxdpi = (float)dpsw * 72.0 / (float)gvw->core.width; if (!yfree) newydpi = (float)dpsh * 72.0 / (float)gvw->core.height; if (xfree) { INFMESSAGE(x is free) newxdpi = newydpi * xdpi / ydpi; new_width = (((float)dpsw*72.0)/newxdpi+0.5); } else if (yfree) { INFMESSAGE(y is free) newydpi = newxdpi * ydpi / xdpi; new_height = (((float)(dpsh)*72.0)/newydpi+0.5); } gvw->ghostview.xdpi = newxdpi; gvw->ghostview.ydpi = newydpi; } FMESSAGE(gvw->ghostview.xdpi) FMESSAGE(gvw->ghostview.ydpi) change = (new_width != *width) || (new_height != *height); *width = new_width; *height = new_height; gvw->ghostview.pref_width = new_width; gvw->ghostview.pref_height = new_height; #if 0 printf("--------------\n"); if (xfree) printf(" x is free\n"); else printf(" x is not free\n"); if (yfree) printf(" y is free\n"); else printf(" y is not free\n"); printf(" xdpi=%f ydpi=%f\n",gvw->ghostview.xdpi,gvw->ghostview.ydpi); printf(" width=%d height=%d\n",new_width,new_height); printf(" llx=%d lly=%d urx=%d ury=%d\n", gvw->ghostview.llx, gvw->ghostview.lly, gvw->ghostview.urx, gvw->ghostview.ury ); printf("--------------\n"); #endif ENDMESSAGE(ComputeSize) return (change); } /*###################################################################################*/ /* Catch the alloc error when there is not enough resources for the * backing pixmap. Automatically shut off backing pixmap and let the * user know when this happens. */ /*###################################################################################*/ static Boolean alloc_error; static XErrorHandler oldhandler; static int catch_alloc (Display *dpy, XErrorEvent *err) { if (err->error_code == BadAlloc) alloc_error = True; if (alloc_error) return 0; return oldhandler(dpy, err); } /*###################################################################################*/ /* Setup - sets up the backing pixmap, and GHOSTVIEW property and * starts interpreter if needed. * NOTE: the widget must be realized before calling Setup(). * Returns True if a new interpreter was started, False otherwise. */ /*###################################################################################*/ static Boolean Setup(Widget w) { GhostviewWidget gvw = (GhostviewWidget) w; Pixmap bpixmap; BEGINMESSAGE(Setup) if (!gvw->ghostview.changed && (gvw->core.width == gvw->ghostview.gs_width) && (gvw->core.height == gvw->ghostview.gs_height)) { INFMESSAGE(nothing changed) ENDMESSAGE(Setup) return False; } StopInterpreter(w); if ((gvw->core.width != gvw->ghostview.gs_width) || (gvw->core.height != gvw->ghostview.gs_height) || (!gvw->ghostview.use_bpixmap)) { INFMESSAGE(geometry has changed or backingPixmap no longer used) if (gvw->core.background_pixmap != XtUnspecifiedPixmap) { INFMESSAGE(freeing previous background pixmap) XFreePixmap(XtDisplay(w), gvw->core.background_pixmap); gvw->core.background_pixmap = XtUnspecifiedPixmap; INFMESSAGE(setting background pixmap to 'None') XSetWindowBackgroundPixmap(XtDisplay(w), XtWindow(w), None); } } if (gvw->ghostview.use_bpixmap) { INFMESSAGE(setting up backing pixmap) if (gvw->core.background_pixmap == XtUnspecifiedPixmap) { INFMESSAGE(backing pixmap will be allocated) /* Get a Backing Pixmap, but be ready for the BadAlloc. */ XSync(XtDisplay(w), False); /* Get to known state */ oldhandler = XSetErrorHandler(catch_alloc); alloc_error = False; bpixmap = XCreatePixmap(XtDisplay(w), XtWindow(w), gvw->core.width, gvw->core.height, gvw->core.depth); XSync(XtDisplay(w), False); /* Force the error */ if (alloc_error) { INFMESSAGE(allocation error for backing pixmap) XtCallCallbackList(w, gvw->ghostview.message_callback,"BadAlloc"); if (bpixmap != None) { XFreePixmap(XtDisplay(w), bpixmap); XSync(XtDisplay(w), False); /* Force the error */ bpixmap = None; } } oldhandler = XSetErrorHandler(oldhandler); if (bpixmap != None) { INFMESSAGE(setting background pixmap) gvw->core.background_pixmap = bpixmap; XSetWindowBackgroundPixmap(XtDisplay(w), XtWindow(w), bpixmap); } } else { bpixmap = gvw->core.background_pixmap; } } else { bpixmap = None; } { XSetWindowAttributes xswa; if (bpixmap != None) xswa.backing_store = NotUseful; else xswa.backing_store = Always; XChangeWindowAttributes(XtDisplay(w), XtWindow(w), CWBackingStore, &xswa); } return SetProperty(w,bpixmap); } static Boolean SetProperty(Widget w, Pixmap bpixmap) { GhostviewWidget gvw = (GhostviewWidget) w; GhostviewWidgetClass gvc = (GhostviewWidgetClass) XtClass(w); char buf[GV_BUFSIZ]; float xdpi,ydpi; gvw->ghostview.gs_width = gvw->core.width; gvw->ghostview.gs_height = gvw->core.height; { int dpsw,dpsh; switch (gvw->ghostview.orientation) { case XtPageOrientationLandscape: case XtPageOrientationSeascape: dpsw = gvw->ghostview.ury-gvw->ghostview.lly+1; dpsh = gvw->ghostview.urx-gvw->ghostview.llx+1; break; case XtPageOrientationPortrait: case XtPageOrientationUpsideDown: default: dpsw = gvw->ghostview.urx-gvw->ghostview.llx+1; dpsh = gvw->ghostview.ury-gvw->ghostview.lly+1; break; } if (dpsw<1) dpsw=1; if (dpsh<1) dpsh = 1; xdpi = (float)gvw->core.width * 72.0 / (float)dpsw; ydpi = (float)gvw->core.height* 72.0 / (float)dpsh; } IIMESSAGE(gvw->ghostview.gs_width,gvw->ghostview.gs_height) sprintf(buf, "%ld %d %d %d %d %d %g %g %d %d %d %d", bpixmap, gvw->ghostview.orientation, (int)gvw->ghostview.llx, (int)gvw->ghostview.lly, gvw->ghostview.urx, gvw->ghostview.ury, xdpi, ydpi, gvw->ghostview.left_margin, gvw->ghostview.bottom_margin, gvw->ghostview.right_margin, gvw->ghostview.top_margin); XChangeProperty(XtDisplay(w), XtWindow(w), XmuInternAtom(XtDisplay(w), gvc->ghostview_class.ghostview), XA_STRING, 8, PropModeReplace, (unsigned char *)buf, strlen(buf)); INFSMESSAGE(atom 1:, buf) sprintf(buf, "%s %d %d", gvw->ghostview.palette == XtPaletteMonochrome ? "Monochrome" : gvw->ghostview.palette == XtPaletteGrayscale ? "Grayscale" : gvw->ghostview.palette == XtPaletteColor ? "Color" : "?", (int)gvw->ghostview.foreground, (int)gvw->core.background_pixel); XChangeProperty(XtDisplay(w), XtWindow(w), XmuInternAtom(XtDisplay(w), gvc->ghostview_class.gv_colors), XA_STRING, 8, PropModeReplace, (unsigned char *)buf, strlen(buf)); INFSMESSAGE(atom 2:, buf) /* Be sure to update properties */ XSync(XtDisplay(w), False); gvw->ghostview.background_cleared = 0; if(!pix || w != page) SetBackground(w,True); ENDMESSAGE(Setup) return True; } /* This routine starts the interpreter. It sets the DISPLAY and * GHOSTVIEW environment variables. The GHOSTVIEW environment variable * contains the Window that ghostscript should write on. * * This routine also opens pipes for stdout and stderr and initializes * application input events for them. If input to ghostscript is not * from a file, a pipe for stdin is created. This pipe is setup for * non-blocking I/O so that the user interface never "hangs" because of * a write to ghostscript. */ static void StartInterpreter(Widget w) { GhostviewWidget gvw = (GhostviewWidget) w; int std_in[2]; int std_out[2]; int std_err[2]; char buf[GV_BUFSIZ]; #define NUM_ARGS 100 char *argv[NUM_ARGS]; char *arguments = NULL; char *cptr; char *device = NULL; char *dptr; int argc = 0; int ret; void* toBeFreed = 0; String filename = 0; BEGINMESSAGE(StartInterpreter) if(w == page && !gvw->ghostview.use_bpixmap) { /* printf("StartInterpreter on page\n"); */ SetProperty(w,None); if (!pix) SetBackground(w,True); } else { /* printf("StartInterpreter old\n"); */ SetBackground(w,True); } StopInterpreter(w); /* Clear the window before starting a new interpreter. */ if (gvw->ghostview.disable_start) return; argv[argc++] = gvw->ghostview.interpreter; if (app_res.antialias) dptr = device = XtNewString(gv_gs_x11_alpha_device); else dptr = device = XtNewString(gv_gs_x11_device); while (isspace(*dptr)) dptr++; while (*dptr) { argv[argc++] = dptr; while (*dptr && !isspace(*dptr)) dptr++; if (*dptr) *dptr++ = '\0'; if (argc + 2 >= NUM_ARGS) { fprintf(stderr, "Too many arguments to interpreter.\n"); clean_safe_tempdir(); exit(EXIT_STATUS_ERROR); } while (isspace(*dptr)) dptr++; } argv[argc++] = "-dNOPROMPT"; argv[argc++] = "-dNOPAUSE"; if (gv_pdf_password) { char* password; String parameter = malloc(100); toBeFreed = (void*) parameter; strcpy(parameter, "-sPDFPassword="); password = quote_filename(gv_pdf_password); strcat(parameter, password); XtFree(password); argv[argc++] = parameter; } if (gvw->ghostview.quiet) argv[argc++] = "-dQUIET"; if (gvw->ghostview.safer) { argv[argc++] = "-P-"; argv[argc++] = "-dSAFER"; # ifdef ALLOW_PDF /* The file created by pdf2dsc opens the original pdf file with the read operator. */ if (gv_filename_dsc && (!gvw->ghostview.filename || !strcmp(gvw->ghostview.filename,"-"))) argv[argc++] = "-dDELAYSAFER"; # endif } if (gvw->ghostview.arguments) { cptr = arguments = XtNewString(gvw->ghostview.arguments); while (isspace(*cptr)) cptr++; while (*cptr) { argv[argc++] = cptr; while (*cptr && !isspace(*cptr)) cptr++; if (*cptr) *cptr++ = '\0'; if (argc + 2 >= NUM_ARGS) { fprintf(stderr, "Too many arguments to interpreter.\n"); clean_safe_tempdir(); exit(EXIT_STATUS_ERROR); } while (isspace(*cptr)) cptr++; } } # ifdef ALLOW_PDF if (gvw->ghostview.filename && strcmp(gvw->ghostview.filename,"-")) { if ( *(gvw->ghostview.filename) == '-' ) { filename = malloc( strlen(gvw->ghostview.filename) + 3); strcpy( filename, "./" ); strcat( filename, gvw->ghostview.filename); argv[argc++] = filename; } else argv[argc++] = gvw->ghostview.filename; argv[argc++] = "-c"; argv[argc++] = "quit"; } else # endif if (gvw->ghostview.filename && !strcmp(gvw->ghostview.filename,"-")) { /* The ghostscript documentation states that the "-" argument tells gs that input is coming from a pipe rather than from stdin. One of the side effects of the "-" argument is that gs does not flush output at each line of input, but rather accumulates input and flushes only when the buffer is full. Since we want gs to flush output at each line of input, we therefore cannot send "-". Unfortunately not sending "-" has the side effect that gs no longer reads correctly through either multiple PostScript files or PostScript files with multiple pages. Ah well. Should gs ever acquire a -DFLUSH argument, then send gs that argument, and uncomment the following line. */ /* argv[argc++] = "-"; */ } else { argv[argc++] = "-"; } argv[argc++] = NULL; if (gvw->ghostview.filename == NULL) { ret = pipe(std_in); if (ret == -1) { perror("Could not create pipe"); clean_safe_tempdir(); exit(EXIT_STATUS_ERROR); } } else if (strcmp(gvw->ghostview.filename, "-")) { # ifdef ALLOW_PDF ret = pipe(std_in); if (ret == -1) { perror("Could not create pipe"); clean_safe_tempdir(); exit(EXIT_STATUS_ERROR); } # else std_in[0] = open(gvw->ghostview.filename, O_RDONLY, 0); # endif } ret = pipe(std_out); if (ret == -1) { perror("Could not create pipe"); clean_safe_tempdir(); exit(EXIT_STATUS_ERROR); } ret = pipe(std_err); if (ret == -1) { perror("Could not create pipe"); clean_safe_tempdir(); exit(EXIT_STATUS_ERROR); } gvw->ghostview.changed = False; if (!((gvw->ghostview.filename && strcmp(gvw->ghostview.filename, "-") == 0) && (gv_gs_arguments && *gv_gs_arguments))) { gvw->ghostview.busy = True; ChangeCursor(gvw,CURSOR_BUSY); } /* printf("StartInterpreter:\n"); printf("%s", argv[0]); for (argc = 1; argv[argc] != NULL; argc++) { printf(" %s", argv[argc]); } printf("\n"); */ gvw->ghostview.interpreter_pid = fork(); if (gvw->ghostview.interpreter_pid == 0) { /* child */ close(std_out[0]); close(std_err[0]); dup2(std_out[1], 1); close(std_out[1]); dup2(std_err[1], 2); close(std_err[1]); if(pix && w == page){ sprintf(buf, "%ld %ld", XtWindow(w), pix ); } else { sprintf(buf, "%ld", XtWindow(w)); } gnu_gv_setenv("GHOSTVIEW", buf, True); gnu_gv_setenv("DISPLAY", XDisplayString(XtDisplay(w)), True); if (gvw->ghostview.filename == NULL) { close(std_in[1]); dup2(std_in[0], 0); close(std_in[0]); } else if (strcmp(gvw->ghostview.filename, "-")) { # ifdef ALLOW_PDF close(std_in[1]); dup2(std_in[0], 0); close(std_in[0]); # else dup2(std_in[0], 0); close(std_in[0]); # endif } if (gvw->ghostview.safeDir) { if (chdir(gv_safe_gs_workdir) != 0) { sprintf(buf, "Chdir to %s failed", gv_safe_gs_workdir); perror(buf); _exit(EXIT_STATUS_ERROR); } } execvp(argv[0], argv); sprintf(buf, execOfFailedLabel, argv[0]); perror(buf); _exit(EXIT_STATUS_ERROR); } else { if (toBeFreed) free(toBeFreed); if (filename) free(filename); if (gvw->ghostview.filename == NULL) { #ifdef NON_BLOCKING_IO int result; #endif close(std_in[0]); #ifdef NON_BLOCKING_IO result = fcntl(std_in[1], F_GETFL, 0); result = result | O_NONBLOCK; result = fcntl(std_in[1], F_SETFL, result); #endif gvw->ghostview.interpreter_input = std_in[1]; gvw->ghostview.interpreter_input_id = None; } else if (strcmp(gvw->ghostview.filename, "-")) { gvw->ghostview.interpreter_input = std_in[1]; gvw->ghostview.interpreter_input_id = None; close(std_in[0]); } close(std_out[1]); gvw->ghostview.interpreter_output = std_out[0]; gvw->ghostview.interpreter_output_id = XtAppAddInput(XtWidgetToApplicationContext(w), std_out[0], (XtPointer)XtInputReadMask, Output, (XtPointer)w); close(std_err[1]); gvw->ghostview.interpreter_error = std_err[0]; gvw->ghostview.interpreter_error_id = XtAppAddInput(XtWidgetToApplicationContext(w), std_err[0], (XtPointer)XtInputReadMask, Output, (XtPointer)w); } XtFree(arguments); XtFree(device); gvw->ghostview.background_cleared=0; ENDMESSAGE(StartInterpreter) } /* Stop the interperter, if present, and remove any Input sources. */ /* Also reset the busy state. */ int restarted = 0; static void StopInterpreter(Widget w) { GhostviewWidget gvw = (GhostviewWidget) w; BEGINMESSAGE(StopInterpreter) if (gvw->ghostview.interpreter_pid >= 0) { kill(gvw->ghostview.interpreter_pid, SIGTERM); gvw->ghostview.interpreter_pid = -1; wait(0); } if (gvw->ghostview.interpreter_input >= 0) { INFMESSAGE(removing interpreter input) close(gvw->ghostview.interpreter_input); gvw->ghostview.interpreter_input = -1; if (gvw->ghostview.interpreter_input_id != None) { XtRemoveInput(gvw->ghostview.interpreter_input_id); gvw->ghostview.interpreter_input_id = None; } while (gvw->ghostview.ps_input) { struct record_list *ps_old = gvw->ghostview.ps_input; gvw->ghostview.ps_input = ps_old->next; if (ps_old->close) fclose(ps_old->fp); XtFree((char *)ps_old); } } if (gvw->ghostview.interpreter_output >= 0) { INFMESSAGE(closing interpreter output) close(gvw->ghostview.interpreter_output); gvw->ghostview.interpreter_output = -1; XtRemoveInput(gvw->ghostview.interpreter_output_id); } if (gvw->ghostview.interpreter_error >= 0) { INFMESSAGE(closing interpreter error) close(gvw->ghostview.interpreter_error); gvw->ghostview.interpreter_error = -1; XtRemoveInput(gvw->ghostview.interpreter_error_id); } gvw->ghostview.busy = False; ChangeCursor(gvw,CURSOR_RESET); ENDMESSAGE(StopInterpreter) } /*###################################################################################*/ /* InterpreterFailed */ /* The interpeter failed, Stop what's left and notify application */ /*###################################################################################*/ static void InterpreterFailed(Widget w, const char *mesg) { GhostviewWidget gvw = (GhostviewWidget) w; BEGINMESSAGE(InterpreterFailed) StopInterpreter(w); fprintf(stderr, "Error: %s, errno %d\n", mesg, errno); XtCallCallbackList(w, gvw->ghostview.message_callback, "Failed"); ENDMESSAGE(InterpreterFailed) } /*###################################################################################*/ /*###################################################################################*/ /* * Public Routines */ /*###################################################################################*/ /*###################################################################################*/ void GhostviewDrawRectangle(w,x,y,width,height) Widget w; int x,y,width,height; { GhostviewWidget gvw = (GhostviewWidget) w; BEGINMESSAGE(GhostviewDrawRectangle) XDrawRectangle(XtDisplay(w),XtWindow(w),gvw->ghostview.highlight_gc,x,y,width,height); if (gvw->core.background_pixmap != XtUnspecifiedPixmap) XDrawRectangle(XtDisplay(w),gvw->core.background_pixmap,gvw->ghostview.highlight_gc,x,y,width,height); ENDMESSAGE(GhostviewDrawRectangle) } /*------------------------------------------------------------*/ /* GhostviewOrientCoords */ /*------------------------------------------------------------*/ #define GV_O_P (1<<0) #define GV_O_U (1<<1) #define GV_O_L (1<<2) #define GV_O_S (1<<3) #define GV_O_H ((GV_O_L) | (GV_O_S)) #define GV_O_V ((GV_O_P) | (GV_O_U)) static void GhostviewOrientCoords(GhostviewWidget gvw, int x, int y, int *xP, int *yP, int *widthP, int *heightP, int *orientP) { BEGINMESSAGE(GhostviewOrientCoords) switch (gvw->ghostview.orientation) { case XtPageOrientationPortrait: *orientP = GV_O_P; break; case XtPageOrientationUpsideDown: *orientP = GV_O_U; break; case XtPageOrientationLandscape: *orientP = GV_O_L; break; case XtPageOrientationSeascape: *orientP = GV_O_S; break; default: *orientP = GV_O_P; break; } if (*orientP & GV_O_V) { *widthP = gvw->core.width-1; *heightP = gvw->core.height-1; if (xP) *xP = x; if (yP) *yP = y; } else { *widthP = gvw->core.height-1; *heightP = gvw->core.width-1; if (xP) *xP = y; if (yP) *yP = x; } if (*widthP < 1) *widthP=1; if (*heightP < 1) *heightP=1; ENDMESSAGE(GhostviewOrientCoords) } /*------------------------------------------------------------*/ /* GhostviewCornersPS */ /*------------------------------------------------------------*/ static void GhostviewCornersPS(GhostviewWidget gvw, int o, int *pslxP, int *psrxP, int *pslyP, int *psuyP) { if (o & GV_O_P) { *pslxP=gvw->ghostview.llx; *psrxP=gvw->ghostview.urx; *pslyP=gvw->ghostview.ury; *psuyP=gvw->ghostview.lly; } else if (o & GV_O_L) { *pslxP=gvw->ghostview.llx; *psrxP=gvw->ghostview.urx; *pslyP=gvw->ghostview.lly; *psuyP=gvw->ghostview.ury; } else if (o & GV_O_U) { *pslxP=gvw->ghostview.urx; *psrxP=gvw->ghostview.llx; *pslyP=gvw->ghostview.lly; *psuyP=gvw->ghostview.ury; } else { *pslxP=gvw->ghostview.urx; *psrxP=gvw->ghostview.llx; *pslyP=gvw->ghostview.ury; *psuyP=gvw->ghostview.lly; } } /*############################################################*/ /* GhostviewCoordsXtoPS */ /*############################################################*/ void GhostviewCoordsXtoPS( Widget w, int wx, int wy, int *psxP, int *psyP ) { GhostviewWidget gvw = (GhostviewWidget) w; int o,x,y,pslx,psrx,psly,psuy,wrx,wly; BEGINMESSAGE(GhostviewCoordsXtoPS) GhostviewOrientCoords(gvw,wx,wy,&x,&y,&wrx,&wly,&o); GhostviewCornersPS(gvw,o,&pslx,&psrx,&psly,&psuy); *psxP = (pslx + ((float)x*(float)(psrx-pslx))/(float)wrx + 0.5); *psyP = (psly + ((float)y*(float)(psuy-psly))/(float)wly + 0.5); #if 1 { int xx,yy; IIMESSAGE(wx,wy) IIMESSAGE(*psxP,*psyP) GhostviewCoordsPStoX(w,*psxP,*psyP,&xx,&yy); IIMESSAGE(xx,yy) } #endif ENDMESSAGE(GhostviewCoordsXtoPS) } /*############################################################*/ /* GhostviewCoordsPStoX */ /*############################################################*/ void GhostviewCoordsPStoX( Widget w, int psx, int psy, int *wxP, int *wyP ) { GhostviewWidget gvw = (GhostviewWidget) w; int o,pslx,psrx,psly,psuy,wrx,wly,*xP,*yP; BEGINMESSAGE(GhostviewCoordsPStoX) GhostviewOrientCoords(gvw,0,0,NULL,NULL,&wrx,&wly,&o); GhostviewCornersPS(gvw,o,&pslx,&psrx,&psly,&psuy); if (o & GV_O_V) { xP = wxP; yP=wyP; } else { xP = wyP; yP=wxP; } *xP = (((float)(psx-pslx)*(float)wrx)/(float)(psrx-pslx)+0.5); *yP = (((float)(psy-psly)*(float)wly)/(float)(psuy-psly)+0.5); IIMESSAGE(*xP,*yP) ENDMESSAGE(GhostviewCoordsPStoX) } /*############################################################*/ /* GhostviewGetBBOfArea */ /*############################################################*/ void GhostviewGetBBofArea ( Widget w, int x1, int y1, int x2, int y2, GhostviewReturnStruct* p ) { GhostviewWidget gvw = (GhostviewWidget) w; int psx1,psy1,psx2,psy2; BEGINMESSAGE(GhostviewGetBBOfArea) GhostviewCoordsXtoPS(w,x1,y1,&psx1,&psy1); GhostviewCoordsXtoPS(w,x2,y2,&psx2,&psy2); p->psx = psx1 < psx2 ? psx1 : psx2; p->psy = psy1 < psy2 ? psy1 : psy2; p->width = abs(psx1-psx2)+1; p->height = abs(psy1-psy2)+1; p->xdpi = gvw->ghostview.xdpi; p->ydpi = gvw->ghostview.ydpi; IIMESSAGE(p->psx,p->psy) IIMESSAGE(p->width,p->height) ENDMESSAGE(GhostviewGetBBOfArea) } /*############################################################*/ /* GhostviewGetAreaOfBB */ /*############################################################*/ void GhostviewGetAreaOfBB ( Widget w, int psx1, int psy1, int psx2, int psy2, GhostviewReturnStruct* p ) { int x1,y1,x2,y2; BEGINMESSAGE(GhostviewGetAreaOfBB) GhostviewCoordsPStoX(w,psx1,psy1,&x1,&y1); GhostviewCoordsPStoX(w,psx2,psy2,&x2,&y2); p->psx = x1 < x2 ? x1 : x2; p->psy = y1 < y2 ? y1 : y2; p->width = abs(x1-x2)+1; p->height = abs(y1-y2)+1; IIMESSAGE(p->psx,p->psy) IIMESSAGE(p->width,p->height) ENDMESSAGE(GhostviewGetAreaOfBB) } /*###################################################################################*/ /* GhostviewClearBackground */ /*###################################################################################*/ void GhostviewClearBackground(Widget w) { BEGINMESSAGE(GhostviewClearBackground) if (XtIsRealized(w)) { if(!pix || w != page) SetBackground(w,True); } ENDMESSAGE(GhostviewClearBackground) } /*###################################################################################*/ /* GhostviewSetup */ /*###################################################################################*/ void GhostviewSetup(Widget w) { GhostviewWidget gvw = (GhostviewWidget) w; BEGINMESSAGE(GhostviewSetup) gvw->ghostview.disable_start = True; if (XtIsRealized(w)) Setup(w); ENDMESSAGE(GhostviewSetup) } /*###################################################################################*/ /* GhostviewDisableInterpreter: * Stop any interpreter and disable new ones from starting. */ /*###################################################################################*/ void GhostviewDisableInterpreter(Widget w) { GhostviewWidget gvw = (GhostviewWidget) w; BEGINMESSAGE(GhostviewDisableInterpreter) gvw->ghostview.disable_start = True; if (XtIsRealized(w)) StopInterpreter(w); ENDMESSAGE(GhostviewDisableInterpreter) } /*###################################################################################*/ /* GhostviewEnableInterpreter: * Allow an interpreter to start and start one if the widget is * currently realized. */ /*###################################################################################*/ void GhostviewEnableInterpreter(Widget w) { GhostviewWidget gvw = (GhostviewWidget) w; BEGINMESSAGE(GhostviewEnableInterpreter) gvw->ghostview.disable_start = False; if (XtIsRealized(w)) StartInterpreter(w); ENDMESSAGE(GhostviewEnableInterpreter) } /*###################################################################################*/ /* GhostviewState */ /*###################################################################################*/ void GhostviewState( Widget w, Boolean *processflag_p, Boolean *busyflag_p, Boolean *inputflag_p ) { GhostviewWidget gvw = (GhostviewWidget) w; BEGINMESSAGE(GhostviewState) if (processflag_p) *processflag_p = (gvw->ghostview.interpreter_pid != -1) ? True: False; if (busyflag_p) *busyflag_p = (!(gvw->ghostview.busy)) ? True: False; if (inputflag_p) *inputflag_p = (gvw->ghostview.ps_input == NULL) ? True: False; # ifdef MESSAGES if (gvw->ghostview.interpreter_pid != -1) {INFMESSAGE(have interpreter)} else {INFMESSAGE(have no interpreter)} if (!(gvw->ghostview.busy)) {INFMESSAGE(widget idle)} else {INFMESSAGE(widget busy)} if (gvw->ghostview.ps_input == NULL) {INFMESSAGE(no pending input)} else {INFMESSAGE(have pending input)} # endif ENDMESSAGE(GhostviewState) } /*###################################################################################*/ /* GhostviewIsInterpreterReady: * Returns True if the interpreter is ready for new input. */ /*###################################################################################*/ Boolean GhostviewIsInterpreterReady(Widget w) { GhostviewWidget gvw = (GhostviewWidget) w; BEGINMESSAGE(GhostviewIsInterpreterReady) # ifdef MESSAGES if (gvw->ghostview.interpreter_pid == -1) {INFMESSAGE(no interpreter process)} if (gvw->ghostview.busy) {INFMESSAGE(interpreter busy)} if (gvw->ghostview.ps_input != NULL) {INFMESSAGE(interpreter still has input)} # endif ENDMESSAGE(GhostviewIsInterpreterReady) return gvw->ghostview.interpreter_pid != -1 && !gvw->ghostview.busy && gvw->ghostview.ps_input == NULL; } /*###################################################################################*/ /* GhostviewIsBusy: * Returns True if the interpreter is running but the widget is busy */ /*###################################################################################*/ Boolean GhostviewIsBusy(Widget w) { GhostviewWidget gvw = (GhostviewWidget) w; BEGINMESSAGE(GhostviewIsBusy) ENDMESSAGE(GhostviewIsBusy) return (((gvw->ghostview.interpreter_pid != -1)&&(gvw->ghostview.busy))); } /*###################################################################################*/ /* GhostviewIsInterpreterRunning: * Returns True if the interpreter is running. */ /*###################################################################################*/ Boolean GhostviewIsInterpreterRunning(Widget w) { GhostviewWidget gvw = (GhostviewWidget) w; BEGINMESSAGE(GhostviewIsInterpreterRunning) ENDMESSAGE(GhostviewIsInterpreterRunning) if(gvw->ghostview.disable_start) return 0; return gvw->ghostview.interpreter_pid != -1; } /*###################################################################################*/ /* GhostviewSendPS: * Queue a portion of a PostScript file for output to ghostscript. * fp: FILE * of the file in question. NOTE: if you have several * Ghostview widgets reading from the same file. You must open * a unique FILE * for each widget. * SendPS does not actually send the PostScript, it merely queues it * for output. * begin: position in file (returned from ftell()) to start. * len: number of bytes to write. * * If an interpreter is not running, nothing is queued and * False is returned. */ /*###################################################################################*/ Boolean GhostviewSendPS(Widget w, FILE *fp, gv_off_t begin, gv_off_t len, Bool doclose) { GhostviewWidget gvw = (GhostviewWidget) w; struct record_list *ps_new; if (gvw->ghostview.interpreter_input < 0) return False; ps_new = (struct record_list *) XtMalloc(sizeof (struct record_list)); ps_new->fp = fp; ps_new->begin = begin; ps_new->len = len; ps_new->seek_needed = True; ps_new->close = doclose; ps_new->next = NULL; if (gvw->ghostview.input_buffer == NULL) { gvw->ghostview.input_buffer = XtMalloc(GV_BUFSIZ); } if (gvw->ghostview.ps_input == NULL) { gvw->ghostview.input_buffer_ptr = gvw->ghostview.input_buffer; gvw->ghostview.bytes_left = len; gvw->ghostview.buffer_bytes_left = 0; gvw->ghostview.ps_input = ps_new; gvw->ghostview.interpreter_input_id = XtAppAddInput(XtWidgetToApplicationContext(w), gvw->ghostview.interpreter_input, (XtPointer)XtInputWriteMask, Input, (XtPointer)w); } else { struct record_list *p = gvw->ghostview.ps_input; while (p->next != NULL) { p = p->next; } p->next = ps_new; } return True; } /*###################################################################################*/ /* GhostviewNextPage: * Tell ghostscript to start the next page. * Returns False if ghostscript is not running, or not ready to start * another page. * If another page is started. Sets the busy flag and cursor. */ /*###################################################################################*/ Boolean GhostviewNextPage(Widget w) { GhostviewWidget gvw = (GhostviewWidget) w; GhostviewWidgetClass gvc = (GhostviewWidgetClass) XtClass(w); XEvent event; BEGINMESSAGE(GhostviewNextPage) if (gvw->ghostview.interpreter_pid < 0) { INFMESSAGE(no interpreter active) ENDMESSAGE(GhostviewNextPage) return False; } if (gvw->ghostview.mwin == None) { INFMESSAGE(no window) ENDMESSAGE(GhostviewNextPage) return False; } if (!gvw->ghostview.busy) { if (!((gvw->ghostview.filename && strcmp(gvw->ghostview.filename, "-") == 0) && (gv_gs_arguments && *gv_gs_arguments))) { gvw->ghostview.busy = True; ChangeCursor(gvw,CURSOR_BUSY); } event.xclient.type = ClientMessage; event.xclient.display = XtDisplay(w); event.xclient.window = gvw->ghostview.mwin; event.xclient.message_type = XmuInternAtom(XtDisplay(w), gvc->ghostview_class.next); event.xclient.format = 32; XSendEvent(XtDisplay(w), gvw->ghostview.mwin, False, 0, &event); XFlush(XtDisplay(w)); /* And push it out */ INFMESSAGE(ok) ENDMESSAGE(GhostviewNextPage) return True; } else { INFMESSAGE(ghostview busy) ENDMESSAGE(GhostviewNextPage) return False; } } /*###################################################################################*/ /* Palette Conversion Routine. * Returns True if Conversion is successful. */ /*###################################################################################*/ #define done(type, value) \ { \ if (toVal->addr != NULL) { \ if (toVal->size < sizeof(type)) { \ toVal->size = sizeof(type); \ return False; \ } \ *(type*)(toVal->addr) = (value); \ } \ else { \ static type static_val; \ static_val = (value); \ toVal->addr = (XPointer)&static_val; \ } \ toVal->size = sizeof(type); \ return True; \ } Boolean XmuCvtStringToPalette(Display *dpy, XrmValue *args _GL_UNUSED, Cardinal *num_args _GL_UNUSED, XrmValue *fromVal, XrmValue *toVal, XtPointer *data _GL_UNUSED) { static XrmQuark XrmQEmonochrome; static XrmQuark XrmQEgrayscale; static XrmQuark XrmQEcolor; static int haveQuarks; XrmQuark q; char *str = (XPointer) fromVal->addr; char lowerName[100]; if (str == NULL) return False; if (!haveQuarks) { XrmQEmonochrome = XrmStringToQuark(XtEmonochrome); XrmQEgrayscale = XrmStringToQuark(XtEgrayscale); XrmQEcolor = XrmStringToQuark(XtEcolor); haveQuarks = 1; } XmuCopyISOLatin1Lowered(lowerName, str); q = XrmStringToQuark(lowerName); if (q == XrmQEmonochrome) done(XtPalette, XtPaletteMonochrome); if (q == XrmQEgrayscale) done(XtPalette, XtPaletteGrayscale); if (q == XrmQEcolor) done(XtPalette, XtPaletteColor); XtDisplayStringConversionWarning(dpy, str, XtRPalette); return False; } gv-3.7.4/src/gv_font_res.dat0000664000076400007640000000744611735103745012711 00000000000000 !########## gv_font_res_linux.dat !##### Fonts GV*font: -*-Helvetica-Medium-R-Normal--*-140-*-*-P-*-ISO8859-1 GV*SmeBSB.font: -*-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*Button.font: -*-Helvetica-Medium-R-Normal--*-140-*-*-P-*-ISO8859-1 GV.?.processButton.font: -*-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1 GV.?.Label*font: -*-Helvetica-Medium-R-Normal--*-100-*-*-P-*-ISO8859-1 GV.?.Button*font: -*-Helvetica-Medium-R-Normal--*-100-*-*-P-*-ISO8859-1 GV.?.locator*font: -*-Helvetica-Medium-R-Normal--*-100-*-*-P-*-ISO8859-1 GV.?.dateButton*font: -*-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1 GV.?.titleButton*font: -*-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*optiongvPopup*infoVerboseButton.font:-*-Helvetica-Medium-R-Normal--*-100-*-*-P-*-ISO8859-1 GV.?.infoVerboseButton*font: -*-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1 GV.?.prevPage*font: -*-Helvetica-Medium-R-Normal--*-140-*-*-P-*-ISO8859-1 GV.?.nextPage*font: -*-Helvetica-Medium-R-Normal--*-140-*-*-P-*-ISO8859-1 GV*newtoc.font: -*-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*fileSel*font: -*-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*fileSel*button1.font: -*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*fileSel*button2.font: -*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*fileSel*button3.font: -*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*fileSel*button4.font: -*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*fileSel*pathtext*font: -*-Helvetica-Medium-R-Normal--*-140-*-*-P-*-ISO8859-1 GV*optionsetupPopup*Label*font: -*-Helvetica-Medium-R-Normal--*-100-*-*-P-*-ISO8859-1 GV*optionsetupPopup*confirmButton.font:-*-Helvetica-Medium-R-Normal--*-100-*-*-P-*-ISO8859-1 GV*optionsetupPopup*Switch*font:-*-Helvetica-Medium-R-Normal--*-100-*-*-P-*-ISO8859-1 GV*optionsetupPopup*font: -*-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*optionsetupPopup*Button.font:-*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*optiongvPopup*Label*font: -*-Helvetica-Medium-R-Normal--*-100-*-*-P-*-ISO8859-1 GV*optiongvPopup*Switch*font: -*-Helvetica-Medium-R-Normal--*-100-*-*-P-*-ISO8859-1 GV*optiongvPopup*font: -*-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*optiongvPopup*Button.font: -*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*optionfsPopup*Label*font: -*-Helvetica-Medium-R-Normal--*-100-*-*-P-*-ISO8859-1 GV*optionfsPopup*Switch*font: -*-Helvetica-Medium-R-Normal--*-100-*-*-P-*-ISO8859-1 GV*optionfsPopup*font: -*-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*optionfsPopup*Button.font: -*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*optiongsPopup*Label*font: -*-Helvetica-Medium-R-Normal--*-100-*-*-P-*-ISO8859-1 GV*optiongsPopup*Switch*font: -*-Helvetica-Medium-R-Normal--*-100-*-*-P-*-ISO8859-1 GV*optiongsPopup*font: -*-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*optiongsPopup*Button.font: -*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*dialogPopup*font: -*-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*dialogPopup*Button.font: -*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*dialogPopup*message*font: -*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*notePopup*Button.font: -*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*notePopup*message*font: -*-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*confirmPopup*font: -*-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*confirmPopup*Button.font: -*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*versionPopup*Label*font: -*-Courier-Medium-R-Normal--*-100-*-*-M-*-ISO8859-1 GV*versionPopup*versionTexta*font:-*-Helvetica-Bold-R-Normal--*-180-*-*-P-*-ISO8859-1 GV*versionPopup*versionTextb*font:-*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*infoPopup*Text*font: -*-Courier-Medium-R-Normal--*-100-*-*-M-*-ISO8859-1 gv-3.7.4/src/ps.h0000664000076400007640000000705411735103746010473 00000000000000/* * ps.h -- Include file for PostScript routines. * Copyright (C) 1992 Timothy O. Theisen * Copyright (C) 2004 Jose E. Marchesi * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GNU gv; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Tim Theisen Systems Programmer * Internet: tim@cs.wisc.edu Department of Computer Sciences * UUCP: uwvax!tim University of Wisconsin-Madison * Phone: (608)262-0438 1210 West Dayton Street * FAX: (608)262-9777 Madison, WI 53706 */ /* Constants used to index into the bounding box array. */ #define LLX 0 #define LLY 1 #define URX 2 #define URY 3 /* Constants used to store keywords that are scanned. */ /* NONE is not a keyword, it tells when a field was not set */ /* enum {ATEND = -1, NONE = 0, PORTRAIT, LANDSCAPE, ASCEND, DESCEND, SPECIAL}; */ #define ATEND (-1) #define NONE 0 #define PORTRAIT 1 #define LANDSCAPE 2 #define SEASCAPE 3 #define UPSIDEDOWN 4 #define ASCEND 5 #define DESCEND 6 #define SPECIAL 7 #define AUTOMATIC 8 #define PSLINELENGTH 257 /* 255 characters + 1 newline + 1 NULL */ typedef struct document { #ifdef GV_CODE int structured; /* toc will be useful */ int labels_useful; /* page labels are distinguishable, hence useful */ #endif int epsf; /* Encapsulated PostScript flag. */ char *title; /* Title of document. */ char *date; /* Creation date. */ int pageorder; /* ASCEND, DESCEND, SPECIAL */ gv_off_t beginheader, endheader, beginpreview, endpreview, begindefaults, enddefaults, beginprolog, endprolog, beginsetup, endsetup, begintrailer, endtrailer; gv_off_t lenheader; gv_off_t lenpreview; gv_off_t lendefaults; gv_off_t lenprolog; gv_off_t lensetup; gv_off_t lentrailer; int boundingbox[4]; int default_page_boundingbox[4]; int orientation; /* PORTRAIT, LANDSCAPE */ int default_page_orientation; /* PORTRAIT, LANDSCAPE */ int nummedia; struct documentmedia *media; Media default_page_media; int numpages; struct page *pages; } *Document; struct page { char *label; int boundingbox[4]; struct documentmedia *media; int orientation; /* PORTRAIT, LANDSCAPE */ gv_off_t begin, end; /* offsets into file */ gv_off_t len; }; /* scans a PostScript file and return a pointer to the document structure. Returns NULL if file does not Conform to commenting conventions . */ #define SCANSTYLE_NORMAL 0 #define SCANSTYLE_IGNORE_EOF (1<<0) #define SCANSTYLE_IGNORE_DSC (1<<1) Document psscan ( FILE **, char *, char *, char **, char *, char **, char *, int, /* scanstyle */ int /* gv_gs_scanDir */ ); void psfree ( struct document * ); extern void pscopydoc ( FILE *, char *, Document, char * ); gv-3.7.4/src/SwitchP.h0000664000076400007640000000373211735103745011430 00000000000000/* ** ** SwitchP.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _SwitchP_h_ #define _SwitchP_h_ #include "paths.h" #include "Switch.h" #include "ButtonP.h" typedef struct _SwitchClass { int makes_compiler_happy; /* not used */ } SwitchClassPart; typedef struct _MenuButtonClassRec { CoreClassPart core_class; SimpleClassPart simple_class; ThreeDClassPart threeD_class; LabelClassPart label_class; CommandClassPart command_class; ButtonClassPart button_class; SwitchClassPart switch_class; } SwitchClassRec; extern SwitchClassRec switchClassRec; typedef struct { int makes_compiler_happy; /* not used */ } SwitchPart; typedef struct _SwitchRec { CorePart core; SimplePart simple; ThreeDPart threeD; LabelPart label; CommandPart command; ButtonPart button; /* switch won't work :-) */ SwitchPart swidch; } SwitchRec; #endif /* _SwitchP_h_ */ gv-3.7.4/src/widgets_misc.h0000664000076400007640000000306611735103746012531 00000000000000/* ** ** widgets_misc.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_WIDGETS_MISC_H_ #define _GV_WIDGETS_MISC_H_ extern void widgets_setSelectedBitmap (Widget, int); extern void widgets_setToggle (Widget, int); extern Widget widgets_createLabeledLineTextField (String, Widget); extern Widget widgets_createLabeledTextField (String, Widget); extern char * widgets_getText (Widget); extern void widgets_setText (Widget, String); extern void widgets_preferButton (Widget /* w */, int /* prefer */); #endif /* _GV_WIDGETS_MISC_H_ */ gv-3.7.4/src/options_setup.c0000664000076400007640000003643611735103746012765 00000000000000/* ** ** options_setup.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** ** Changes submitted by Maurizio Loreti distributed on the public ** domain: ** ** - Code for handle bzip2 compressed files. */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include "config.h" #include #include #include #include "paths.h" #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_X11(Shell.h) #include INC_XAW(SmeBSB.h) #include "Aaa.h" #include "Button.h" #include "FileSel.h" #include "Ghostview.h" #include "Frame.h" #include "MButton.h" #include "Switch.h" #include "types.h" #include "callbacks.h" #include "widgets_misc.h" #include "magmenu.h" #include "main_resources.h" #include "main_globals.h" #include "media.h" #include "misc.h" #include "miscmenu.h" #include "note.h" #include "options.h" #include "options_gv.h" #include "options_setup.h" #include "scale.h" #include "ps.h" #include "doc_misc.h" #include "version.h" static Widget popup=NULL,optionControl; static Widget eyeGuideToggle,reverseScrollingToggle,confirmPrintToggle,autoCenterToggle; static Widget pixmapToggle,miscLabel; static Widget confirmLabel,confirmButton,confirmMenu; static Widget titleLabel,titleButton,titleMenu; static Widget print_command,scales,screenSize,medias,magmenu,miscmenu; String confirm_quit_styles[4] = { 0 }; String title_styles[4] = { 0 }; static void options_setup_setOptionsAtEntry(void); static void options_setup_create(void); extern void main_setResolutions(int); extern void main_createScaleMenu(void); /*------------------------------------------------------ OptionPopupStruct ------------------------------------------------------*/ OptionPopupStruct gv_options_setup_struct = { NULL, options_setup_create, options_setup_setOptionsAtEntry, False }; OptionPopup gv_options_setup = (OptionPopup) &gv_options_setup_struct; /*------------------------------------------------------ options_setup_setOptionsAtEntry ------------------------------------------------------*/ static void options_setup_setOptionsAtEntry(void) { String s; Arg args[2]; Cardinal n; char tmp[50]; BEGINMESSAGE(options_setup_setOptionsAtEntry) widgets_setToggle(confirmPrintToggle, (app_res.confirm_print ? 1 : 0)); widgets_setToggle(reverseScrollingToggle, (app_res.reverse_scrolling ? 1 : 0)); widgets_setToggle(eyeGuideToggle, (app_res.scrolling_eye_guide ? 1 : 0)); widgets_setToggle(pixmapToggle, (app_res.use_bpixmap ? 1 : 0)); widgets_setToggle(autoCenterToggle, (app_res.auto_center ? 1 : 0)); SMESSAGE(gv_print_command) widgets_setText(print_command, gv_print_command); SMESSAGE(gv_scales_res) s = options_squeezeMultiline(gv_scales_res); widgets_setText(scales,s); XtFree(s); SMESSAGE(gv_medias_res) s = options_squeezeMultiline(gv_medias_res); widgets_setText(medias,s); XtFree(s); SMESSAGE(gv_magmenu_entries_res) s = options_squeezeMultiline(gv_magmenu_entries_res); widgets_setText(magmenu,s); XtFree(s); SMESSAGE(gv_miscmenu_entries_res) s = options_squeezeMultiline(gv_miscmenu_entries_res); widgets_setText(miscmenu,s); XtFree(s); sprintf(tmp,"%d x %d",gv_screen_width,gv_screen_height); widgets_setText(screenSize,tmp); s=confirm_quit_styles[app_res.confirm_quit]; n=0; XtSetArg(args[n], XtNlabel, s); n++; XtSetValues(confirmButton, args, n); s=title_styles[app_res.title_style]; n=0; XtSetArg(args[n], XtNlabel, s); n++; XtSetValues(titleButton, args, n); ENDMESSAGE(options_setup_setOptionsAtEntry) } /*------------------------------------------------------ options_setup_cb_apply ------------------------------------------------------*/ static void options_setup_cb_apply(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { Arg args[5]; Cardinal n; Boolean b; int i,j; Boolean redisplay=False; Boolean reopen=False; char *l; BEGINMESSAGE(options_setup_cb_apply) app_res.confirm_print = SwitchIsSet(confirmPrintToggle) ? True : False ; app_res.reverse_scrolling = SwitchIsSet(reverseScrollingToggle) ? True : False ; app_res.scrolling_eye_guide = SwitchIsSet(eyeGuideToggle) ? True : False ; app_res.auto_center = SwitchIsSet(autoCenterToggle) ? True : False ; b = app_res.use_bpixmap; app_res.use_bpixmap = SwitchIsSet(pixmapToggle) ? True : False; cb_useBackingPixmap(NULL,(XtPointer)2,NULL); if (b != app_res.use_bpixmap) reopen=True; n=0; XtSetArg(args[n], XtNlabel, &l); n++; XtGetValues(titleButton, args, n); i=0;j=0; while (i<3) { if (!strcmp(title_styles[i],l)) j = i; ++i; } if (j != app_res.title_style) { app_res.title_style = j; cb_showTitle(NULL,NULL,NULL); } options_textApply(print_command,NULL,&gv_print_command); options_textApply(magmenu,NULL,&gv_magmenu_entries_res); magmenu_freeMagMenuEntries(gv_magmenu_entries); gv_magmenu_entries = magmenu_parseMagMenuEntries(gv_magmenu_entries_res); options_textApply(miscmenu,NULL,&gv_miscmenu_entries_res); miscmenu_freeMiscMenuEntries(gv_miscmenu_entries); gv_miscmenu_entries = miscmenu_parseMiscMenuEntries(gv_miscmenu_entries_res); l = widgets_getText(screenSize); i=j=0; sscanf(l," %d x %d ",&i,&j); if (i>0 && j>0 && (i != gv_screen_width || j != gv_screen_height)) { gv_screen_width = i; gv_screen_height = j; main_setResolutions(0); default_xdpi=default_ydpi=0.0; redisplay=True; } n=0; XtSetArg(args[n], XtNlabel, &l); n++; XtGetValues(confirmButton, args, n); i=0; while (i<3) { if (!strcmp(confirm_quit_styles[i],l)) app_res.confirm_quit = i; ++i; } { char *s,*sr; l = widgets_getText(scales); sr = options_squeezeMultiline(gv_scales_res); s = options_squeezeMultiline(l); if (strcmp(s,sr)) { XtFree(sr); XtFree(gv_scales_res); gv_scales_res=s; scale_freeScales(gv_scales); gv_scales = scale_parseScales(gv_scales_res); XtDestroyWidget(scaleMenu); XtFree((XtPointer)scaleEntry); main_createScaleMenu(); gv_scale = scale_checkScaleNum(gv_scales,app_res.scale|SCALE_REL); if (gv_scale < 0) gv_scale = scale_checkScaleNum(gv_scales,0|SCALE_REL); gv_scale &= SCALE_VAL; gv_scale_base = scale_checkScaleNum(gv_scales,(app_res.scale_base-1)|SCALE_BAS); if (gv_scale_base < 0) gv_scale_base = 0; gv_scale_base &= SCALE_VAL; gv_scale_base_current = gv_scale_base; gv_scale_current = gv_scale; options_gv_createScaleMenus(); gv_scale_current = gv_scale_base_current = -1; redisplay=True; } else { XtFree(s); XtFree(sr); } } { char *s,*sr; l = widgets_getText(medias); sr = options_squeezeMultiline(gv_medias_res); s = options_squeezeMultiline(l); if (strcmp(s,sr)) { XtFree(sr); XtFree(gv_medias_res); gv_medias_res=s; media_freeMedias(gv_medias); gv_medias = media_parseMedias(gv_medias_res); gv_num_std_pagemedia = media_numMedias(gv_medias); if (pagemediaMenu) { XtDestroyWidget(pagemediaMenu); pagemediaMenu=NULL; } gv_fallback_pagemedia = doc_convStringToPageMedia(NULL,app_res.fallback_pagemedia); if (gv_fallback_pagemedia == MEDIA_ID_INVALID) gv_fallback_pagemedia = doc_convStringToPageMedia(NULL,"A4"); if (gv_fallback_pagemedia == MEDIA_ID_INVALID) { gv_fallback_pagemedia=1; while (!gv_medias[gv_fallback_pagemedia]->used) gv_fallback_pagemedia++; } gv_pagemedia = gv_pagemedia_old = MEDIA_ID_INVALID; gv_pagemedia_auto_old = -1; misc_buildPagemediaMenu(); options_gv_createMediaMenus(); redisplay=True; } else { XtFree(s); XtFree(sr); } } n=0; XtSetArg(args[n], XtNreverseScrolling,app_res.reverse_scrolling);n++; XtSetValues(FileSel, args, n); if (reopen && gv_filename) { cb_stopInterpreter(page,NULL,NULL); show_page(REQUEST_REOPEN,NULL); } else if (redisplay) show_page(REQUEST_OPTION_CHANGE,NULL); ENDMESSAGE(options_setup_cb_apply) } /*------------------------------------------------------ options_setup_cb_save ------------------------------------------------------*/ static void options_setup_cb_save(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { int argn = 0; String argi[30]; String argv[30]; char tmp[20]; Arg args[1]; Cardinal n; int i; String l,t = "True",f = "False"; BEGINMESSAGE(options_setup_cb_save) options_setArg(&(argi[argn]),&(argv[argn]),s_version ,gv_class ,versionResource); ++argn; options_setArg(&(argi[argn]),&(argv[argn]),s_miscMenuEntries ,gv_class ,widgets_getText(miscmenu)); ++argn; options_setArg(&(argi[argn]),&(argv[argn]),s_magMenu ,gv_class ,widgets_getText(magmenu)); ++argn; options_setArg(&(argi[argn]),&(argv[argn]),s_medias ,gv_class ,widgets_getText(medias)); ++argn; options_setArg(&(argi[argn]),&(argv[argn]),s_scales ,gv_class ,widgets_getText(scales)); ++argn; options_setArg(&(argi[argn]),&(argv[argn]),s_printCommand ,gv_class,widgets_getText(print_command)); ++argn; options_setArg(&(argi[argn]),&(argv[argn]),s_confirmPrint ,gv_class ,SwitchIsSet(confirmPrintToggle) ? t : f); ++argn; options_setArg(&(argi[argn]),&(argv[argn]),s_reverseScrolling ,gv_class ,SwitchIsSet(reverseScrollingToggle) ? t : f); ++argn; options_setArg(&(argi[argn]),&(argv[argn]),s_scrollingEyeGuide ,gv_class ,SwitchIsSet(eyeGuideToggle) ? t : f); ++argn; options_setArg(&(argi[argn]),&(argv[argn]),s_autoCenter ,gv_class ,SwitchIsSet(autoCenterToggle) ? t : f); ++argn; options_setArg(&(argi[argn]),&(argv[argn]),s_useBackingPixmap ,gv_class ,SwitchIsSet(pixmapToggle) ? t : f); ++argn; n=0; XtSetArg(args[n], XtNlabel, &l); n++; XtGetValues(titleButton, args, n); i=0; while (i<3) { if (!strcmp(title_styles[i],l)) sprintf(tmp,"%d",i); ++i; } options_setArg(&(argi[argn]),&(argv[argn]),s_titleStyle ,gv_class ,tmp); ++argn; n=0; XtSetArg(args[n], XtNlabel, &l); n++; XtGetValues(confirmButton, args, n); i=0; while (i<3) { if (!strcmp(confirm_quit_styles[i],l)) sprintf(tmp,"%d",i); ++i; } options_setArg(&(argi[argn]),&(argv[argn]),s_confirmQuit ,gv_class ,tmp); ++argn; { char name[255]; char val[255]; scale_getScreenResourceName(gv_display,val); sprintf(name,"%s",val); options_setArg(&(argi[argn]),&(argv[argn]),name ,gv_class ,widgets_getText(screenSize)); ++argn; } options_save(argn,argi,argv); while (--argn >=0) { XtFree(argi[argn]); XtFree(argv[argn]); } ENDMESSAGE(options_setup_cb_save) } /*------------------------------------------------------ options_setup_create ------------------------------------------------------*/ void options_setup_create(void) { Arg args[10]; Cardinal n; Widget w; int i; BEGINMESSAGE(options_setup_create) if (popup) { INFMESSAGE(popup exists) ENDMESSAGE(options_setup_create) return; } n=0; XtSetArg(args[n], XtNallowShellResize, True); n++; popup = XtCreatePopupShell("optionsetupPopup",transientShellWidgetClass,toplevel, args, n); gv_options_setup->popup=popup; n=0; optionControl = XtCreateManagedWidget("optionControl",aaaWidgetClass,popup,args,n); miscLabel = XtCreateManagedWidget("misc",labelWidgetClass,optionControl,NULL,(Cardinal)0); confirmPrintToggle = XtCreateManagedWidget("confirmPrint",switchWidgetClass,optionControl,NULL,(Cardinal)0); reverseScrollingToggle = XtCreateManagedWidget("scrolling",switchWidgetClass,optionControl,NULL,(Cardinal)0); eyeGuideToggle = XtCreateManagedWidget("eyeGuide",switchWidgetClass,optionControl,NULL,(Cardinal)0); autoCenterToggle = XtCreateManagedWidget("autoCenter",switchWidgetClass,optionControl,NULL,(Cardinal)0); pixmapToggle = XtCreateManagedWidget("pixmap",switchWidgetClass,optionControl,NULL,(Cardinal)0); options_createLabeledMenu("title",optionControl,&titleLabel,&titleButton,&titleMenu); for (i = 0; title_styles[i]; i++) { w = XtCreateManagedWidget(title_styles[i],smeBSBObjectClass, titleMenu,NULL,(Cardinal)0); XtAddCallback(w, XtNcallback,options_cb_changeMenuLabel,NULL); } options_createLabeledMenu("confirm",optionControl,&confirmLabel,&confirmButton,&confirmMenu); for (i = 0; confirm_quit_styles[i]; i++) { w = XtCreateManagedWidget(confirm_quit_styles[i],smeBSBObjectClass, confirmMenu,NULL,(Cardinal)0); XtAddCallback(w, XtNcallback,options_cb_changeMenuLabel,NULL); } n=0; w = XtCreateManagedWidget("apply", buttonWidgetClass,optionControl, args, n); XtAddCallback(w, XtNcallback, options_setup_cb_apply,NULL); XtInstallAccelerators(optionControl, w); w = XtCreateManagedWidget("save", buttonWidgetClass,optionControl, args, n); XtAddCallback(w, XtNcallback, options_setup_cb_save,NULL); XtInstallAccelerators(optionControl, w); w = XtCreateManagedWidget("dismiss", buttonWidgetClass,optionControl, args, n); XtAddCallback(w, XtNcallback, options_cb_popdown,(XtPointer)gv_options_setup); XtInstallAccelerators(optionControl, w); miscmenu = widgets_createLabeledTextField("miscmenu", optionControl); magmenu = widgets_createLabeledTextField("magmenu", optionControl); medias = widgets_createLabeledTextField("medias", optionControl); print_command = widgets_createLabeledLineTextField("printCommand", optionControl); scales = widgets_createLabeledTextField("scales", optionControl); screenSize = widgets_createLabeledLineTextField("screenSize", optionControl); options_setup_setOptionsAtEntry(); options_realize(popup,optionControl); ENDMESSAGE(options_setup_create) } gv-3.7.4/src/info.c0000664000076400007640000002332711735103745010777 00000000000000/* ** ** info.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include "config.h" #ifdef HAVE_XAW3D_INTERNATIONAL #include "VlistP.h" #endif #include #include #include "paths.h" #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_XAW(Form.h) #include INC_XAW(AsciiText.h) #include INC_X11(Shell.h) #include "Button.h" /*### Application dependencies ##############################################*/ #define INFO_TOPLEVEL toplevel #define INFO_APPLIC_CONTEXT app_con #define INFO_POPUP infopopup #define INFO_POPUP_NAME "infoPopup" #include "types.h" #include "popup.h" #include "info.h" #include "main_resources.h" #include "main_globals.h" /*### Global Variables ######################################################*/ static Widget infoform; static Widget infodismiss; static Widget infotext; static Bool infoPopupCreated = False; static Bool infoPopupVisible = False; static int info_length; static int FontSetWidth( XFontSet fnt ) { XRectangle ink_array_return, logical_array_return; XRectangle overall_ink_return, overall_logical_return; int num_chars_return; XmbTextPerCharExtents( fnt, "A", 1, &ink_array_return, &logical_array_return, 1, &num_chars_return, &overall_ink_return, &overall_logical_return ); return( overall_logical_return.width ); } #define FontSetHeight(fnt) (XExtentsOfFontSet(fnt)->max_logical_extent.height) /*############################################################################### cb_popupInfoPopup ###############################################################################*/ void cb_popupInfoPopup(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { BEGINMESSAGE(cb_popupInfoPopup) if (!infoPopupCreated) { makeInfoPopup(); } if (infoPopupVisible==True) {INFMESSAGE(InfoPopup already up) ENDMESSAGE(popupInfoPopup) return; } /* Strange, the whole application gets stuck if we do the following. Precisely, the XtSetArg of rootX,rootY in positionPopup never comes back .... positionPopup(infopopup,2,INFO_TOPLEVEL,50,50, 1,1); */ XtPopup(infopopup, XtGrabNone); infoPopupVisible=True; ENDMESSAGE(cb_popupInfoPopup) } /*############################################################################### cb_popdownInfoPopup ###############################################################################*/ void cb_popdownInfoPopup(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { BEGINMESSAGE(cb_popdownInfoPopup) if (infoPopupCreated && infoPopupVisible) { XtPopdown(infopopup); infoPopupVisible = False; } ENDMESSAGE(cb_popdownInfoPopup) } /*############################################################################### cb_appendInfoPopup ###############################################################################*/ void cb_appendInfoPopup(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data) { Arg args[5]; Cardinal n; XawTextBlock message_block; int skipErrors; BEGINMESSAGE(cb_appendInfoPopup) SMESSAGE((char*)call_data) if (!infoPopupCreated) { makeInfoPopup(); } message_block.firstPos = 0; message_block.length = strlen(call_data); message_block.ptr = call_data; message_block.format = FMT8BIT; XawTextDisableRedisplay(infotext); n=0; XtSetArg(args[n], XtNeditType, XawtextAppend); n++; XtSetValues(infotext,args,n); XawTextReplace(infotext, info_length, info_length, &message_block); n=0; XtSetArg(args[0], XtNeditType, XawtextRead); n++; XtSetArg(args[1], XtNinsertPosition, info_length); n++; XtSetValues(infotext,args,n); XawTextEnableRedisplay(infotext); info_length = info_length + message_block.length; skipErrors = gv_infoSkipErrors; if (gv_infoSkipErrors) if (strstr((char*)call_data, "Error:") || strstr((char*)call_data, "ERROR:") || strstr((char*)call_data, "error:")) --gv_infoSkipErrors; if (!infoPopupVisible && gv_infoVerbose && !skipErrors) if (gv_infoVerbose == 2 || strstr((char*)call_data, "Error:") || strstr((char*)call_data, "ERROR:") || strstr((char*)call_data, "error:")) cb_popupInfoPopup((Widget)NULL,(XtPointer)NULL,(XtPointer)NULL); ENDMESSAGE(cb_appendInfoPopup) } /*############################################################################### cb_resetInfoPopup ###############################################################################*/ void cb_resetInfoPopup(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { Arg args[5]; Cardinal n; XawTextBlock message_block; BEGINMESSAGE(resetInfoPopup) if ((!infoPopupCreated) || (info_length == 0)) { INFMESSAGE(nothing to do) ENDMESSAGE(resetInfoPopup) return; } n=0; XtSetArg(args[n], XtNeditType, XawtextEdit); n++; XtSetArg(args[n], XtNinsertPosition,1); n++; XtSetValues(infotext, args,n); message_block.length = 0; XawTextReplace(infotext, 0, info_length, &message_block); info_length = 0; n=0; XtSetArg(args[0], XtNeditType, XawtextRead); n++; XtSetValues(infotext,args,n); ENDMESSAGE(resetInfoPopup) } /*############################################################################### makeInfoPopup ###############################################################################*/ void makeInfoPopup(void) { Arg args[12]; Cardinal n; Dimension bottomMargin, leftMargin, rightMargin, topMargin; Dimension width, height; #ifdef HAVE_XAW3D_INTERNATIONAL XFontSet fontset; #endif XFontStruct *font; #ifdef HAVE_XAW3D_INTERNATIONAL VlistWidget vw; #endif BEGINMESSAGE(makeInfoPopup) n=0; INFO_POPUP = XtCreatePopupShell(INFO_POPUP_NAME,topLevelShellWidgetClass,INFO_TOPLEVEL,args,n); infoform = XtCreateManagedWidget("form", formWidgetClass,INFO_POPUP,args,n); n=0; XtSetArg(args[n], XtNfromVert,NULL); n++; XtSetArg(args[n], XtNfromHoriz,NULL); n++; XtSetArg(args[n], XtNtop, XtChainTop); n++; XtSetArg(args[n], XtNbottom, XtChainBottom); n++; XtSetArg(args[n], XtNleft, XtChainLeft); n++; XtSetArg(args[n], XtNright, XtChainRight); n++; XtSetArg(args[n], XtNscrollHorizontal, XawtextScrollWhenNeeded); n++; XtSetArg(args[n], XtNscrollVertical, XawtextScrollWhenNeeded); n++; XtSetArg(args[n], XtNdisplayCaret, False); n++; infotext = XtCreateManagedWidget("text", asciiTextWidgetClass,infoform,args,n); n=0; XtSetArg(args[n], XtNfromVert, infotext); n++; XtSetArg(args[n], XtNfromHoriz,NULL); n++; XtSetArg(args[n], XtNtop, XtChainBottom); n++; XtSetArg(args[n], XtNbottom, XtChainBottom); n++; XtSetArg(args[n], XtNleft, XtChainLeft); n++; XtSetArg(args[n], XtNright, XtChainRight); n++; infodismiss = XtCreateManagedWidget("dismiss", buttonWidgetClass,infoform,args,n); #ifdef HAVE_XAW3D_INTERNATIONAL vw = (VlistWidget)infodismiss; #endif XtAddCallback(infodismiss, XtNcallback, cb_popdownInfoPopup,NULL); XtInstallAccelerators(infoform, infodismiss); XtInstallAccelerators(infotext, infodismiss); n=0; #ifdef HAVE_XAW3D_INTERNATIONAL if( vw->simple.international == True ) { XtSetArg(args[n], XtNfontSet, &fontset); n++; } else { #endif XtSetArg(args[n], XtNfont, &font); n++; #ifdef HAVE_XAW3D_INTERNATIONAL } #endif XtSetArg(args[n], XtNbottomMargin, &bottomMargin); n++; XtSetArg(args[n], XtNleftMargin, &leftMargin); n++; XtSetArg(args[n], XtNrightMargin, &rightMargin); n++; XtSetArg(args[n], XtNtopMargin, &topMargin); n++; XtGetValues(infotext,args,n); #ifdef HAVE_XAW3D_INTERNATIONAL if( vw->simple.international == True ) { width = FontSetWidth(fontset) * 80 + leftMargin + rightMargin; height = FontSetHeight(fontset) * 22 + topMargin + bottomMargin; } else { #endif width = font->max_bounds.width * 80 + leftMargin + rightMargin; height = (font->ascent + font->descent) * 22 + topMargin + bottomMargin; #ifdef HAVE_XAW3D_INTERNATIONAL } #endif n=0; XtSetArg(args[0], XtNwidth, width); n++; XtSetValues(infodismiss, args,n); XtSetArg(args[1], XtNheight, height); n++; XtSetValues(infotext,args,n); XtRealizeWidget(INFO_POPUP); info_length=0; XSetWMProtocols(XtDisplay(INFO_POPUP),XtWindow(INFO_POPUP),&wm_delete_window,1); infoPopupCreated=True; infoPopupVisible=False; ENDMESSAGE(makeInfoPopup) } gv-3.7.4/src/gv_selected.xbm0000664000076400007640000000040211437764362012670 00000000000000#define DOT_width 11 #define DOT_height 11 #define DOT_x_hot 0 #define DOT_y_hot 0 static unsigned char DOT_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xf8, 0x00, 0xf8, 0x00, 0xf8, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; gv-3.7.4/src/main_resources.h0000664000076400007640000002447111735103745013070 00000000000000/* ** ** main_resources.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_MAIN_RESOURCES_H_ #define _GV_MAIN_RESOURCES_H_ /* Application resources */ typedef struct _AppResources { Boolean auto_center; /* whether to automatically center the page */ int scale; /* default scale */ int scale_base; /* default scale base */ String default_orientation; /* default orientation */ String fallback_orientation; /* fallback orientation */ String page; /* first page to show */ String default_pagemedia; /* default page media */ String fallback_pagemedia; /* fallback page media */ Boolean swap_landscape; /* Landscape comment maps to Seascape */ String scratch_dir; /* temporary directory */ String default_save_dir; /* default directory for saving */ Boolean confirm_print; /* popup dialog on print attempt */ String version; /* ghostview version identifier*/ String maximum_width; /* maximum width of the application*/ String maximum_height; /* maximum height of the application*/ int minimum_width; /* minimum width of the application*/ int minimum_height; /* minimum height of the application*/ Boolean auto_resize; /* should we try to fit the window size to the page size */ Pixmap document_bitmap; Pixmap selected_bitmap; Pixmap mark_odd_bitmap; Pixmap mark_even_bitmap; Pixmap mark_current_bitmap; Pixmap mark_unmark_bitmap; Pixmap mark_empty_bitmap; String locator_format; Boolean antialias; String mag_menu; Boolean reverse_scrolling; Boolean scrolling_eye_guide; Boolean respect_dsc; int confirm_quit; Boolean ignore_eof; Boolean watch_file; int watch_file_frequency; String style; String ad; String misc_menu; int title_style; Boolean filename_as_title; Boolean use_bpixmap; } AppResources; #ifdef _GV_MAIN_C_ # define DECLARE_STRING(aaa) \ static char n_ ## aaa[] = #aaa; \ char * s_ ## aaa = n_ ## aaa; #else # define DECLARE_STRING(aaa) \ extern char * s_ ## aaa; #endif DECLARE_STRING(miscMenuEntries) DECLARE_STRING(medias) DECLARE_STRING(scales) DECLARE_STRING(printCommand) DECLARE_STRING(uncompressCommand) DECLARE_STRING(gsInterpreter) DECLARE_STRING(gsCmdScanPDF) DECLARE_STRING(gsCmdConvPDF) DECLARE_STRING(gsX11Device) DECLARE_STRING(gsX11AlphaDevice) DECLARE_STRING(gsArguments) DECLARE_STRING(gsSafeDir) DECLARE_STRING(gsSafer) DECLARE_STRING(gsQuiet) DECLARE_STRING(infoVerbose) DECLARE_STRING(autoCenter) DECLARE_STRING(scale) DECLARE_STRING(scaleBase) DECLARE_STRING(orientation) DECLARE_STRING(fallbackOrientation) DECLARE_STRING(page) DECLARE_STRING(pageMedia) DECLARE_STRING(fallbackPageMedia) DECLARE_STRING(swapLandscape) DECLARE_STRING(scratchDir) DECLARE_STRING(defaultSaveDir) DECLARE_STRING(confirmPrint) DECLARE_STRING(version) DECLARE_STRING(autoResize) DECLARE_STRING(maximumWidth) DECLARE_STRING(maximumHeight) DECLARE_STRING(minimumWidth) DECLARE_STRING(minimumHeight) DECLARE_STRING(selectedBitmap) DECLARE_STRING(documentBitmap) DECLARE_STRING(toggleOddBitmap) DECLARE_STRING(toggleEvenBitmap) DECLARE_STRING(toggleCurrentBitmap) DECLARE_STRING(unmarkAllBitmap) DECLARE_STRING(markEmptyBitmap) DECLARE_STRING(locatorFormat) DECLARE_STRING(antialias) DECLARE_STRING(magMenu) DECLARE_STRING(reverseScrolling) DECLARE_STRING(scrollingEyeGuide) DECLARE_STRING(respectDSC) DECLARE_STRING(confirmQuit) DECLARE_STRING(ignoreEOF) DECLARE_STRING(watchFile) DECLARE_STRING(watchFileFrequency) DECLARE_STRING(style) DECLARE_STRING(ad) DECLARE_STRING(miscMenu) DECLARE_STRING(titleStyle) DECLARE_STRING(useBackingPixmap) /*-------------------------------------------------------------*/ #ifdef _GV_MAIN_C_ #define GV_DEFAULT_VERSION "?" static XtResource resources[] = { {n_autoCenter,n_autoCenter, XtRBoolean, sizeof(Boolean), XtOffsetOf(AppResources, auto_center), XtRImmediate, (XtPointer)True}, {n_scale, n_scale, XtRInt, sizeof(int), XtOffsetOf(AppResources, scale), XtRImmediate, (XtPointer)0}, {n_scaleBase, n_scaleBase, XtRInt, sizeof(int), XtOffsetOf(AppResources, scale_base), XtRImmediate, (XtPointer)1}, {n_orientation, n_orientation, XtRString, sizeof(String), XtOffsetOf(AppResources, default_orientation), XtRImmediate, "Automatic"}, {n_fallbackOrientation, n_fallbackOrientation, XtRString, sizeof(String), XtOffsetOf(AppResources, fallback_orientation), XtRImmediate, "Portrait"}, {n_page, n_page, XtRString, sizeof(String), XtOffsetOf(AppResources, page), XtRImmediate, NULL}, {n_pageMedia, n_pageMedia, XtRString, sizeof(String), XtOffsetOf(AppResources, default_pagemedia), XtRImmediate, "Automatic"}, {n_fallbackPageMedia, n_fallbackPageMedia, XtRString, sizeof(String), XtOffsetOf(AppResources, fallback_pagemedia), XtRImmediate, "A4"}, {n_swapLandscape, n_swapLandscape, XtRBoolean, sizeof(Boolean), XtOffsetOf(AppResources, swap_landscape), XtRImmediate, (XtPointer)False}, {n_scratchDir, n_scratchDir, XtRString, sizeof(String), XtOffsetOf(AppResources, scratch_dir), XtRImmediate,"?"}, {n_defaultSaveDir, n_defaultSaveDir, XtRString, sizeof(String), XtOffsetOf(AppResources, default_save_dir), XtRImmediate,"?"}, {n_confirmPrint, n_confirmPrint, XtRBoolean, sizeof(Boolean), XtOffsetOf(AppResources, confirm_print), XtRImmediate, (XtPointer)True}, {n_version, n_version, XtRString, sizeof(String), XtOffsetOf(AppResources, version), XtRImmediate,GV_DEFAULT_VERSION}, {n_autoResize, n_autoResize, XtRBoolean, sizeof(Boolean), XtOffsetOf(AppResources, auto_resize), XtRImmediate, (XtPointer)True}, {n_maximumWidth, n_maximumWidth, XtRString, sizeof(String), XtOffsetOf(AppResources, maximum_width), XtRImmediate, (XtPointer)"screen-20"}, {n_maximumHeight, n_maximumHeight, XtRString, sizeof(String), XtOffsetOf(AppResources, maximum_height), XtRImmediate, (XtPointer)"screen-44"}, {n_minimumWidth, n_minimumWidth, XtRInt, sizeof(int), XtOffsetOf(AppResources, minimum_width), XtRImmediate, (XtPointer)400}, {n_minimumHeight, n_minimumHeight, XtRInt, sizeof(int), XtOffsetOf(AppResources, minimum_height), XtRImmediate, (XtPointer)400}, {n_selectedBitmap, n_selectedBitmap, XtRBitmap, sizeof(Pixmap), XtOffsetOf(AppResources,selected_bitmap), XtRImmediate, (XtPointer)None}, {n_documentBitmap, n_documentBitmap, XtRBitmap, sizeof(Pixmap), XtOffsetOf(AppResources,document_bitmap), XtRImmediate, (XtPointer)None}, {n_toggleOddBitmap, n_toggleOddBitmap, XtRBitmap, sizeof(Pixmap), XtOffsetOf(AppResources,mark_odd_bitmap), XtRImmediate, (XtPointer)None}, {n_toggleEvenBitmap, n_toggleEvenBitmap, XtRBitmap, sizeof(Pixmap), XtOffsetOf(AppResources,mark_even_bitmap), XtRImmediate, (XtPointer)None}, {n_toggleCurrentBitmap, n_toggleCurrentBitmap, XtRBitmap, sizeof(Pixmap), XtOffsetOf(AppResources,mark_current_bitmap), XtRImmediate, (XtPointer)None}, {n_unmarkAllBitmap, n_unmarkAllBitmap, XtRBitmap, sizeof(Pixmap), XtOffsetOf(AppResources,mark_unmark_bitmap), XtRImmediate, (XtPointer)None}, {n_markEmptyBitmap, n_markEmptyBitmap, XtRBitmap, sizeof(Pixmap), XtOffsetOf(AppResources,mark_empty_bitmap), XtRImmediate, (XtPointer)None}, {n_locatorFormat, n_locatorFormat, XtRString, sizeof(String), XtOffsetOf(AppResources,locator_format), XtRImmediate, (XtPointer)"%d x %d"}, {n_antialias, n_antialias, XtRBoolean, sizeof(Boolean), XtOffsetOf(AppResources, antialias), XtRImmediate, (XtPointer)False}, {n_magMenu, n_magMenu, XtRString, sizeof(String), XtOffsetOf(AppResources,mag_menu), XtRImmediate, (XtPointer)NULL}, {n_reverseScrolling, n_reverseScrolling, XtRBoolean, sizeof(Boolean), XtOffsetOf(AppResources, reverse_scrolling), XtRImmediate, (XtPointer)False}, {n_scrollingEyeGuide, n_scrollingEyeGuide, XtRBoolean, sizeof(Boolean), XtOffsetOf(AppResources, scrolling_eye_guide), XtRImmediate, (XtPointer)True}, {n_respectDSC, n_respectDSC, XtRBoolean, sizeof(Boolean), XtOffsetOf(AppResources, respect_dsc), XtRImmediate, (XtPointer)True}, {n_confirmQuit, n_confirmQuit, XtRInt, sizeof(int), XtOffsetOf(AppResources, confirm_quit), XtRImmediate, (XtPointer)1}, /* 0=never,1=when processing,2=always */ {n_ignoreEOF, n_ignoreEOF, XtRBoolean, sizeof(Boolean), XtOffsetOf(AppResources, ignore_eof), XtRImmediate, (XtPointer)True}, {n_watchFile, n_watchFile, XtRBoolean, sizeof(Boolean), XtOffsetOf(AppResources, watch_file), XtRImmediate, (XtPointer)False}, {n_watchFileFrequency, n_watchFileFrequency, XtRInt, sizeof(int), XtOffsetOf(AppResources, watch_file_frequency), XtRImmediate, (XtPointer)1000}, {n_style, n_style, XtRString, sizeof(String), XtOffsetOf(AppResources, style), XtRImmediate,(XtPointer)""}, {n_ad, n_ad, XtRString, sizeof(String), XtOffsetOf(AppResources, ad), XtRImmediate,(XtPointer)""}, {n_miscMenu, n_miscMenu, XtRString, sizeof(String), XtOffsetOf(AppResources, misc_menu), XtRImmediate,"update"}, {n_titleStyle, n_titleStyle, XtRInt, sizeof(int), XtOffsetOf(AppResources, title_style), XtRImmediate, (XtPointer)1}, {n_useBackingPixmap,n_useBackingPixmap, XtRBoolean, sizeof(Boolean), XtOffsetOf(AppResources, use_bpixmap), XtRImmediate, (XtPointer)True}, }; #endif /* _GV_MAIN_C_ */ /*-------------------------------------------------------------*/ /*-------------------------------------------------------------*/ #endif /* _GV_MAIN_RESOURCES_H_ */ gv-3.7.4/src/gv_signal.c0000664000076400007640000001326011735103745012010 00000000000000/* ** ** gv_signal.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" /* #define MESSAGES */ #include #include "message.h" #include #include #include #include #include #include "paths.h" #include INC_X11(Intrinsic.h) #ifdef USE_SIGNAL_HANDLER # if (XtSpecificationRelease >= 6) # define USE_XT_SIGNAL_HANDLER # else # define USE_DUMMY_SIGNAL_HANDLER # endif #else # define USE_DUMMY_SIGNAL_HANDLER #endif #include "types.h" #include "callbacks.h" #include "main_resources.h" #include "main_globals.h" #include "gv_signal.h" #include "actions.h" #ifdef SIGNALRETURNSINT # define SIGVAL int # define SIGNAL_RETURN return(0); #else # define SIGVAL void # define SIGNAL_RETURN #endif #ifdef USE_XT_SIGNAL_HANDLER static XtSignalId sid_updateFile = 0; static XtSignalId sid_terminate = 0; static int block_terminate = 0; static int block_updateFile = 0; static pid_t gv_pid = (pid_t) 0; /*------------------------------------------------------------*/ /* signal_signalIsOk */ /*------------------------------------------------------------*/ static int signal_signalIsOk(void) { BEGINMESSAGE(signal_signalIsOk) # ifdef MESSAGES IIMESSAGE(gv_pid,getpid()) if (gv_pid == getpid()) { INFMESSAGE(signal is ok) } else { INFMESSAGE(bogus signal) } # endif ENDMESSAGE(signal_signalIsOk) return(gv_pid == getpid() ? 1 : 0); } /*------------------------------------------------------------*/ /* signal_scb_terminate */ /*------------------------------------------------------------*/ static void signal_scb_terminate(XtPointer client_data _GL_UNUSED, XtSignalId *sidP _GL_UNUSED) { BEGINMESSAGE(signal_scb_terminate) cb_doQuit(NULL,NULL,NULL); ENDMESSAGE(signal_scb_terminate) } /*------------------------------------------------------------*/ /* signal_sh_terminate */ /*------------------------------------------------------------*/ static SIGVAL signal_sh_terminate(int sig) { BEGINMESSAGE(signal_fatalSignalHandler) if (signal_signalIsOk()) { if (!block_terminate) { fprintf(stderr, "gv: terminated by signal %d\n", sig); XtNoticeSignal(sid_terminate); block_terminate = 1; } signal(sig,signal_sh_terminate); } else { INFMESSAGE(forcing bogus caller to die) clean_safe_tempdir(); exit(EXIT_STATUS_ERROR); } ENDMESSAGE(signal_sh_terminate) SIGNAL_RETURN } /*------------------------------------------------------------*/ /* signal_scb_updateFile */ /*------------------------------------------------------------*/ static void signal_scb_updateFile(XtPointer client_data _GL_UNUSED, XtSignalId *sidP _GL_UNUSED) { BEGINMESSAGE(signal_scb_updateFile) if (gv_filename) { String s; struct stat sbuf; s = XtNewString(gv_filename); if (!stat(s, &sbuf) && mtime != sbuf.st_mtime) cb_checkFile(NULL,(XtPointer)CHECK_FILE_VERSION,NULL); XtFree(s); } block_updateFile = 0; ENDMESSAGE(signal_scb_updateFile) } /*------------------------------------------------------------*/ /* signal_sh_updateFile */ /*------------------------------------------------------------*/ static SIGVAL signal_sh_updateFile(int sig) { BEGINMESSAGE(signal_sh_updateFile) if (signal_signalIsOk()) { if (!block_updateFile) { block_updateFile=1; XtNoticeSignal(sid_updateFile); } signal(sig,signal_sh_updateFile); } else { INFMESSAGE(forcing bogus caller to die) clean_safe_tempdir(); exit(EXIT_STATUS_ERROR); } ENDMESSAGE(signal_sh_updateFile) SIGNAL_RETURN } /*############################################################*/ /* signal_setSignalHandlers */ /*############################################################*/ void signal_setSignalHandlers(int on) { SIGVAL (*sht)(int),(*shu)(int); BEGINMESSAGE(signal_setSignalHandlers) if (!gv_pid) gv_pid = getpid(); if (on) { shu = signal_sh_updateFile; sht = signal_sh_terminate; sid_updateFile = XtAppAddSignal(app_con,signal_scb_updateFile,NULL); sid_terminate = XtAppAddSignal(app_con,signal_scb_terminate,NULL); } else { shu = sht = SIG_DFL; if (sid_updateFile) XtRemoveSignal(sid_updateFile); if (sid_terminate) XtRemoveSignal(sid_terminate); sid_updateFile = sid_terminate = 0; } signal(SIGHUP, shu); signal(SIGQUIT, sht); signal(SIGTERM, sht); #if 0 signal(SIGINT, sht); signal(SIGILL, sht); signal(SIGBUS, sht); signal(SIGFPE, sht); signal(SIGSEGV, sht); signal(SIGSYS, sht); #endif ENDMESSAGE(signal_setSignalHandlers) } #endif /* USE_XT_SIGNAL_HANDLER */ #ifdef USE_DUMMY_SIGNAL_HANDLER int signaldummy; #endif /* USE_DUMMY_SIGNAL_HANDLER */ gv-3.7.4/src/magmenu.c0000664000076400007640000002631511736064614011477 00000000000000/* ** ** magmenu.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include #include #include "paths.h" #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_XAW(SimpleMenu.h) #include INC_XAW(SmeBSB.h) #include INC_XAW(SmeLine.h) #include INC_XAW(Cardinals.h) #include INC_XAW(Scrollbar.h) #include "Ghostview.h" #include "types.h" #include "actions.h" #include "magmenu.h" #include "options.h" #include "main_resources.h" #include "main_globals.h" #include "zoom.h" /*################################################## magmenu_freeMagMenuEntries ##################################################*/ void magmenu_freeMagMenuEntries(entries) MagMenuEntry *entries; { int i=0; BEGINMESSAGE(magmenu_freeMagMenuEntries) while (entries[i]) { XtFree(entries[i]->name); XtFree((XtPointer)entries[i]); i++; } XtFree((XtPointer)entries); ENDMESSAGE(magmenu_freeMagMenuEntries) } /*################################################## magmenu_parseMagMenuEntries ##################################################*/ static MagMenuEntry magmenu_mallocMagMenuEntry(void) { MagMenuEntry entry; entry = (MagMenuEntry) XtMalloc(sizeof(MagMenuEntryStruct)); memset((void*)entry ,0,sizeof(MagMenuEntryStruct)); return entry; } MagMenuEntry *magmenu_parseMagMenuEntries(s) char *s; { char *c,*nl; MagMenuEntry *entries,*mentries,entry; int i,n,have_entry=0; float f; char name[100]; BEGINMESSAGE(magmenu_parseMagMenuEntries) if (!s) s = ""; s =options_squeezeMultiline(s); for (n=1,c=s; (c = strchr(c,'\n')); n++, c++); INFIMESSAGE(number of medias,n) mentries = entries = (MagMenuEntry*) XtMalloc((n+2)*sizeof(MagMenuEntry)); c=s; if (*s) while (n>0) { nl = strchr(c,'\n'); if (nl) *nl='\0'; name[0]='\0'; if (*c == '#' || *c == '!') i=0; else i=sscanf(c," %[^,] , %f ",name,&f); if (i==2 && f>0) { entry = magmenu_mallocMagMenuEntry(); entry->name = XtNewString(name); entry->scale= sqrt(f); have_entry = 1; INFSMESSAGE(found entry,entry->name) FMESSAGE(entry->scale) *entries++ = entry; } n--; if (!nl) break; c=++nl; } if (!have_entry) { entry = magmenu_mallocMagMenuEntry(); entry->name = XtNewString(" 2 "); entry->scale= sqrt(2.0); *entries++ = entry; } *entries = (MagMenuEntry) NULL; XtFree(s); ENDMESSAGE(magmenu_parseMagMenuEntries) return(mentries); } /*############################################################*/ /* magmenu_a_magMenu */ /*############################################################*/ typedef struct { Position locx1,locy1,locx2,locy2; Position oldx,oldy,oldwidth,oldheight; Widget menuwidget; } magMenu_data; #define MAG_INIT_0 (1<<0) #define MAG_INIT_1 (1<<1) #define MAG_INIT_2 (1<<2) #define MAG_BEGIN (1<<3) #define MAG_EXTEND (1<<4) #define MAG_CHOOSE (1<<5) #define MAG_SHOW (1<<6) #define MAG_RESET (1<<7) #define MAG_CHECK (1<<8) void magmenu_a_magMenu (w, event, params, num_params) Widget w; XEvent *event; String *params; Cardinal *num_params; { static magMenu_data *d = (magMenu_data *)NULL; static int mode=MAG_INIT_0; GhostviewReturnStruct ret_val; Bool popup_zoom = False; static Widget gvw = NULL; BEGINMESSAGE(magmenu_a_magMenu) if (!event) { INFMESSAGE(received reset request) if (d) { INFMESSAGE(resetting) if (d->menuwidget) XtDestroyWidget(d->menuwidget); XtFree((char*)d); d = (magMenu_data *)NULL; } mode = MAG_INIT_0; ENDMESSAGE(magmenu_a_magMenu) return; } if (*num_params < 1) { INFMESSAGE(no parameter) ENDMESSAGE(magmenu_a_magMenu) return; } # define MAG_HAVE(aaa,bbb) (!strcmp(params[0],(aaa)) && mode&(bbb)) if MAG_HAVE("begin" , MAG_INIT_0) mode = (MAG_BEGIN | MAG_INIT_1); else if MAG_HAVE("extend" , MAG_INIT_1) mode = (MAG_EXTEND | MAG_INIT_1); else if MAG_HAVE("choose" , MAG_INIT_1) mode = (MAG_CHOOSE | MAG_INIT_2); else if MAG_HAVE("check" , MAG_INIT_2) mode = (MAG_CHECK | MAG_INIT_2); else if MAG_HAVE("show" , MAG_INIT_2) mode = (MAG_SHOW|MAG_RESET | MAG_INIT_2); else if MAG_HAVE("reset" , (MAG_INIT_0|MAG_INIT_1|MAG_INIT_2)) mode = (MAG_RESET | MAG_INIT_2); else { INFMESSAGE(no mode) ENDMESSAGE(magmenu_a_magMenu) return; } # undef MAG_HAVE if (mode&MAG_BEGIN) { INFMESSAGE(MAG_BEGIN) gvw = w; d = (magMenu_data *) XtMalloc(sizeof(magMenu_data)); d->locx1 = event->xbutton.x; d->locy1 = event->xbutton.y; d->menuwidget = NULL; IIMESSAGE(d->locx1,d->locy1) d->oldwidth=d->oldheight=0; ENDMESSAGE(magmenu_a_magMenu) return; } if (mode&MAG_EXTEND) { Position x,y; Dimension width,height; INFMESSAGE(MAG_EXTEND) d->locx2=event->xbutton.x; d->locy2=event->xbutton.y; if (d->locx2 > d->locx1) { x=d->locx1; width =(Dimension)(d->locx2-d->locx1); } else { x=d->locx2; width =(Dimension)(d->locx1-d->locx2); } if (d->locy2 > d->locy1) { y=d->locy1; height=(Dimension)(d->locy2-d->locy1); } else { y=d->locy2; height=(Dimension)(d->locy1-d->locy2); } if (d->oldwidth && d->oldheight) GhostviewDrawRectangle(gvw,d->oldx,d->oldy,d->oldwidth,d->oldheight); if (width && height) GhostviewDrawRectangle(gvw,x,y,width,height); d->oldx=x; d->oldy=y; d->oldwidth=width; d->oldheight=height; ENDMESSAGE(magmenu_a_magMenu) return; } if (mode&MAG_CHOOSE) { Arg args[5]; Cardinal n; Widget entry = NULL; String name = "magMenu"; int i; INFMESSAGE(MAG_CHOOSE) d->menuwidget = XtCreatePopupShell(name, simpleMenuWidgetClass,w,NULL,(Cardinal)0); for (i=0; gv_magmenu_entries[i] ; i++) entry = XtCreateManagedWidget(gv_magmenu_entries[i]->name, smeBSBObjectClass,d->menuwidget,NULL,(Cardinal)0); { int menu_x, menu_y; Dimension menu_width,entry_height,menu_border,menu_height; Dimension screen_width,screen_height; Position button_x, button_y; if (!XtIsRealized(d->menuwidget)) XtRealizeWidget(d->menuwidget); n=0; XtSetArg(args[n], XtNheight, &entry_height); ++n; XtGetValues(entry, args, n); n=0; XtSetArg(args[n], XtNwidth, &menu_width); ++n; XtSetArg(args[n], XtNheight, &menu_height); ++n; XtSetArg(args[n], XtNborderWidth, &menu_border); ++n; XtGetValues(d->menuwidget, args, n); XtTranslateCoords(w, event->xbutton.x, event->xbutton.y, &button_x, &button_y); menu_x = button_x-menu_width/2 -menu_border; menu_y = button_y-entry_height/2; screen_width = WidthOfScreen(XtScreen(d->menuwidget)); screen_height = HeightOfScreen(XtScreen(d->menuwidget)); if( menu_x + menu_width > screen_width && menu_width < screen_width ) menu_x = screen_width - menu_width; if( menu_y + menu_height > screen_height && menu_height < screen_height ) menu_y = screen_height - menu_height; n=0; XtSetArg(args[n], XtNx, menu_x); n++; XtSetArg(args[n], XtNy, menu_y); n++; XtSetValues(d->menuwidget, args, n); XtPopup(d->menuwidget,XtGrabExclusive); } d->locx2=event->xbutton.x; d->locy2=event->xbutton.y; IIMESSAGE(d->locx2,d->locy2) ENDMESSAGE(magmenu_a_magMenu) return; } if (mode&MAG_SHOW) { Widget entry = XawSimpleMenuGetActiveEntry(d->menuwidget); INFMESSAGE(MAG_SHOW) if (entry) { Position locx,locy; char *s; int i=0; float scale; s = XtName(entry); i=0; while (strcmp(gv_magmenu_entries[i]->name,s)) i++; scale = gv_magmenu_entries[i]->scale; locx = (d->locx1+d->locx2)/2; locy = (d->locy1+d->locy2)/2; if (abs(d->locx1-d->locx2)<4 || abs(d->locy1-d->locy2)<4) { int dd=250/scale; d->locx1 = locx-dd; d->locx2 = locx+dd; d->locy1 = locy-dd; d->locy2 = locy+dd; } GhostviewGetBBofArea(gvw,d->locx1,d->locy1,d->locx2,d->locy2,&ret_val); ret_val.xdpi = (ret_val.xdpi/scale); ret_val.ydpi = (ret_val.ydpi/scale); if (ret_val.width && ret_val.height) popup_zoom = True; } } if (mode&MAG_CHECK) { INFMESSAGE(MAG_CHECK) if (d->menuwidget) { Arg args[5]; Cardinal n; Position ulx,uly,lrx,lry,evx,evy; int rx,ry; Dimension width,height; n=0; XtSetArg(args[n], XtNwidth, &width); n++; XtSetArg(args[n], XtNheight, &height); n++; XtGetValues(d->menuwidget, args, n); XtTranslateCoords(d->menuwidget, 0, 0, &ulx, &uly); XtTranslateCoords(d->menuwidget, (Position)width, (Position)height, &lrx, &lry); IIMESSAGE(ulx,uly) IIMESSAGE(lrx,lry) { Window root, child; int dummyx, dummyy; unsigned int dummymask; XQueryPointer(XtDisplay(w), XtWindow(w), &root, &child, &rx, &ry, &dummyx, &dummyy, &dummymask); } evx = (Position)rx; evy = (Position)ry; IIMESSAGE(evx,evy) if (evx<=ulx || evx >= lrx || evy <= uly || evy >= lry) { INFMESSAGE(pointer outside window) if (d->oldwidth && d->oldheight) GhostviewDrawRectangle(gvw, d->oldx,d->oldy,d->oldwidth,d->oldheight); magmenu_a_magMenu(gvw,(XEvent*)NULL,NULL,NULL); } else { INFMESSAGE(pointer in window) ENDMESSAGE(magmenu_a_magMenu) return; } } } if (mode&MAG_RESET) { INFMESSAGE(MAG_RESET) if (d) { if (d->oldwidth && d->oldheight) GhostviewDrawRectangle(gvw,d->oldx,d->oldy,d->oldwidth,d->oldheight); } magmenu_a_magMenu(gvw,(XEvent*)NULL,NULL,NULL); } if (popup_zoom) { INFMESSAGE(popping up zoom window) zoom_createZoom(gvw,(XtPointer)(&ret_val)); } gvw = NULL; ENDMESSAGE(magmenu_a_magMenu) } gv-3.7.4/src/ps.c0000664000076400007640000017727411736064614010503 00000000000000/* * ps.c -- Postscript scanning and copying routines. * Copyright (C) 1992 Timothy O. Theisen * Copyright (C) 2004 Jose E. Marchesi * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GNU gv; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Tim Theisen Systems Programmer * Internet: tim@cs.wisc.edu Department of Computer Sciences * UUCP: uwvax!tim University of Wisconsin-Madison * Phone: (608)262-0438 1210 West Dayton Street * FAX: (608)262-9777 Madison, WI 53706 * * Changes submitted by Maurizio Loreti distributed on the public * domain: * * - Code for handle bzip2 compressed files. */ /* * Added the ps_io_*() routines, rewrote readline(), modified * pscopyuntil() and pscopydoc() and eliminated pscopy(). * The modifications mainly aim at * - elimination of the (line length <= 255) constraint since * there are just too many documents ignoring this requirement. * - acceptance of '\r' as line terminator as suggested by * Martin Buck (martin-2.buck@student.uni-ulm.de). * Johannes Plass, 04/96 (plass@thep.physik.uni-mainz.de) * */ /* * > Believe it or not--even Adobe doesn't know how to produce correct * > PS-files. Their Acrobat Reader sometimes starts including other files * > with %%BeginFile instead of %%BeginFile: and even more often ends them * > with just %%EOF instead of %%EndFile. * > Martin Buck, martin-2.buck@student.uni-ulm.de * * Therefore we use Martin's ACROREAD_WORKAROUND (thanks for the patch, Martin). * ###jp### 04/96 * */ #include "ac_config.h" #define USE_ACROREAD_WORKAROUND /* #define MESSAGES #define MESSAGE_NO_ESC */ #include "message.h" #include "config.h" #include #include #include #include #include #include #ifdef HAVE_ZIO # include #endif #include #ifndef SEEK_SET #define SEEK_SET 0 #endif #ifndef BUFSIZ #define BUFSIZ 1024 #endif #include #include #include "paths.h" #include INC_X11(Intrinsic.h) #include INC_X11(Xos.h) /* #includes the appropriate */ #include INC_X11(Xfuncs.h) #include "callbacks.h" #include "types.h" #include "file.h" #include "misc.h" #include "ps.h" #include "note.h" #include "actions.h" extern Media *gv_medias; extern String gv_pdf_password; extern String gv_safe_gs_workdir; extern int gv_infoSkipErrors; #ifdef BSD4_2 #define memset(a,b,c) bzero(a,c) #endif #include "secscanf.h" /* We use this helper function for providing proper */ /* case and colon :-) insensitive DSC matching */ static int dsc_strncmp(const char *s1, const char *s2, size_t n) { if (strncasecmp(s1, s2, n) == 0) return 0; if (s2[n-1] == ':'){ if (strncasecmp(s1, s2, n-1) == 0 && s1[n-1] == ' ') { return 0; } } return 1; } /* length calculates string length at compile time */ /* can only be used with character constants */ #define length(a) (sizeof((a))-1) #define iscomment(a, b) (dsc_strncmp((a), (b), length((b))) == 0) #define DSCcomment(a) ((a)[0] == '%' && (a)[1] == '%') static inline char *firstword(char *p) { while (*p == ' ' || *p == '\t') p++; return p; } #define isword(a, b) ((strncmp((a), (b), length((b)))==0)?(a[length((b))] == ' ' || a[length((b))] == '\t' || a[length((b))] == '\n' || a[length((b))] == '\0'):0) /* list of standard paper sizes from Adobe's PPD. */ #if 0 struct documentmedia papersizes[] = { {"BBox", 0, 0}, {"Letter", 612, 792}, {"LetterSmall", 612, 792}, {"Legal", 612, 1008}, {"Statement", 396, 612}, {"Tabloid", 792, 1224}, {"Ledger", 1224, 792}, {"Executive", 540, 720}, {"A0", 2384, 3370}, {"A1", 1684, 2384}, {"A2", 1191, 1684}, {"A3", 842, 1191}, {"A4", 595, 842}, {"A4Small", 595, 842}, {"A5", 420, 595}, {"B4", 729, 1032}, {"B5", 516, 729}, {"Folio", 612, 936}, {"Quarto", 610, 780}, {"10x14", 720, 1008}, { NULL, 0, 0} }; #endif /*--------------------------------------------------*/ /* Declarations for ps_io_*() routines. */ typedef struct FileDataStruct_ *FileData; typedef struct FileDataStruct_ { FILE *file; /* file */ int file_desc; /* file descriptor corresponding to file */ gv_off_t filepos; /* file position corresponding to the start of the line */ char *buf; /* buffer */ int buf_size; /* size of buffer */ int buf_end; /* last char in buffer given as offset to buf */ int line_begin; /* start of the line given as offset to buf */ int line_end; /* end of the line given as offset to buf */ int line_len; /* length of line, i.e. (line_end-line_begin) */ char line_termchar; /* char exchanged for a '\0' at end of line */ int status; /* 0 = okay, 1 = failed */ } FileDataStruct; static FileData ps_io_init (FILE *); static void ps_io_exit (FileData); static char *ps_io_fgetchars (FileData, int); static int ps_io_fseek (FileData, gv_off_t); static gv_off_t ps_io_ftell (FileData); static char *readline (FileData, char **, gv_off_t *, unsigned int *); static char *gettextline (char *); static char *ps_gettext (char *,char **); static int blank (char *); static char *pscopyuntil (FileData,FILE *,long,long,char *); static char *skipped_line = "% ps_io_fgetchars: skipped line"; static char *empty_string = ""; /*--------------------------------------------------*/ /* * psscan -- scan the PostScript file for document structuring comments. * * This scanner is designed to retrieve the information necessary for * the ghostview previewer. It will scan files that conform to any * version (1.0, 2.0, 2.1, or 3.0) of the document structuring conventions. * It does not really care which version of comments the file contains. * (The comments are largely upward compatible.) It will scan a number * of non-conforming documents. (You could have part of the document * conform to V2.0 and the rest conform to V3.0. It would be similar * to the DC-2 1/2+, it would look funny but it can still fly.) * * This routine returns a pointer to the document structure. * The structure contains the information relevant to previewing. * These include EPSF flag (to tell if the file is a encapsulated figure), * Page Media (for the Page Size), Bounding Box (to minimize backing * pixmap size or determine window size for encapsulated PostScript), * Orientation of Paper (for default transformation matrix), and * Page Order. The title and CreationDate are also retrieved to * help identify the document. * * The following comments are examined: * * Header section: * Must start with %!PS-Adobe-. Version numbers ignored. * * %!PS-Adobe-* [EPSF*] (changed EPSF-* to EPSF* to do XFig a favor ...###jp###) * %%BoundingBox: |(atend) * %%CreationDate: * %%Orientation: Portrait|Landscape|(atend) * %%Pages: []|(atend) * %%PageOrder: Ascend|Descend|Special|(atend) * %%Title: * %%DocumentMedia: * %%DocumentPaperSizes: * %%EndComments * * Note: Either the 3.0 or 2.0 syntax for %%Pages is accepted. * Also either the 2.0 %%DocumentPaperSizes or the 3.0 * %%DocumentMedia comments are accepted as well. * * The header section ends either explicitly with %%EndComments or * implicitly with any line that does not begin with %X where X is * a not whitespace character. * * If the file is encapsulated PostScript the optional Preview section * is next: * * %%BeginPreview * %%EndPreview * * This section explicitly begins and ends with the above comments. * * Next the Defaults section for version 3 page defaults: * * %%BeginDefaults * %%PageBoundingBox: * %%PageOrientation: Portrait|Landscape * %%PageMedia: * %%EndDefaults * * This section explicitly begins and ends with the above comments. * * The prolog section either explicitly starts with %%BeginProlog or * implicitly with any nonblank line. * * %%BeginProlog * %%EndProlog * * The Prolog should end with %%EndProlog, however the proglog implicitly * ends when %%BeginSetup, %%Page, %%Trailer or %%EOF are encountered. * * The Setup section is where the version 3 page defaults are found. * This section either explicitly begins with %%BeginSetup or implicitly * with any nonblank line after the Prolog. * * %%BeginSetup * %%PageBoundingBox: * %%PageOrientation: Portrait|Landscape * %%PaperSize: * %%EndSetup * * The Setup should end with %%EndSetup, however the setup implicitly * ends when %%Page, %%Trailer or %%EOF are encountered. * * Next each page starts explicitly with %%Page and ends implicitly with * %%Page or %%Trailer or %%EOF. The following comments are recognized: * * %%Page: * %%PageBoundingBox: |(atend) * %%PageOrientation: Portrait|Landscape * %%PageMedia: * %%PaperSize: * * The trailer section start explicitly with %%Trailer and end with %%EOF. * The following comment are examined with the proper (atend) notation * was used in the header: * * %%Trailer * %%BoundingBox: |(atend) * %%Orientation: Portrait|Landscape|(atend) * %%Pages: []|(atend) * %%PageOrder: Ascend|Descend|Special|(atend) * %%EOF * * * + A DC-3 received severe damage to one of its wings. The wing was a total * loss. There was no replacement readily available, so the mechanic * installed a wing from a DC-2. */ /*-----------------------------------------------------------*/ static void ps_dynMemExhaust(void) { fprintf(stderr,"Fatal Error: Dynamic memory exhausted.\n"); clean_safe_tempdir(); exit(EXIT_STATUS_FATAL); } #define CHECK_MALLOCED(aaa) if (!(aaa)) ps_dynMemExhaust() /*###########################################################*/ /* psscan */ /*###########################################################*/ static int parse_boundingbox(const char *l, int *boundingbox) { const char *p = l; double fllx, flly, furx, fury; char *pe; fllx = strtod(p, &pe); if (*pe != ' ' && *pe != '\t') { return 0; } p = pe; while (*p == ' ' || *p == '\t') p++; flly = strtod(p, &pe); if (*pe != ' ' && *pe != '\t') { return 0; } p = pe; while (*p == ' ' || *p == '\t') p++; furx = strtod(p, &pe); if (*pe != ' ' && *pe != '\t') { return 0; } p = pe; while (*p == ' ' || *p == '\t') p++; fury = strtod(p, &pe); if (*pe != '\n' && *pe != '\0' && *pe != ' ' && *pe != '\t') { return 0; } boundingbox[LLX] = floor(fllx); boundingbox[LLY] = floor(flly); boundingbox[URX] = ceil(furx); boundingbox[URY] = ceil(fury); return 1; } struct document * psscan(FILE **fileP, char *filename, char *filename_raw, char **filename_dscP, char *cmd_scan_pdf, char **filename_uncP, char *cmd_uncompress, int scanstyle, int gv_gs_safeDir) { FILE *file; struct document *doc; int bb_set = NONE; int pages_set = NONE; int page_order_set = NONE; int orientation_set = NONE; int page_bb_set = NONE; int page_media_set = NONE; int preread; /* flag which tells the readline isn't needed */ int i; long l; char *p; int maxpages = 0; unsigned int nextpage = 1; /* Next expected page */ unsigned int thispage; int ignore = 0; /* whether to ignore page ordinals */ char *label; char *line; gv_off_t position; /* Position of the current line */ gv_off_t beginsection; /* Position of the beginning of the section */ unsigned int line_len; /* Length of the current line */ gv_off_t section_len; /* Place to accumulate the section length */ char *next_char; /* 1st char after text returned by ps_gettext() */ char *cp; Media dmp; FileData fd; int respect_eof; /* Derived from the scanstyle argument. If set to 0 EOF comments will be ignored, if set to 1 they will be taken seriously. Purpose; Out there are many documents which include other DSC conforming documents without without enclosing them by 'BeginDocument' and 'EndDocument' comments. This may cause fake EOF comments to appear in the body of a page. Similarly, if respect_eof is set to false 'Trailer' comments are ignored except of the last one found in the document. */ int ignore_dsc; /* Derived from scanstyle. If set the document structure will be ignored. */ unsigned char b[3]; /* The first 3 bytes of the input file */ BEGINMESSAGE(psscan) if (cmd_uncompress) { if ( fread(b, sizeof(char), 3, *fileP) != 3 || /* If ((read error) OR */ ( memcmp(b, "\037\235", 2) != 0 && /* (not compress AND */ memcmp(b, "\037\213", 2) != 0 && /* not gzip AND */ memcmp(b, "BZh", 3) != 0 ) ) { /* not bzip2)) { */ rewind(*fileP); cmd_uncompress=NULL; } } #ifndef HAVE_ZIO if (cmd_uncompress) { struct document *retval = NULL; FILE *tempfile = (FILE*)NULL; char *filename_unc; char *quoted_filename, *quoted_filename_unc; char cmd[512]; char s[512]; mode_t old_umask; filename_unc=file_getTmpFilename(NULL, filename_raw, NULL); if (!filename_unc) { NotePopupShowMessage("Cannot create temporary file!"); ENDMESSAGE(psscan) return(retval); } old_umask = umask(0077); quoted_filename = quote_filename(filename); quoted_filename_unc = quote_filename(filename_unc); if (memcmp(b, "BZh", 3) == 0) { sprintf(cmd, "bzip2 -dc %s >%s", quoted_filename, quoted_filename_unc); } else { sprintf(cmd, "gzip -dc %s >%s", quoted_filename, quoted_filename_unc); } XtFree(quoted_filename); XtFree(quoted_filename_unc); INFMESSAGE(is compressed) INFSMESSAGE(uncompress command,cmd) if (system(cmd) || file_fileIsNotUseful(filename_unc)) { INFMESSAGE(uncompressing failed) unc_exec_failed: sprintf(s,"Execution of\n%s\nfailed.",cmd); #if 0 unc_failed: #endif NotePopupShowMessage(s); if (tempfile) fclose(tempfile); unlink(filename_unc); unc_ok: XtFree(filename_unc); ENDMESSAGE(psscan) return(retval); } umask(old_umask); tempfile = fopen(filename_unc, "r"); if (!tempfile) goto unc_exec_failed; fclose(*fileP); *fileP = tempfile; retval = psscan(fileP,filename_unc,filename_raw,filename_dscP,cmd_scan_pdf,NULL,NULL,scanstyle, gv_gs_safeDir); #if 0 if (!retval) { sprintf(s,"333 Scanning\n%s\nfailed.",filename_unc); goto unc_failed; } #endif *filename_uncP = (char*)XtNewString(filename_unc); goto unc_ok; } #else if (cmd_uncompress) { FILE *zfile = fzopen(filename, "r"); INFMESSAGE(is compressed) if (!zfile) { char s[512]; sprintf(s,"Uncompressing of\n%s\nfailed.",filename); NotePopupShowMessage(s); ENDMESSAGE(psscan) return(NULL); } fclose(*fileP); *fileP = zfile; cmd_uncompress = NULL; *filename_uncP = NULL; } #endif respect_eof = (scanstyle & SCANSTYLE_IGNORE_EOF) ? 0 : 1; ignore_dsc = (scanstyle & SCANSTYLE_IGNORE_DSC) ? 1 : 0; file = *fileP; if (ignore_dsc) { INFMESSAGE(ignoring DSC) ENDMESSAGE(psscan) return(NULL); } fd = ps_io_init(file); if (!readline(fd,&line, &position, &line_len)) { fprintf(stderr, "Warning: empty file.\n"); ENDMESSAGE(psscan) ps_io_exit(fd); return(NULL); } /* Header comments */ if (line_len>1 && (iscomment(line,"%!PS") || iscomment(line + 1,"%!PS"))) { INFMESSAGE(found "PS-Adobe-" comment) doc = (struct document *) calloc(1, sizeof(struct document)); CHECK_MALLOCED(doc); p = line; while (*p != '\0' && *p != ' ' && *p != '\t') p++; p = firstword(p); doc->epsf = strncmp(p, "EPSF", 4) == 0; doc->beginheader = position; section_len = line_len; } else if (iscomment(line,"%PDF-") && cmd_scan_pdf) { struct document *retval = NULL; FILE *tempfile = (FILE*)NULL; char *filename_dsc; char *quoted_filename, *quoted_filename_dsc; char *pdfpos; char *dscpos; char cmd[512]; char s[512]; mode_t old_umask; String tmp_filename; int tmpfd, tmp_fd; filename_dsc=file_getTmpFilename(NULL, filename_raw, NULL); if (!filename_dsc) { NotePopupShowMessage("Cannot create temporary file!"); if (tempfile) fclose(tempfile); ps_io_exit(fd); ENDMESSAGE(psscan) return(retval); } /* sprintf(cmd,cmd_scan_pdf,filename,filename_dsc); */ quoted_filename = quote_filename(filename); quoted_filename_dsc = quote_filename(filename_dsc); if ((pdfpos = strstr(cmd_scan_pdf,"%pdf")) && (dscpos = strstr(cmd_scan_pdf,"%dsc"))) { cmd[0] = '\0'; if (pdfpos < dscpos) { strncat(cmd,cmd_scan_pdf,(pdfpos-cmd_scan_pdf)); strcat(cmd,quoted_filename); strncat(cmd,pdfpos+4,(dscpos-pdfpos-4)); strcat(cmd,quoted_filename_dsc); strcat(cmd,dscpos+4); } else { strncat(cmd,cmd_scan_pdf,(dscpos-cmd_scan_pdf)); strcat(cmd,quoted_filename_dsc); strncat(cmd,dscpos+4,(pdfpos-dscpos-4)); strcat(cmd,quoted_filename); strcat(cmd,pdfpos+4); } } else { char* password = ""; if (gv_pdf_password) { char parameter[100]; strcpy(parameter, " -sPDFPassword="); password = quote_filename(gv_pdf_password); strcat(parameter, password); XtFree(password); sprintf(cmd,cmd_scan_pdf,quoted_filename,quoted_filename_dsc, parameter); } else sprintf(cmd,cmd_scan_pdf,quoted_filename,quoted_filename_dsc, ""); } XtFree(quoted_filename); XtFree(quoted_filename_dsc); old_umask = umask(0077); INFMESSAGE(is PDF) if (gv_gs_safeDir) { if (chdir(gv_safe_gs_workdir) != 0) { strcpy(s, "Chdir to "); strcat(s, gv_safe_gs_workdir); strcat(s, " failed"); goto scan_failed; } } INFSMESSAGE(scan command,cmd) tmp_filename=file_getTmpFilename(NULL, filename_raw, &tmp_fd); if (!tmp_filename) { strcpy(s, "Cannot create temporary file!"); goto scan_failed; } tmpfd = dup(2); close(2); dup2( tmp_fd, 2); close(tmp_fd); if (system(cmd) || file_fileIsNotUseful(filename_dsc)) { char password_line[1000]; int found; FILE* tmp_file; found = 0; INFMESSAGE(scan subprocess failed) close(2); dup2(tmpfd,2); close(tmpfd); tmp_file = fopen( tmp_filename, "r" ); if (tmp_file) { while ( fgets( password_line, 999, tmp_file) ) { if (strstr(password_line,"This file requires a password for access.")) found = 1; if (strstr(password_line,"Password did not work.")) found = 1; } fclose(tmp_file); unlink(tmp_filename); } if (found) { cb_askPassword((Widget)NULL, NULL, NULL); /* do not show error */ gv_infoSkipErrors = 1; goto scan_password_required; /* TODO? but wait for password dialog */ } XtFree(tmp_filename); scan_exec_failed: sprintf(s,"Execution of\n%s\nfailed.",cmd); scan_failed: NotePopupShowMessage(s); scan_password_required: if (tempfile) fclose(tempfile); unlink(filename_dsc); scan_ok: XtFree(filename_dsc); ps_io_exit(fd); ENDMESSAGE(psscan) return(retval); } close(2); dup2(tmpfd,2); close(tmpfd); close(tmp_fd); unlink((char*) tmp_filename); XtFree(tmp_filename); umask (old_umask); tempfile = fopen(filename_dsc, "r"); if (!tempfile) goto scan_exec_failed; fclose(*fileP); *fileP = tempfile; retval = psscan(fileP,filename_dsc,filename_raw,filename_dscP,cmd_scan_pdf,NULL,NULL,scanstyle,gv_gs_safeDir); if (!retval) { sprintf(s,"Scanning\n%s\nfailed.",filename_dsc); goto scan_failed; } *filename_dscP = (char*)XtNewString(filename_dsc); goto scan_ok; } else { INFMESSAGE(unable to classify document) ENDMESSAGE(psscan) ps_io_exit(fd); return(NULL); } preread = 0; while (preread || readline(fd, &line, &position, &line_len)) { if (!preread) section_len += line_len; preread = 0; if (line[0] != '%' || iscomment(line+1, "%EndComments") || /* line[1] == ' ' || */ /* 10Jun09 wb allow comments starting percent + space */ line[1] == '\t' || line[1] == '\n' || !isprint(line[1])) { break; } else if (line[1] != '%') { /* Do nothing */ } else if (doc->title == NULL && iscomment(line+2, "Title:")) { doc->title = gettextline(line+length("%%Title:")); } else if (doc->date == NULL && iscomment(line+2, "CreationDate:")) { doc->date = gettextline(line+length("%%CreationDate:")); } else if (bb_set == NONE && iscomment(line+2, "BoundingBox:")) { p = firstword(line + length("%%BoundingBox:")); if (isword(p, "(atend)")) { bb_set = ATEND; } else if (parse_boundingbox(p, doc->boundingbox)) { bb_set = 1; } } else if (orientation_set == NONE && iscomment(line+2, "Orientation:")) { p = firstword(line + length("%%Orientation:")); if (isword(p, "(atend)")) { orientation_set = ATEND; } else if (isword(p, "Portrait")) { doc->orientation = PORTRAIT; orientation_set = 1; } else if (isword(p, "Landscape")) { doc->orientation = LANDSCAPE; orientation_set = 1; } else if (isword(p, "Seascape")) { doc->orientation = SEASCAPE; orientation_set = 1; } } else if (page_order_set == NONE && iscomment(line+2, "PageOrder:")) { p = firstword(line + length("%%PageOrder:")); if (isword(p, "(atend)")) { page_order_set = ATEND; } else if (isword(p, "Ascend")) { doc->pageorder = ASCEND; page_order_set = 1; } else if (isword(p, "Descend")) { doc->pageorder = DESCEND; page_order_set = 1; } else if (isword(p, "Special")) { doc->pageorder = SPECIAL; page_order_set = 1; } } else if (pages_set == NONE && iscomment(line+2, "Pages:")) { p = firstword(line + length("%%Pages:")); if (isword(p, "(atend)")) { pages_set = ATEND; } else { switch (sec_sscanf(line+length("%%Pages:"), "%d %d", &maxpages, &i)) { case 2: if (page_order_set == NONE) { if (i == -1) { doc->pageorder = DESCEND; page_order_set = 1; } else if (i == 0) { doc->pageorder = SPECIAL; page_order_set = 1; } else if (i == 1) { doc->pageorder = ASCEND; page_order_set = 1; } } case 1: if (maxpages > 0) { doc->pages = (struct page *) calloc(maxpages, sizeof(struct page)); CHECK_MALLOCED(doc->pages); } } } } else if (doc->nummedia == NONE && iscomment(line+2, "DocumentMedia:")) { float w, h; doc->media = (Media) malloc(sizeof (MediaStruct)); CHECK_MALLOCED(doc->media); doc->media[0].name = ps_gettext(line+length("%%DocumentMedia:"), &next_char); if (doc->media[0].name != NULL) { if (sec_sscanf(next_char, "%f %f", &w, &h) == 2) { doc->media[0].width = w + 0.5; doc->media[0].height = h + 0.5; } if (doc->media[0].width != 0 && doc->media[0].height != 0) doc->nummedia = 1; else free(doc->media[0].name); } preread=1; while (readline(fd, &line, &position, &line_len) && DSCcomment(line) && iscomment(line+2, "+")) { section_len += line_len; doc->media = (Media) realloc(doc->media, (doc->nummedia+1)* sizeof (MediaStruct)); CHECK_MALLOCED(doc->media); doc->media[doc->nummedia].name = ps_gettext(line+length("%%+"), &next_char); if (doc->media[doc->nummedia].name != NULL) { if (sec_sscanf(next_char, "%f %f", &w, &h) == 2) { doc->media[doc->nummedia].width = w + 0.5; doc->media[doc->nummedia].height = h + 0.5; } if (doc->media[doc->nummedia].width != 0 && doc->media[doc->nummedia].height != 0) doc->nummedia++; else free(doc->media[doc->nummedia].name); } } section_len += line_len; if (doc->nummedia != 0) doc->default_page_media = doc->media; } else if (doc->nummedia == NONE && iscomment(line+2, "DocumentPaperSizes:")) { doc->media = (Media) malloc(sizeof (MediaStruct)); CHECK_MALLOCED(doc->media); doc->media[0].name = ps_gettext(line+length("%%DocumentPaperSizes:"), &next_char); if (doc->media[0].name != NULL) { doc->media[0].width = 0; doc->media[0].height = 0; for (i=0; gv_medias[i]; i++) { dmp = gv_medias[i]; /* Note: Paper size comment uses down cased paper size * name. Case insensitive compares are only used for * PaperSize comments. */ if (strcasecmp(doc->media[0].name, dmp->name) == 0) { free(doc->media[0].name); doc->media[0].name = (char *)malloc(strlen(dmp->name)+1); CHECK_MALLOCED(doc->media[0].name); strcpy(doc->media[0].name, dmp->name); doc->media[0].width = dmp->width; doc->media[0].height = dmp->height; break; } } if (doc->media[0].width != 0 && doc->media[0].height != 0) doc->nummedia = 1; else free(doc->media[0].name); } while ((cp = ps_gettext(next_char, &next_char))) { doc->media = (Media) realloc(doc->media, (doc->nummedia+1)* sizeof (MediaStruct)); CHECK_MALLOCED(doc->media); doc->media[doc->nummedia].name = cp; doc->media[doc->nummedia].width = 0; doc->media[doc->nummedia].height = 0; for (i=0; gv_medias[i]; i++) { dmp = gv_medias[i]; /* Note: Paper size comment uses down cased paper size * name. Case insensitive compares are only used for * PaperSize comments. */ if (strcasecmp(doc->media[doc->nummedia].name, dmp->name) == 0) { free(doc->media[doc->nummedia].name); doc->media[doc->nummedia].name = (char *)malloc(strlen(dmp->name)+1); CHECK_MALLOCED(doc->media[doc->nummedia].name); strcpy(doc->media[doc->nummedia].name, dmp->name); doc->media[doc->nummedia].width = dmp->width; doc->media[doc->nummedia].height = dmp->height; break; } } if (doc->media[doc->nummedia].width != 0 && doc->media[doc->nummedia].height != 0) doc->nummedia++; else free(doc->media[doc->nummedia].name); } preread=1; while (readline(fd, &line, &position, &line_len) && DSCcomment(line) && iscomment(line+2, "+")) { section_len += line_len; next_char = line + length("%%+"); while ((cp = ps_gettext(next_char, &next_char))) { doc->media = (Media) realloc(doc->media, (doc->nummedia+1)* sizeof (MediaStruct)); CHECK_MALLOCED(doc->media); doc->media[doc->nummedia].name = cp; doc->media[doc->nummedia].width = 0; doc->media[doc->nummedia].height = 0; for (i=0; gv_medias[i]; i++) { dmp = gv_medias[i]; /* Note: Paper size comment uses down cased paper size * name. Case insensitive compares are only used for * PaperSize comments. */ if (strcasecmp(doc->media[doc->nummedia].name, dmp->name) == 0) { doc->media[doc->nummedia].width = dmp->width; doc->media[doc->nummedia].height = dmp->height; break; } } if (doc->media[doc->nummedia].width != 0 && doc->media[doc->nummedia].height != 0) doc->nummedia++; else free(doc->media[doc->nummedia].name); } } section_len += line_len; if (doc->nummedia > 0) doc->default_page_media = doc->media; } } if (DSCcomment(line) && iscomment(line+2, "EndComments")) { readline(fd, &line, &position, &line_len); section_len += line_len; } doc->endheader = position; doc->lenheader = section_len - line_len; /* Optional Preview comments for encapsulated PostScript files */ beginsection = position; section_len = line_len; while (blank(line) && readline(fd, &line, &position, &line_len)) { section_len += line_len; } if (doc->epsf && DSCcomment(line) && iscomment(line+2, "BeginPreview")) { doc->beginpreview = beginsection; beginsection = 0; while (readline(fd, &line, &position, &line_len) && !(DSCcomment(line) && iscomment(line+2, "EndPreview"))) { section_len += line_len; } section_len += line_len; readline(fd, &line, &position, &line_len); section_len += line_len; doc->endpreview = position; doc->lenpreview = section_len - line_len; } /* Page Defaults for Version 3.0 files */ if (beginsection == 0) { beginsection = position; section_len = line_len; } while (blank(line) && readline(fd, &line, &position, &line_len)) { section_len += line_len; } if (DSCcomment(line) && iscomment(line+2, "BeginDefaults")) { doc->begindefaults = beginsection; beginsection = 0; while (readline(fd, &line, &position, &line_len) && !(DSCcomment(line) && iscomment(line+2, "EndDefaults"))) { section_len += line_len; if (!DSCcomment(line)) { /* Do nothing */ } else if (doc->default_page_orientation == NONE && iscomment(line+2, "PageOrientation:")) { p = firstword(line + length("%%PageOrientation:")); if (isword(p, "Portrait")) { doc->default_page_orientation = PORTRAIT; } else if (isword(p, "Landscape")) { doc->default_page_orientation = LANDSCAPE; } else if (isword(p, "Seascape")) { doc->default_page_orientation = SEASCAPE; } } else if (page_media_set == NONE && iscomment(line+2, "PageMedia:")) { cp = ps_gettext(line+length("%%PageMedia:"), NULL); for (dmp = doc->media, i=0; inummedia; i++, dmp++) { if (strcmp(cp, dmp->name) == 0) { doc->default_page_media = dmp; page_media_set = 1; break; } } free(cp); } else if (page_bb_set == NONE && iscomment(line+2, "PageBoundingBox:")) { p = firstword(line + length("%%PageBoundingBox:")); if (parse_boundingbox(p, doc->default_page_boundingbox)) page_bb_set = 1; } } section_len += line_len; readline(fd, &line, &position, &line_len); section_len += line_len; doc->enddefaults = position; doc->lendefaults = section_len - line_len; } /* Document Prolog */ if (beginsection == 0) { beginsection = position; section_len = line_len; } while (blank(line) && readline(fd, &line, &position, &line_len)) { section_len += line_len; } if (!(DSCcomment(line) && (iscomment(line+2, "BeginSetup") || iscomment(line+2, "Page:") || iscomment(line+2, "Trailer") || iscomment(line+2, "EOF")))) { doc->beginprolog = beginsection; beginsection = 0; preread = 1; while ((preread || readline(fd, &line, &position, &line_len)) && !(DSCcomment(line) && (iscomment(line+2, "EndProlog") || iscomment(line+2, "BeginSetup") || iscomment(line+2, "Page:") || iscomment(line+2, "Trailer") || iscomment(line+2, "EOF")))) { if (!preread) section_len += line_len; preread = 0; } section_len += line_len; if (DSCcomment(line) && iscomment(line+2, "EndProlog")) { readline(fd, &line, &position, &line_len); section_len += line_len; } doc->endprolog = position; doc->lenprolog = section_len - line_len; } /* Document Setup, Page Defaults found here for Version 2 files */ if (beginsection == 0) { beginsection = position; section_len = line_len; } while (blank(line) && readline(fd, &line, &position, &line_len)) { section_len += line_len; } if (!(DSCcomment(line) && (iscomment(line+2, "Page:") || iscomment(line+2, "Trailer") || (respect_eof && iscomment(line+2, "EOF"))))) { doc->beginsetup = beginsection; beginsection = 0; preread = 1; while ((preread || readline(fd, &line, &position, &line_len)) && !(DSCcomment(line) && (iscomment(line+2, "EndSetup") || iscomment(line+2, "Page:") || iscomment(line+2, "Trailer") || (respect_eof && iscomment(line+2, "EOF"))))) { if (!preread) section_len += line_len; preread = 0; if (!DSCcomment(line)) { /* Do nothing */ } else if (doc->default_page_orientation == NONE && iscomment(line+2, "PageOrientation:")) { p = firstword(line + length("%%PageOrientation:")); if (isword(p, "Portrait")) { doc->default_page_orientation = PORTRAIT; } else if (isword(p, "Landscape")) { doc->default_page_orientation = LANDSCAPE; } else if (isword(p, "Seascape")) { doc->default_page_orientation = SEASCAPE; } } else if (page_media_set == NONE && iscomment(line+2, "PaperSize:")) { cp = ps_gettext(line+length("%%PaperSize:"), NULL); for (dmp = doc->media, i=0; inummedia; i++, dmp++) { /* Note: Paper size comment uses down cased paper size * name. Case insensitive compares are only used for * PaperSize comments. */ if (strcasecmp(cp, dmp->name) == 0) { doc->default_page_media = dmp; page_media_set = 1; break; } } free(cp); } else if (page_bb_set == NONE && iscomment(line+2, "PageBoundingBox:")) { p = firstword(line + length("%%PageBoundingBox:")); if (parse_boundingbox(p, doc->default_page_boundingbox)) page_bb_set = 1; } } section_len += line_len; if (DSCcomment(line) && iscomment(line+2, "EndSetup")) { readline(fd, &line, &position, &line_len); section_len += line_len; } doc->endsetup = position; doc->lensetup = section_len - line_len; } /* BEGIN Windows NT fix ###jp### Mark Pfeifer (pfeiferm%ppddev@comet.cmis.abbott.com) told me about problems when viewing Windows NT 3.51 generated postscript files with gv. He found that the relevant postscript files show important postscript code after the '%%EndSetup' and before the first page comment '%%Page: x y'. */ if (doc->beginsetup) { while (!(DSCcomment(line) && (iscomment(line+2, "EndSetup") || (iscomment(line+2, "Page:") || iscomment(line+2, "Trailer") || (respect_eof && iscomment(line+2, "EOF"))))) && (readline(fd, &line, &position, &line_len))) { section_len += line_len; doc->lensetup = section_len - line_len; doc->endsetup = position; } } /* END Windows NT fix ###jp##*/ /* Individual Pages */ if (beginsection == 0) { beginsection = position; section_len = line_len; } while (blank(line) && readline(fd, &line, &position, &line_len)) { section_len += line_len; } newpage: while (DSCcomment(line) && iscomment(line+2, "Page:")) { if (maxpages == 0) { maxpages = 1; doc->pages = (struct page *) calloc(maxpages, sizeof(struct page)); CHECK_MALLOCED(doc->pages); } label = ps_gettext(line+length("%%Page:"), &next_char); l = atol(firstword(next_char)); thispage = (l > 0)?l:0; if (nextpage == 1) { ignore = thispage != 1; } if (!ignore && thispage != nextpage) { free(label); doc->numpages--; goto continuepage; } nextpage++; if (doc->numpages == maxpages) { maxpages++; doc->pages = (struct page *) realloc(doc->pages, maxpages*sizeof (struct page)); CHECK_MALLOCED(doc->pages); } memset(&(doc->pages[doc->numpages]), 0, sizeof(struct page)); page_bb_set = NONE; doc->pages[doc->numpages].label = label; if (beginsection) { doc->pages[doc->numpages].begin = beginsection; beginsection = 0; } else { doc->pages[doc->numpages].begin = position; section_len = line_len; } continuepage: while (readline(fd, &line, &position, &line_len) && !(DSCcomment(line) && (iscomment(line+2, "Page:") || iscomment(line+2, "Trailer") || (respect_eof && iscomment(line+2, "EOF"))))) { section_len += line_len; if (!DSCcomment(line)) { /* Do nothing */ } else if (doc->pages[doc->numpages].orientation == NONE && iscomment(line+2, "PageOrientation:")) { p = firstword(line + length("%%PageOrientation:")); if (isword(p, "Portrait")) { doc->pages[doc->numpages].orientation = PORTRAIT; } else if (isword(p, "Landscape")) { doc->pages[doc->numpages].orientation = LANDSCAPE; } else if (isword(p, "Seascape")) { doc->pages[doc->numpages].orientation = SEASCAPE; } } else if (doc->pages[doc->numpages].media == NULL && iscomment(line+2, "PageMedia:")) { cp = ps_gettext(line+length("%%PageMedia:"), NULL); for (dmp = doc->media, i=0; inummedia; i++, dmp++) { if (strcmp(cp, dmp->name) == 0) { doc->pages[doc->numpages].media = dmp; break; } } free(cp); } else if (doc->pages[doc->numpages].media == NULL && iscomment(line+2, "PaperSize:")) { cp = ps_gettext(line+length("%%PaperSize:"), NULL); for (dmp = doc->media, i=0; inummedia; i++, dmp++) { /* Note: Paper size comment uses down cased paper size * name. Case insensitive compares are only used for * PaperSize comments. */ if (strcasecmp(cp, dmp->name) == 0) { doc->pages[doc->numpages].media = dmp; break; } } free(cp); } else if ((page_bb_set == NONE || page_bb_set == ATEND) && iscomment(line+2, "PageBoundingBox:")) { p = firstword(line + length("%%PageBoundingBox:")); if (isword(p, "(atend)")) { page_bb_set = ATEND; } else if (parse_boundingbox(p, doc->pages[doc->numpages].boundingbox)) { if (page_bb_set == NONE) page_bb_set = 1; } } } section_len += line_len; doc->pages[doc->numpages].end = position; doc->pages[doc->numpages].len = section_len - line_len; doc->numpages++; } /* Document Trailer */ if (beginsection) { doc->begintrailer = beginsection; beginsection = 0; } else { doc->begintrailer = position; section_len = line_len; } preread = 1; while ((preread || readline(fd, &line, &position, &line_len)) && !(respect_eof && DSCcomment(line) && iscomment(line+2, "EOF"))) { if (!preread) section_len += line_len; preread = 0; if (!DSCcomment(line)) { /* Do nothing */ } else if (iscomment(line+2, "Page:")) { free(ps_gettext(line+length("%%Page:"), &next_char)); l = atol(firstword(next_char)); thispage = (l > 0)?l:0; if (!ignore && thispage == nextpage) { if (doc->numpages > 0) { doc->pages[doc->numpages-1].end = position; doc->pages[doc->numpages-1].len += section_len - line_len; } else { if (doc->endsetup) { doc->endsetup = position; doc->endsetup += section_len - line_len; } else if (doc->endprolog) { doc->endprolog = position; doc->endprolog += section_len - line_len; } } goto newpage; } } else if (!respect_eof && iscomment(line+2, "Trailer")) { /* What we thought was the start of the trailer was really */ /* the trailer of an EPS on the page. */ /* Set the end of the page to this trailer and keep scanning. */ if (doc->numpages > 0) { doc->pages[ doc->numpages-1 ].end = position; doc->pages[ doc->numpages-1 ].len += section_len - line_len; } doc->begintrailer = position; section_len = line_len; } else if (bb_set == ATEND && iscomment(line+2, "BoundingBox:")) { p = firstword(line + length("%%BoundingBox:")); (void)parse_boundingbox(p, doc->boundingbox); } else if (orientation_set == ATEND && iscomment(line+2, "Orientation:")) { p = firstword(line + length("%%Orientation:")); if (isword(p, "Portrait")) { doc->orientation = PORTRAIT; } else if (isword(p, "Landscape")) { doc->orientation = LANDSCAPE; } else if (isword(p, "Seascape")) { doc->orientation = SEASCAPE; } } else if (page_order_set == ATEND && iscomment(line+2, "PageOrder:")) { p = firstword(line + length("%%PageOrder:")); if (isword(p, "Ascend")) { doc->pageorder = ASCEND; } else if (isword(p, "Descend")) { doc->pageorder = DESCEND; } else if (isword(p, "Special")) { doc->pageorder = SPECIAL; } } else if (pages_set == ATEND && iscomment(line+2, "Pages:")) { if (sec_sscanf(line+length("%%Pages:"), "%*u %d", &i) == 1) { if (page_order_set == NONE) { if (i == -1) doc->pageorder = DESCEND; else if (i == 0) doc->pageorder = SPECIAL; else if (i == 1) doc->pageorder = ASCEND; } } } } section_len += line_len; if (DSCcomment(line) && iscomment(line+2, "EOF")) { readline(fd, &line, &position, &line_len); section_len += line_len; } doc->endtrailer = position; doc->lentrailer = section_len - line_len; #if 0 section_len = line_len; preread = 1; while (preread || readline(fd, &line, &position, &line_len)) { if (!preread) section_len += line_len; preread = 0; if (DSCcomment(line) && iscomment(line+2, "Page:")) { free(ps_gettext(line+length("%%Page:"), &next_char)); if (sec_sscanf(next_char, "%d", &thispage) != 1) thispage = 0; if (!ignore && thispage == nextpage) { if (doc->numpages > 0) { doc->pages[doc->numpages-1].end = position; doc->pages[doc->numpages-1].len += doc->lentrailer + section_len - line_len; } else { if (doc->endsetup) { doc->endsetup = position; doc->endsetup += doc->lentrailer + section_len - line_len; } else if (doc->endprolog) { doc->endprolog = position; doc->endprolog += doc->lentrailer + section_len - line_len; } } goto newpage; } } } #endif ENDMESSAGE(psscan) ps_io_exit(fd); return doc; } /*###########################################################*/ /* * psfree -- free dynamic storage associated with document structure. */ /*###########################################################*/ void psfree(struct document *doc) { int i; BEGINMESSAGE(psfree) if (doc) { for (i=0; inumpages; i++) { if (doc->pages[i].label) free(doc->pages[i].label); } for (i=0; inummedia; i++) { if (doc->media[i].name) free(doc->media[i].name); } if (doc->title) free(doc->title); if (doc->date) free(doc->date); if (doc->pages) free(doc->pages); if (doc->media) free(doc->media); free(doc); } ENDMESSAGE(psfree) } /*----------------------------------------------------------*/ /* * gettextline -- skip over white space and return the rest of the line. * If the text begins with '(' return the text string * using ps_gettext(). */ /*----------------------------------------------------------*/ static char * gettextline(char *line) { char *cp; BEGINMESSAGE(gettextline) while (*line && (*line == ' ' || *line == '\t')) line++; if (*line == '(') { ENDMESSAGE(gettextline) return ps_gettext(line, NULL); } else { if (strlen(line) == 0) {ENDMESSAGE(gettextline) return NULL;} cp = (char *) malloc(strlen(line)); CHECK_MALLOCED(cp); strncpy(cp, line, strlen(line)-1); cp[strlen(line)-1] = '\0'; ENDMESSAGE(gettextline) return cp; } } /*----------------------------------------------------------*/ /* * ps_gettext -- return the next text string on the line. * return NULL if nothing is present. */ /*----------------------------------------------------------*/ static char * ps_gettext(char *line, char **next_char) { char text[PSLINELENGTH]; /* Temporary storage for text */ char *cp; int quoted=0; BEGINMESSAGE(ps_gettext) while (*line && (*line == ' ' || *line == '\t')) line++; cp = text; if (*line == '(') { int level = 0; quoted=1; line++; while (*line && !(*line == ')' && level == 0 )) { if (cp - text >= PSLINELENGTH - 1) break; if (*line == '\\') { if (*(line+1) == 'n') { *cp++ = '\n'; line += 2; } else if (*(line+1) == 'r') { *cp++ = '\r'; line += 2; } else if (*(line+1) == 't') { *cp++ = '\t'; line += 2; } else if (*(line+1) == 'b') { *cp++ = '\b'; line += 2; } else if (*(line+1) == 'f') { *cp++ = '\f'; line += 2; } else if (*(line+1) == '\\') { *cp++ = '\\'; line += 2; } else if (*(line+1) == '(') { *cp++ = '('; line += 2; } else if (*(line+1) == ')') { *cp++ = ')'; line += 2; } else if (*(line+1) >= '0' && *(line+1) <= '9') { if (*(line+2) >= '0' && *(line+2) <= '9') { if (*(line+3) >= '0' && *(line+3) <= '9') { *cp++ = ((*(line+1) - '0')*8 + *(line+2) - '0')*8 + *(line+3) - '0'; line += 4; } else { *cp++ = (*(line+1) - '0')*8 + *(line+2) - '0'; line += 3; } } else { *cp++ = *(line+1) - '0'; line += 2; } } else { line++; *cp++ = *line++; } } else if (*line == '(') { level++; *cp++ = *line++; } else if (*line == ')') { level--; *cp++ = *line++; } else { *cp++ = *line++; } } /* Delete trailing ')' */ if (*line) { line++; } } else { while (*line && !(*line == ' ' || *line == '\t' || *line == '\n')) { if (cp - text >= PSLINELENGTH - 2) break; *cp++ = *line++; } } *cp = '\0'; if (next_char) *next_char = line; if (!quoted && strlen(text) == 0) {ENDMESSAGE(ps_gettext) return NULL;} cp = (char *) malloc(strlen(text)+1); CHECK_MALLOCED(cp); strcpy(cp, text); ENDMESSAGE(ps_gettext) return cp; } /*----------------------------------------------------------*/ /* ps_io_init */ /*----------------------------------------------------------*/ #define FD_FILE (fd->file) #define FD_FILE_DESC (fd->file_desc) #define FD_FILEPOS (fd->filepos) #define FD_LINE_BEGIN (fd->line_begin) #define FD_LINE_END (fd->line_end) #define FD_LINE_LEN (fd->line_len) #define FD_LINE_TERMCHAR (fd->line_termchar) #define FD_BUF (fd->buf) #define FD_BUF_END (fd->buf_end) #define FD_BUF_SIZE (fd->buf_size) #define FD_STATUS (fd->status) #define FD_STATUS_OKAY 0 #define FD_STATUS_BUFTOOLARGE 1 #define FD_STATUS_NOMORECHARS 2 #define LINE_CHUNK_SIZE 4096 #define MAX_PS_IO_FGETCHARS_BUF_SIZE 57344 #define BREAK_PS_IO_FGETCHARS_BUF_SIZE 49152 static FileData ps_io_init(FILE *file) { FileData fd; Cardinal size = sizeof(FileDataStruct); BEGINMESSAGE(ps_io_init) fd = (FileData) XtMalloc(size); memset((void*) fd ,0,(size_t)size); rewind(file); FD_FILE = file; FD_FILE_DESC = fileno(file); FD_FILEPOS = GV_FTELL(file); FD_BUF_SIZE = (2*LINE_CHUNK_SIZE)+1; FD_BUF = XtMalloc(FD_BUF_SIZE); FD_BUF[0] = '\0'; ENDMESSAGE(ps_io_init) return(fd); } /*----------------------------------------------------------*/ /* ps_io_exit */ /*----------------------------------------------------------*/ static void ps_io_exit(FileData fd) { BEGINMESSAGE(ps_io_exit) XtFree(FD_BUF); XtFree((XtPointer)fd); ENDMESSAGE(ps_io_exit) } /*----------------------------------------------------------*/ /* ps_io_fseek */ /*----------------------------------------------------------*/ static int ps_io_fseek(FileData fd, gv_off_t offset) { int status; BEGINMESSAGE(ps_io_fseek) status=GV_FSEEK(FD_FILE,offset,SEEK_SET); FD_BUF_END = FD_LINE_BEGIN = FD_LINE_END = FD_LINE_LEN = 0; FD_FILEPOS = offset; FD_STATUS = FD_STATUS_OKAY; ENDMESSAGE(ps_io_fseek) return(status); } /*----------------------------------------------------------*/ /* ps_io_ftell */ /*----------------------------------------------------------*/ static gv_off_t ps_io_ftell(FileData fd) { BEGINMESSAGE(ps_io_ftell) IMESSAGE(FD_FILEPOS) ENDMESSAGE(ps_io_ftell) return(FD_FILEPOS); } /*----------------------------------------------------------*/ /* ps_io_fgetchars */ /*----------------------------------------------------------*/ #ifdef USE_MEMMOVE_CODE static void ps_memmove (char *d, const char *s, unsigned l) { if (s < d) for (s += l, d += l; l; --l) *--d = *--s; else if (s != d) for (; l; --l) *d++ = *s++; } #else # define ps_memmove memmove #endif static char * ps_io_fgetchars(FileData fd, int num) { char *eol=NULL,*tmp; size_t size_of_char = sizeof(char); BEGINMESSAGE(ps_io_fgetchars) if (FD_STATUS != FD_STATUS_OKAY) { INFMESSAGE(aborting since status not okay) ENDMESSAGE(ps_io_fgetchars) return(NULL); } FD_BUF[FD_LINE_END] = FD_LINE_TERMCHAR; /* restoring char previously exchanged against '\0' */ FD_LINE_BEGIN = FD_LINE_END; do { if (num<0) { /* reading whole line */ if (FD_BUF_END-FD_LINE_END) { /* strpbrk is faster but fails on lines with embedded NULLs eol = strpbrk(FD_BUF+FD_LINE_END,"\n\r"); */ tmp = FD_BUF + FD_BUF_END; eol = FD_BUF + FD_LINE_END; while (eol < tmp && *eol != '\n' && *eol != '\r') eol++; if (eol >= tmp) eol = NULL; if (eol) { if (*eol=='\r' && *(eol+1)=='\n') eol += 2; else eol++; break; } } } else { /* reading specified num of chars */ if (FD_BUF_END >= FD_LINE_BEGIN+num) { eol = FD_BUF+FD_LINE_BEGIN+num; break; } } INFMESSAGE(no end of line yet) if (FD_BUF_END - FD_LINE_BEGIN > BREAK_PS_IO_FGETCHARS_BUF_SIZE) { INFMESSAGE(breaking line artificially) eol = FD_BUF + FD_BUF_END - 1; break; } while (FD_BUF_SIZE < FD_BUF_END+LINE_CHUNK_SIZE+1) { if (FD_BUF_SIZE > MAX_PS_IO_FGETCHARS_BUF_SIZE) { /* we should never get here, since the line is broken artificially after BREAK_PS_IO_FGETCHARS_BUF_SIZE bytes. */ INFMESSAGE(buffer became to large) ENDMESSAGE(ps_io_fgetchars) fprintf(stderr, "gv: ps_io_fgetchars: Fatal Error: buffer became too large.\n"); clean_safe_tempdir(); exit(-1); } if (FD_LINE_BEGIN) { INFMESSAGE(moving line to begin of buffer) ps_memmove((void*)FD_BUF,(void*)(FD_BUF+FD_LINE_BEGIN), ((size_t)(FD_BUF_END-FD_LINE_BEGIN+1))*size_of_char); FD_BUF_END -= FD_LINE_BEGIN; FD_LINE_BEGIN = 0; } else { INFMESSAGE(enlarging buffer) /* FD_BUF_SIZE = FD_BUF_END+LINE_CHUNK_SIZE+1; */ FD_BUF_SIZE = FD_BUF_SIZE+LINE_CHUNK_SIZE+1; IMESSAGE(FD_BUF_SIZE) FD_BUF = XtRealloc(FD_BUF,FD_BUF_SIZE); } } FD_LINE_END = FD_BUF_END; /* read() seems to fail sometimes (? ? ?) so we always use fread ###jp###,07/31/96*/ FD_BUF_END += fread(FD_BUF+FD_BUF_END,size_of_char,LINE_CHUNK_SIZE,FD_FILE); FD_BUF[FD_BUF_END] = '\0'; if (FD_BUF_END-FD_LINE_END == 0) { INFMESSAGE(failed to read more chars) ENDMESSAGE(ps_io_fgetchars) FD_STATUS = FD_STATUS_NOMORECHARS; return(NULL); } } while (1); FD_LINE_END = eol - FD_BUF; FD_LINE_LEN = FD_LINE_END - FD_LINE_BEGIN; FD_LINE_TERMCHAR = FD_BUF[FD_LINE_END]; FD_BUF[FD_LINE_END] = '\0'; #ifdef USE_FTELL_FOR_FILEPOS if (FD_LINE_END==FD_BUF_END) { INFMESSAGE(### using ftell to get FD_FILEPOS) /* For VMS we cannot assume that the record is FD_LINE_LEN bytes long on the disk. For stream_lf and stream_cr that is true, but not for other formats, since VAXC/DECC converts the formatting into a single \n. eg. variable format files have a 2-byte length and padding to an even number of characters. So, we use ftell for each record. This still will not work if we need to fseek to a \n or \r inside a variable record (ftell always returns the start of the record in this case). (Tim Adye, adye@v2.rl.ac.uk) */ FD_FILEPOS = GV_FTELL(FD_FILE); } else #endif /* USE_FTELL_FOR_FILEPOS */ FD_FILEPOS += FD_LINE_LEN; ENDMESSAGE(ps_io_fgetchars) return(FD_BUF+FD_LINE_BEGIN); } /*----------------------------------------------------------*/ /* readline() Read the next line in the postscript file. Automatically skip over data (as indicated by %%BeginBinary/%%EndBinary or %%BeginData/%%EndData comments.) Also, skip over included documents (as indicated by %%BeginDocument/%%EndDocument comments.) */ /*----------------------------------------------------------*/ static char * readline(FileData fd, char **lineP, gv_off_t *positionP, unsigned int *line_lenP) { unsigned int nbytes=0; int skipped=0; int nesting_level=0; char *line; BEGINMESSAGE(readline) if (positionP) *positionP = FD_FILEPOS; line = ps_io_fgetchars(fd,-1); if (!line) { INFMESSAGE(could not get line) *line_lenP = 0; *lineP = empty_string; ENDMESSAGE(readline) return(NULL); } *line_lenP = FD_LINE_LEN; #define IS_COMMENT(comment) \ (DSCcomment(line) && iscomment(line+2,(comment))) #define IS_BEGIN(comment) \ (iscomment(line+7,(comment))) #define IS_END(comment) \ (iscomment(line+5,(comment))) #define SKIP_WHILE(cond) \ while (readline(fd, &line, NULL, &nbytes) && (cond)) *line_lenP += nbytes;\ skipped=1; #define SKIP_UNTIL_1(comment) { \ INFMESSAGE(skipping until comment) \ SKIP_WHILE((!IS_COMMENT(comment))) \ INFMESSAGE(completed skipping until comment) \ } #define SKIP_UNTIL_2(comment1,comment2) { \ INFMESSAGE(skipping until comment1 or comment2)\ SKIP_WHILE((!IS_COMMENT(comment1) && !IS_COMMENT(comment2)))\ INFMESSAGE(completed skipping until comment1 or comment2)\ } #if 0 if ((scanstyle&SCANSTYLE_MISSING_BEGINDOCUMENT) && (line[0] == '%') && (*line_lenP > 11) && (iscomment(line,"%!PS-Adobe-") || iscomment(line + 1,"%!PS-Adobe-"))) { char *c=line+11; while (*c && !isspace(*c)) c++; if (isspace(*c)) while (*c && isspace(*c)) c++; /* don't skip EPSF files */ printf("line in question: %s\n",line); if (strncmp(c,"EPSF",4)) { printf("skipping starts here: %s\n",line); SKIP_UNTIL_1("EOF") *line_lenP += nbytes; readline(fd, &line, NULL, &nbytes); printf("skipping ends here: %s\n",line); } } else #endif if (!IS_COMMENT("Begin")) {} /* Do nothing */ else if IS_BEGIN("Document:") { /* Skip the EPS without handling its content */ nesting_level=1; line = ps_io_fgetchars(fd,-1); if (line) *line_lenP += FD_LINE_LEN; while (line) { if (IS_COMMENT("Begin") && IS_BEGIN("Document:")) nesting_level++; else if (IS_COMMENT("End") && IS_END("Document")) nesting_level--; if (nesting_level == 0) break; line = ps_io_fgetchars(fd,-1); if (line) *line_lenP += FD_LINE_LEN; } } else if IS_BEGIN("Feature:") SKIP_UNTIL_1("EndFeature") #ifdef USE_ACROREAD_WORKAROUND else if IS_BEGIN("File") SKIP_UNTIL_2("EndFile","EOF") #else else if IS_BEGIN("File") SKIP_UNTIL_1("EndFile") #endif else if IS_BEGIN("Font") SKIP_UNTIL_1("EndFont") else if IS_BEGIN("ProcSet") SKIP_UNTIL_1("EndProcSet") else if IS_BEGIN("Resource") SKIP_UNTIL_1("EndResource") else if IS_BEGIN("Data:") { int num; char text[101]; INFMESSAGE(encountered "BeginData:") if (FD_LINE_LEN > 100) FD_BUF[100] = '\0'; text[0] = '\0'; if (sec_sscanf(line+length("%%BeginData:"), "%d %*s %100s", &num, text, 100) >= 1) { if (strcmp(text, "Lines") == 0) { INFIMESSAGE(number of lines to skip:,num) while (num) { line = ps_io_fgetchars(fd,-1); if (line) *line_lenP += FD_LINE_LEN; num--; } } else { int read_chunk_size = LINE_CHUNK_SIZE; INFIMESSAGE(number of chars to skip:,num) while (num>0) { if (num <= LINE_CHUNK_SIZE) read_chunk_size=num; line = ps_io_fgetchars(fd,read_chunk_size); if (line) *line_lenP += FD_LINE_LEN; num -= read_chunk_size; } } } SKIP_UNTIL_1("EndData") } else if IS_BEGIN("Binary:") { int num; INFMESSAGE(encountered "BeginBinary:") if (sec_sscanf(line+length("%%BeginBinary:"), "%d", &num) == 1) { int read_chunk_size = LINE_CHUNK_SIZE; INFIMESSAGE(number of chars to skip:,num) while (num>0) { if (num <= LINE_CHUNK_SIZE) read_chunk_size=num; line = ps_io_fgetchars(fd,read_chunk_size); if (line) *line_lenP += FD_LINE_LEN; num -= read_chunk_size; } SKIP_UNTIL_1("EndBinary") } } if (skipped) { INFMESSAGE(skipped lines) *line_lenP += nbytes; *lineP = skipped_line; } else { *lineP = FD_BUF+FD_LINE_BEGIN; } ENDMESSAGE(readline) return(FD_BUF+FD_LINE_BEGIN); } /*###########################################################*/ /* * pscopyuntil -- copy lines of Postscript from a section of one file * to another file until a particular comment is reached. * Automatically switch to binary copying whenever * %%BeginBinary/%%EndBinary or %%BeginData/%%EndData * comments are encountered. */ /*###########################################################*/ char * pscopyuntil(FileData fd, FILE *to, long begin, long end, char *comment) /* begin: set negative to avoid initial seek */ { char *line; int comment_length; BEGINMESSAGE(pscopyuntil) if (comment) { INFSMESSAGE(will copy until,comment) comment_length = strlen(comment); } else { INFMESSAGE(will copy until specified file position) comment_length = 0; } if (begin >= 0) ps_io_fseek(fd, begin); while (ps_io_ftell(fd) < end) { line = ps_io_fgetchars(fd,-1); if (!line) break; if (comment && strncmp(line, comment, comment_length) == 0) { char *cp = (char *) malloc(strlen(line)+1); INFSMESSAGE(encountered specified,comment) CHECK_MALLOCED(cp); strcpy(cp, line); ENDMESSAGE(pscopyuntil) return cp; } fputs(line, to); if (!IS_COMMENT("Begin")) {} /* Do nothing */ else if IS_BEGIN("Data:") { int num; char text[101]; INFMESSAGE(encountered "BeginData:") if (FD_LINE_LEN > 100) FD_BUF[100] = '\0'; text[0] = '\0'; if (sec_sscanf(line+length("%%BeginData:"), "%d %*s %100s", &num, text, 100) >= 1) { if (strcmp(text, "Lines") == 0) { INFIMESSAGE(number of lines:,num) while (num) { line = ps_io_fgetchars(fd,-1); if (line) fputs(line,to); num--; } } else { int read_chunk_size = LINE_CHUNK_SIZE; INFIMESSAGE(number of chars:,num) while (num>0) { if (num <= LINE_CHUNK_SIZE) read_chunk_size=num; line = ps_io_fgetchars(fd,read_chunk_size); if (line) fwrite(line,sizeof(char),FD_LINE_LEN, to); num -= read_chunk_size; } } } } else if IS_BEGIN("Binary:") { int num; INFMESSAGE(encountered "BeginBinary:") if (sec_sscanf(line+length("%%BeginBinary:"), "%d", &num) == 1) { int read_chunk_size = LINE_CHUNK_SIZE; INFIMESSAGE(number of chars:,num) while (num>0) { if (num <= LINE_CHUNK_SIZE) read_chunk_size=num; line = ps_io_fgetchars(fd,read_chunk_size); if (line) fwrite(line, sizeof (char),FD_LINE_LEN, to); num -= read_chunk_size; } } } } ENDMESSAGE(pscopyuntil) return NULL; } /*----------------------------------------------------------*/ /* blank */ /* Check whether the line contains nothing but white space. */ /*----------------------------------------------------------*/ static int blank(char *line) { char *cp = line; BEGINMESSAGE(blank) while (*cp == ' ' || *cp == '\t') cp++; ENDMESSAGE(blank) return *cp == '\n' || *cp== '\r' || (*cp == '%' && (line[0] != '%' || line[1] != '%')); } /*##########################################################*/ /* pscopydoc */ /* Copy the headers, marked pages, and trailer to fp */ /*##########################################################*/ void pscopydoc(FILE *dest_file, char *src_filename, Document d, char *pagelist) { FILE *src_file; char *comment; Boolean pages_written = False; Boolean pages_atend = False; int pages; int page = 1; int i, j; int here; FileData fd; char *p; BEGINMESSAGE(pscopydoc) INFSMESSAGE(copying from file, src_filename) src_file = fopen(src_filename, "r"); fd = ps_io_init(src_file); i=0; pages=0; while (pagelist[i]) { if (pagelist[i]=='*') pages++; i++; } INFIMESSAGE(number of pages to be copied,pages) here = d->beginheader; while ((comment=pscopyuntil(fd,dest_file,here,d->endheader,"%%Pages:"))) { SMESSAGE(comment) here = ps_io_ftell(fd); if (pages_written || pages_atend) { free(comment); continue; } p = firstword(comment + length("%%Pages:")); if (isword(p, "(atend)")) { fputs(comment, dest_file); pages_atend = True; } else { switch (sec_sscanf(p, "%*d %d", &i)) { case 1: fprintf(dest_file, "%%%%Pages: %d %d\n", pages, i); break; default: fprintf(dest_file, "%%%%Pages: %d\n", pages); break; } pages_written = True; } free(comment); } pscopyuntil(fd, dest_file, d->beginpreview, d->endpreview,NULL); pscopyuntil(fd, dest_file, d->begindefaults, d->enddefaults,NULL); pscopyuntil(fd, dest_file, d->beginprolog, d->endprolog,NULL); pscopyuntil(fd, dest_file, d->beginsetup, d->endsetup,NULL); for (i = 0; i < d->numpages; i++) { if (d->pageorder == DESCEND) j = (d->numpages - 1) - i; else j = i; if (pagelist[j]=='*') { comment = pscopyuntil(fd,dest_file,d->pages[i].begin,d->pages[i].end, "%%Page:"); fprintf(dest_file, "%%%%Page: %s %d\n",d->pages[i].label, page++); free(comment); pscopyuntil(fd, dest_file, -1, d->pages[i].end,NULL); } } here = d->begintrailer; while ((comment = pscopyuntil(fd, dest_file, here, d->endtrailer, "%%Pages:"))) { here = ps_io_ftell(fd); if (pages_written) { free(comment); continue; } switch (sec_sscanf(comment+length("%%Pages:"), "%*d %d", &i)) { case 1: fprintf(dest_file, "%%%%Pages: %d %d\n", pages, i); break; default: fprintf(dest_file, "%%%%Pages: %d\n", pages); break; } pages_written = True; free(comment); } fclose(src_file); ps_io_exit(fd); ENDMESSAGE(pscopydoc) } #undef length gv-3.7.4/src/gv-i18n.pl0000664000076400007640000000151011735103745011414 00000000000000#! /usr/bin/perl $src = "."; $src = $ARGV[0] if @ARGV == 1; open(LANGUAGES, '<', "$src/nls/LANGUAGES"); s!#.*!! for (@languages); @languages = ; %lang2 = (); for $lang (@languages) { chomp($lang); next if $lang =~ m/ -> /; next if $lang =~ m/^$/; $lang2 = $lang; $lang2 =~ s/[^a-zA-Z_0-9]/_/g; print "static String gv_nls_${lang2}_dat [] = {\n"; (system "$src/ad2c '$src/nls/$lang'.dat") == 0 or die "failed to process $src/nls/${lang}.dat" ; print "0};\n\n"; } print "static String* getI18N(char* locale)\n{\n"; for $lang (@languages) { next if $lang =~ m/^$/; $lang2 = $lang; $lang2 =~ s/^.* -> //g; $lang2 =~ s/[^a-zA-Z_0-9]/_/g; $lang3 = $lang; $lang3 =~ s/ -> .*$//g; print " if (!strcmp(locale, \"$lang3\")) return gv_nls_${lang2}_dat;\n"; } print " return 0;\n}\n"; gv-3.7.4/src/FileSel.h0000664000076400007640000000646711735103745011402 00000000000000/* ** ** FileSel.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _XawFileSelection_h #define _XawFileSelection_h #include INC_X11(Xfuncproto.h) #define XawFileSelectionRescan (1<<0) #define XawFileSelectionFilter (1<<1) #define XawFileSelectionDefaultScan (1<<2) #define XawFileSelectionDone (1<<3) #define XawFileSelectionCancel (1<<4) /* New Fields */ #define XtNreverseScrolling "reverseScrolling" #define XtCReverseScrolling "ReverseScrolling" #define XtNtmpDir "tmpDir" #define XtCTmpDir "TmpDir" #define XtNpath "path" #define XtCPath "Path" #define XtNfilter "filter" #define XtCFilter "Filter" #define XtNfilters "filters" #define XtCFilters "Filters" #define XtNdirs "dirs" #define XtCDirs "Dirs" #define XtNhighlightPixel "highlightPixel" #define XtCHighlightPixel "HighlightPixel" #define XtNbuttons "buttons" #define XtCButtons "Buttons" #define XtNpreferredButton "preferredButton" #define XtCPreferredButton "PreferredButton" /* Class record constant */ extern WidgetClass file_selectionWidgetClass; typedef struct _FileSelectionClassRec *FileSelectionWidgetClass; typedef struct _FileSelectionRec *FileSelectionWidget; /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- PUBLIC ROUTINES -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ _XFUNCPROTOBEGIN extern void XawFileSelectionSetPath ( Widget /* FileSelectionWidget */, String /* String to set */ ); extern char * XawFileSelectionGetPath ( Widget /* FileSelectionWidget */ ); extern void XawFileSelectionScan ( Widget /* FileSelectionWidget */, int /* indicates the scan mode */ ); extern void XawFileSelectionAddButton ( Widget /* FileSelectionWidget */, int /* indicates the desired button position */, XtCallbackProc /* callback for the button */, XtPointer /* callback parameter */ ); extern void XawFileSelectionRemoveButton ( Widget /* FileSelectionWidget */, int /* indicates the position of the button */ ); extern void XawFileSelectionPreferButton ( Widget /* FileSelectionWidget */, int /* indicates the position of the button */ ); _XFUNCPROTOEND #endif /* _FileSelection_h */ gv-3.7.4/src/Scrollbar.h0000664000076400007640000001050611736064614011771 00000000000000/* ** ** Scrollbar.h ** ** Copyright (C) 1994, 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _Scrollbar_h #define _Scrollbar_h #include "paths.h" #include INC_XMU(Converters.h) #include INC_X11(Xfuncproto.h) /**************************************************************** * * Scrollbar Widget * ****************************************************************/ /* Scrollbar resources: Name Class RepType Default Value ---- ----- ------- ------------- accelerators Accelerators AcceleratorTable NULL ancestorSensitive AncestorSensitive Boolean True background Background Pixel XtDefaultBackground backgroundPixmap Pixmap Pixmap XtUnspecifiedPixmap borderColor BorderColor Pixel XtDefaultForeground borderPixmap Pixmap Pixmap XtUnspecifiedPixmap borderWidth BorderWidth Dimension 1 colormap Colormap Colormap parent's colormap cursor Cursor Cursor None cursorName Cursor String NULL depth Depth int parent's depth destroyCallback Callback XtCallbackList NULL foreground Foreground Pixel XtDefaultForeground height Height Dimension length or thickness insensitiveBorder Insensitive Pixmap GreyPixmap jumpProc Callback XtCallbackList NULL length Length Dimension 1 mappedWhenManaged MappedWhenManaged Boolean True minimumThumb MinimumThumb Dimension 7 orientation Orientation XtOrientation XtorientVertical pointerColor Foreground Pixel XtDefaultForeground pointerColorBackground Background Pixel XtDefaultBackground screen Screen Screen parent's screen sensitive Sensitive Boolean True shown Shown Float 0.0 thickness Thickness Dimension 14 thumb Thumb Bitmap GreyPixmap thumbProc Callback XtCallbackList NULL topOfThumb TopOfThumb Float 0.0 translations Translations TranslationTable see source or doc width Width Dimension thickness or length x Position Position 0 y Position Position 0 */ /* * Most things we need are in StringDefs.h */ #define XtNminimumThumb "minimumThumb" #define XtCMinimumThumb "MinimumThumb" #define XtCShown "Shown" #define XtNtopOfThumb "topOfThumb" #define XtCTopOfThumb "TopOfThumb" #define XtNshowArrows "showArrows" #define XtCShowArrows "ShowArrows" #define XtNthumbTopIndent "thumbTopIndent" #define XtCThumbTopIndent "ThumbTopIndent" #define XtNthumbSideIndent "thumbSideIndent" #define XtCThumbSideIndent "ThumbSideIndent" #define XtNarrowSideIndent "arrowSideIndent" #define XtCArrowSideIndent "ArrowSideIndent" #define XtNarrowTopIndent "arrowTopIndent" #define XtCArrowTopIndent "ArrowTopIndent" #define XtNinterval "interval" /* #define XtCInterval "Interval" changed on 4.11.94 ###jp###*/ #define XtNdelay "delay" #define XtCDelay "Delay" #define XtNuseDynamic "useDynamic" #define XtCUseDynamic "UseDynamic" typedef struct _ScrollbarRec *ScrollbarWidget; typedef struct _ScrollbarClassRec *ScrollbarWidgetClass; #define _EXTERN_ extern _EXTERN_ WidgetClass scrollbarWidgetClass; #undef _EXTERN_ _XFUNCPROTOBEGIN extern void XawScrollbarSetThumb( Widget /* scrollbar */, #if NeedWidePrototypes double /* top */, double /* shown */ #else float /* top */, float /* shown */ #endif ); _XFUNCPROTOEND #endif /* _Scrollbar_h */ gv-3.7.4/src/note.h0000664000076400007640000000252711735103746011016 00000000000000/* ** ** note.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_NOTE_H_ #define _GV_NOTE_H_ extern void cb_popupNotePopup(Widget, XtPointer, XtPointer); extern void cb_popdownNotePopup(Widget, XtPointer, XtPointer); extern void makeNotePopup(void); extern void NotePopupShowMessage(String); #endif /* _GV_NOTE_H_ */ gv-3.7.4/src/doc_misc.c0000664000076400007640000003003411736064614011617 00000000000000/* ** ** doc_misc.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include #include #include #include "paths.h" #include INC_X11(Intrinsic.h) #include INC_XMU(CharSet.h) #include "Ghostview.h" #include "main_resources.h" #include "types.h" extern Media* gv_medias; #include "ps.h" #include "doc_misc.h" #include "resource.h" /*##################################################################*/ /* doc_scanFile */ /*##################################################################*/ int doc_scanFile(fPP,docP,filename,filename_raw,filename_dscP,cmd_scan_pdf,filename_uncP,cmd_uncompress,scanstyle,gv_gs_safeDir) FILE ** fPP; Document *docP; String filename; String filename_raw; String *filename_dscP; String cmd_scan_pdf; String *filename_uncP; String cmd_uncompress; int scanstyle; int gv_gs_safeDir; { Document d; int i,ret; BEGINMESSAGE(doc_scanFile) d = (Document)NULL; ret = 0; if (*fPP && filename) d = psscan(fPP,filename,filename_raw,filename_dscP,cmd_scan_pdf,filename_uncP,cmd_uncompress,scanstyle,gv_gs_safeDir); if (d) { d->labels_useful=0; d->structured =0; if ((!d->epsf && d->numpages>0) || (d->epsf && d->numpages>1)) { ret = d->structured = 1; if (d->numpages == 1) d->labels_useful=1; else for (i = 1; i < d->numpages; i++) if (strcmp(d->pages[i-1].label,d->pages[i].label)) { d->labels_useful = 1; break; } } } *docP = d; # ifdef MESSAGES if (!d) { INFMESSAGE(unsuccessful) } else { INFMESSAGE(successful) if (d->structured) { INFMESSAGE(structured) } else { INFMESSAGE(not structured) } if (d->labels_useful) { INFMESSAGE(labels useful) } else { INFMESSAGE(labels not useful) } } # endif ENDMESSAGE(doc_scanFile) return ret; } /*##################################################################*/ /* doc_putPageInRange */ /*##################################################################*/ int doc_putPageInRange(d,pagenumber) Document d; int pagenumber; { BEGINMESSAGE(doc_putPageInRange) if (d && d->structured) { if (pagenumber >= d->numpages) pagenumber = d->numpages-1; if (pagenumber < 0) pagenumber = 0; } else pagenumber = 0; ENDMESSAGE(doc_putPageInRange) return pagenumber; } /*############################################################*/ /* doc_mediaIsOk */ /*############################################################*/ int doc_mediaIsOk (d,pagenumber,m) Document d; int pagenumber; int m; { int r=1; int bbox = d ? d->nummedia : 0; BEGINMESSAGE(doc_mediaIsOk) if (m==bbox) { int l; if (doc_boundingBoxOfPage(d,pagenumber,&l,&l,&l,&l) == MEDIA_ID_INVALID) r = 0; } else if (m==MEDIA_ID_INVALID) r = 0; ENDMESSAGE(doc_mediaIsOk) return(r); } /*############################################################*/ /* doc_boundingBoxOfPage */ /*############################################################*/ int doc_boundingBoxOfPage(d,pagenumber,llxP,llyP,urxP,uryP) Document d; int pagenumber; int *llxP,*llyP,*urxP,*uryP; { int *dbb = NULL; int retry; BEGINMESSAGE(doc_boundingBoxOfPage) if (!d) { INFMESSAGE(no document) ENDMESSAGE(doc_preferredMediaOfPage) return(MEDIA_ID_INVALID); } retry=1; # define BB_VALID (dbb[URX]>dbb[LLX] && dbb[URY]>dbb[LLY]) if (d->structured && 0<=pagenumber && pagenumbernumpages) { dbb = d->pages[pagenumber].boundingbox; if BB_VALID retry=0; } if (retry && d->structured) { dbb = d->default_page_boundingbox; if BB_VALID retry=0; } if (retry) { dbb = d->boundingbox; if BB_VALID retry=0; } # undef BB_VALID if (!retry) { *llxP=dbb[LLX]; *llyP=dbb[LLY]; *urxP=dbb[URX]; *uryP=dbb[URY]; INFMESSAGE(bounding box) ENDMESSAGE(doc_boundingBoxOfPage) return(d->nummedia); } INFMESSAGE(MEDIA_ID_INVALID) ENDMESSAGE(doc_boundingBoxOfPage) return(MEDIA_ID_INVALID); } /*############################################################*/ /* doc_preferredMediaOfPage */ /*############################################################*/ int doc_preferredMediaOfPage(d,pagenumber,llxP,llyP,urxP,uryP) Document d; int pagenumber; int *llxP,*llyP,*urxP,*uryP; { # define BB_VALID (dbb[URX]>dbb[LLX] && dbb[URY]>dbb[LLY]) int *dbb = NULL; Media media = NULL,dm; int m=MEDIA_ID_INVALID; int found,i,j; BEGINMESSAGE(doc_preferredMediaOfPage) if (!d) { INFMESSAGE(no document) ENDMESSAGE(doc_preferredMediaOfPage) return(MEDIA_ID_INVALID); } found=0; if (!found && d->structured && 0<=pagenumber && pagenumbernumpages) { media = (Media) d->pages[pagenumber].media; if (media) found=1; } if (!found) { media = (Media) d->default_page_media; if (media) found=1; } if (d->structured && 0<=pagenumber && pagenumbernumpages) { dbb = d->pages[pagenumber].boundingbox; if BB_VALID found=-1; } if (!found && d->structured) { dbb = d->default_page_boundingbox; if BB_VALID found=-1; } if (!found) { dbb = d->boundingbox; if BB_VALID found=-1; } # undef BB_VALID /* try to map bounding box to standard or document pagemedia */ if (found==-1 && dbb[LLX]==0 && dbb[LLY]==0) { for (dm=(Media) d->media,i=0; !media && inummedia; i++,dm++) if (dm->used && ((dm->width==dbb[URX] || dm->width+1==dbb[URX]) && (dm->height==dbb[URY] || dm->height+1==dbb[URY]))) media=dm; for (j=0; gv_medias[j] && !media ; j++) { dm = gv_medias[j]; if (dm->used==1 && ((dm->width==dbb[URX] || dm->width+1==dbb[URX]) && (dm->height==dbb[URY] || dm->height+1==dbb[URY]))) media=dm; } if (media) found=1; } if (found==-1) { *llxP=dbb[LLX]; *llyP=dbb[LLY]; *urxP=dbb[URX]; *uryP=dbb[URY]; INFMESSAGE(bounding box) m=d->nummedia; } else if (found==1) { for (dm=(Media)d->media,i=0; inummedia; i++,dm++) if (media==dm) { m = i; break; } if (m==MEDIA_ID_INVALID) for (i=0; gv_medias[i] ; i++) if (media==gv_medias[i]) { m = i+d->nummedia; break; } if (m!=MEDIA_ID_INVALID) { INFIMESSAGE(doc prefers media,m) *llxP=*llyP=0; *urxP=media->width-1; *uryP=media->height-1; } } INFIMESSAGE(returning media number,m) ENDMESSAGE(doc_preferredMediaOfPage) return(m); } /*##################################################################*/ /* doc_preferredOrientationOfPage */ /*##################################################################*/ int doc_preferredOrientationOfPage(d,page) Document d; int page; { int o; BEGINMESSAGE(doc_preferredOrientationOfPage) o = O_UNSPECIFIED; if (d) { if (d->structured && 0<=page && pagenumpages && d->pages[page].orientation != O_UNSPECIFIED) o = d->pages[page].orientation; else if (d->default_page_orientation != O_UNSPECIFIED) o = d->default_page_orientation; else if (d->orientation != O_UNSPECIFIED) o = d->orientation; } ENDMESSAGE(doc_preferredOrientationOfPage) return(o); } /*############################################################*/ /* doc_convStringToPage */ /*############################################################*/ int doc_convStringToPage(d,pageLabel) Document d; String pageLabel; { int i,j; int page; BEGINMESSAGE(doc_convStringToPage) page=-1; if (pageLabel && d && d->labels_useful) for (i=0; inumpages; i++) { if (d->pageorder == DESCEND) j = d->numpages-1-i; else j = i; if (!strcmp(pageLabel,d->pages[j].label)) { page=i; break; } } INFMESSAGE(1) if (page<0 && pageLabel) page=atoi(pageLabel)-1; if (page<0) page=0; IMESSAGE(page) ENDMESSAGE(doc_convStringToPage) return(page); } /*############################################################*/ /* doc_convDocOrientToXtOrient */ /*############################################################*/ XtPageOrientation doc_convDocOrientToXtOrient(orientation,swapLandscape) int orientation; int swapLandscape; { XtPageOrientation ret; BEGINMESSAGE(doc_convDocOrientToXtOrient) switch (orientation) { case O_PORTRAIT: INFMESSAGE(portrait) ret= XtPageOrientationPortrait; break; case O_UPSIDEDOWN: INFMESSAGE(upsidedown) ret = XtPageOrientationUpsideDown; break; case O_LANDSCAPE: if (swapLandscape) {INFMESSAGE(seascape) ret = XtPageOrientationSeascape; } else {INFMESSAGE(landscape) ret = XtPageOrientationLandscape;} break; case O_SEASCAPE: if (swapLandscape) {INFMESSAGE(landscape)ret = XtPageOrientationLandscape;} else {INFMESSAGE(seascape)ret = XtPageOrientationSeascape;} break; case O_UNSPECIFIED: INFMESSAGE(unspecified) ret = XtPageOrientationUnspecified; break; default: INFMESSAGE(doc_convDocOrientToXtOrient: unknown orientation) ret = XtPageOrientationUnspecified; break; } ENDMESSAGE(doc_convDocOrientToXtOrient) return ret; } /*############################################################*/ /* doc_convStringToDocOrient */ /*############################################################*/ int doc_convStringToDocOrient(ostr) String ostr; { int o=O_PORTRAIT; BEGINMESSAGE(doc_convStringToDocOrient) if (ostr) { SMESSAGE(ostr) # define IS_STR(aaa,bbb) (!XmuCompareISOLatin1(aaa,bbb)) if IS_STR(ostr,"Automatic") { INFMESSAGE(is O_AUTOMATIC) o = O_AUTOMATIC; } else if IS_STR(ostr,"Portrait") { INFMESSAGE(is O_PORTRAIT) o = O_PORTRAIT; } else if IS_STR(ostr,"Landscape") { INFMESSAGE(is O_LANDSCAPE) o = O_LANDSCAPE; } else if IS_STR(ostr,"Seascape") { INFMESSAGE(is O_SEASCAPE) o = O_SEASCAPE; } else if IS_STR(ostr,"Upside-Down") { INFMESSAGE(is O_UPSIDEDOWN) o = O_UPSIDEDOWN; } else if IS_STR(ostr,"Swap-Landscape") { INFMESSAGE(is O_SWAP_LANDSCAPE) o = O_SWAP_LANDSCAPE; } # undef IS_STR } ENDMESSAGE(doc_convStringToDocOrient) return o; } /*############################################################*/ /* doc_convStringToPageMedia */ /*############################################################*/ int doc_convStringToPageMedia(d,mstr) Document d; String mstr; { int media = MEDIA_ID_INVALID; int i; BEGINMESSAGE(doc_convStringToPageMedia) /*### automatic pagemedia evaluation */ if (!XmuCompareISOLatin1(mstr,"Automatic")) media = MEDIA_ID_AUTO; /*### document pagemedia */ if (media==MEDIA_ID_INVALID && d && d->nummedia) { for (i = 0; inummedia; i++) if (!XmuCompareISOLatin1(mstr,d->media[i].name)) media = i; } /*### standard pagemedia */ if (media==MEDIA_ID_INVALID) { int num_doc_papersizes=0; if (d) num_doc_papersizes = d->nummedia; for (i=0; gv_medias[i]; i++) if (gv_medias[i]->used && !XmuCompareISOLatin1(mstr,gv_medias[i]->name)) media = num_doc_papersizes+i; } IMESSAGE(media) ENDMESSAGE(doc_convStringToPageMedia) return media; } gv-3.7.4/src/GhostviewP.h0000664000076400007640000001015411735103745012142 00000000000000/* * ghostviewp.h -- Private header file for Ghostview widget. * Copyright (C) 1992 Timothy O. Theisen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GNU gv; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Tim Theisen Systems Programmer * Internet: tim@cs.wisc.edu Department of Computer Sciences * UUCP: uwvax!tim University of Wisconsin-Madison * Phone: (608)262-0438 1210 West Dayton Street * FAX: (608)262-9777 Madison, WI 53706 */ #ifndef _GhostviewP_h #define _GhostviewP_h #include "paths.h" #include "Ghostview.h" #include INC_XMU(Atoms.h) #include INC_XMU(CharSet.h) #include typedef struct { AtomPtr ghostview; AtomPtr gv_colors; AtomPtr next; AtomPtr page; AtomPtr done; } GhostviewClassPart; typedef struct _GhostviewClassRec { CoreClassPart core_class; GhostviewClassPart ghostview_class; } GhostviewClassRec; extern GhostviewClassRec ghostviewClassRec; /* structure to describe section of file to send to ghostscript */ struct record_list { FILE *fp; gv_off_t begin; gv_off_t len; Boolean seek_needed; Boolean close; struct record_list *next; }; typedef struct { /* resources */ Pixel foreground; Cursor cursor; Cursor busy_cursor; Cursor scroll_cursor; int cursor_type; XtCallbackList callback; XtCallbackList message_callback; XtCallbackList output_callback; String interpreter; Boolean quiet; int infoVerbose; Boolean safeDir; int xinerama; Boolean safer; Boolean use_bpixmap; String arguments; String filename; XtPageOrientation orientation; XtPalette palette; float xdpi; float ydpi; long lxdpi; /* use lxdi,lydpi for setting resolution resource */ long lydpi; /* and propagate it to xdpi,ydpi in "SetValues". */ int llx; int lly; int urx; int ury; int left_margin; int bottom_margin; int right_margin; int top_margin; #if 0 Pixel highlight_pixel; #endif /* private state */ GC highlight_gc; GC gc; /* GC used to clear window */ Window mwin; /* destination of ghostsript messages */ Boolean disable_start; /* whether to fork ghostscript */ int interpreter_pid;/* pid of ghostscript, -1 if none */ struct record_list *ps_input; /* pointer it gs input queue */ char *input_buffer; /* pointer to input buffer */ gv_off_t bytes_left; /* bytes left in section */ char *input_buffer_ptr; /* pointer into input buffer */ unsigned int buffer_bytes_left; /* bytes left in buffer */ int interpreter_input; /* fd gs stdin, -1 if None */ int interpreter_output; /* fd gs stdout, -1 if None */ int interpreter_error; /* fd gs stderr, -1 if None */ XtInputId interpreter_input_id; /* XtInputId for above */ XtInputId interpreter_output_id; /* XtInputId for above */ XtInputId interpreter_error_id; /* XtInputId for above */ Dimension gs_width; /* Width of window at last Setup() */ Dimension gs_height; /* Height of window at last Setup() */ Boolean busy; /* Is gs busy drawing? */ Boolean changed; /* something changed since Setup()? */ Dimension pref_width; /*#test#*/ Dimension pref_height; int background_cleared; } GhostviewPart; typedef struct _GhostviewRec { CorePart core; GhostviewPart ghostview; } GhostviewRec; #endif /* _GhostviewP_h */ gv-3.7.4/src/popup.h0000664000076400007640000000272011735103746011207 00000000000000/* ** ** popup.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_POPUP_H_ extern void cb_popupPopup(Widget, XtPointer, XtPointer); extern void cb_popdownPopup(Widget, XtPointer, XtPointer); extern void popup_positionPopup (Widget, Widget, int, int, int); #define POPUP_POSITION_POS 1 #define POPUP_POSITION_CENTER 2 #define POPUP_POSITION_POS_CENTER 3 #define POPUP_POSITION_POS_NW 4 #define _GV_POPUP_H_ #endif /* _GV_POPUP_H_ */ gv-3.7.4/src/magmenu.h0000664000076400007640000000253011735103745011473 00000000000000/* ** ** magmenu.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_MAGMENU_H_ #define _GV_MAGMENU_H_ extern MagMenuEntry *magmenu_parseMagMenuEntries (char *); extern void magmenu_freeMagMenuEntries (MagMenuEntry*); extern void magmenu_a_magMenu (Widget, XEvent *, String *, Cardinal *); #endif /* _GV_MAGMENU_H_ */ gv-3.7.4/src/zoom.c0000664000076400007640000002222011735103746011020 00000000000000/* ** ** zoom.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include # include # include #include "paths.h" #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_X11(Shell.h) #include INC_XAW(Cardinals.h) #include "Aaa.h" #include "Button.h" #include "Clip.h" #include "Frame.h" #include "Ghostview.h" #include "types.h" #include "config.h" #include "callbacks.h" #include "ps.h" #include "doc_misc.h" #include "main_resources.h" #include "main_globals.h" #include "popup.h" #include "widgets_misc.h" #include "zoom.h" static char* zoom_popup = "zoomPopup"; static char* zoom_control = "zoomControl"; static char* zoom_page = "page"; static char* zoom_dismiss = "dismiss"; #if 0 static char* zoom_redisplay = "redisplay"; #endif /*##################################################################*/ /* zoom_createZoom */ /* popup zoom window */ /*##################################################################*/ void zoom_createZoom(Widget w _GL_UNUSED, XtPointer call_data) { Arg args[25]; Cardinal n; struct stat sbuf; GhostviewReturnStruct *p = (GhostviewReturnStruct *)call_data; Boolean b; int llx; int lly; int urx; int ury; int bottom_margin; int left_margin; int right_margin; int top_margin; int i; XtPageOrientation xto; Widget zshell,zcontrol,zviewFrame,zviewClip,zviewControl,zpage,zdismiss; FILE *zoomfile; char *filename; BEGINMESSAGE(zoom_createZoom) if (!(gv_psfile != NULL || (gv_gs_arguments && *gv_gs_arguments))) { INFMESSAGE(no file) ENDMESSAGE(zoom_createZoom) return; } if (strcmp(gv_filename, "-")) { stat(gv_filename, &sbuf); if (mtime != sbuf.st_mtime) { INFMESSAGE1(file has changed) ENDMESSAGE1(zoom_createZoom)return; } } filename = (gv_filename_dsc ? gv_filename_dsc : (gv_filename_unc ? gv_filename_unc : gv_filename)); llx = p->psx; lly = p->psy; urx = p->psx + p->width - 1; if (urxpsy + p->height - 1; if (urywidth; } if (lly < current_lly) { lly = current_lly; ury = lly + p->height; } if (urx > current_urx) { urx = current_urx; llx = urx - p->width; } if (ury > current_ury) { ury = current_ury; lly = ury - p->height; } if (llx < current_llx) llx = current_llx; if (lly < current_lly) lly = current_lly; bottom_margin = lly - current_lly; left_margin = llx - current_llx; right_margin = current_urx - urx; top_margin = current_ury - ury; n=0; XtSetArg(args[n], XtNminWidth, 70); n++; XtSetArg(args[n], XtNminHeight, 70); n++; XtSetArg(args[n], XtNallowShellResize, True); n++; zshell = XtCreatePopupShell(zoom_popup, topLevelShellWidgetClass,toplevel,args,n); n=0; XtSetArg(args[n], XtNminimumWidth, 70); n++; XtSetArg(args[n], XtNminimumHeight,70); n++; zcontrol = XtCreateManagedWidget(zoom_control,aaaWidgetClass,zshell,args,n); n=0; zviewFrame = XtCreateManagedWidget("zviewFrame", frameWidgetClass,zcontrol,args,n); n=0; zviewClip = XtCreateManagedWidget("zviewClip", clipWidgetClass,zviewFrame,args,n); XtAddCallback(zviewClip, XtNreportCallback,cb_pageAdjustNotify,(XtPointer)NULL); n=0; zviewControl = XtCreateManagedWidget("zviewControl", aaaWidgetClass,zviewClip,args,n); xto = doc_convDocOrientToXtOrient(gv_orientation, gv_swap_landscape ); n=0; XtSetArg(args[n], XtNorientation,xto); n++; XtSetArg(args[n], XtNllx, llx); n++; XtSetArg(args[n], XtNlly, lly); n++; XtSetArg(args[n], XtNurx, urx); n++; XtSetArg(args[n], XtNury, ury); n++; XtSetArg(args[n], XtNbottomMargin, bottom_margin); n++; XtSetArg(args[n], XtNleftMargin, left_margin); n++; XtSetArg(args[n], XtNrightMargin, right_margin); n++; XtSetArg(args[n], XtNtopMargin, top_margin); n++; XtSetArg(args[n], XtNbottomMargin, bottom_margin); n++; XtSetArg(args[n], XtNlxdpi, (1000*p->xdpi)); n++; XtSetArg(args[n], XtNlydpi, (1000*p->ydpi)); n++; XtSetArg(args[n], XtNinterpreter,gv_gs_interpreter); n++; b = gv_gs_safeDir ? True : False; XtSetArg(args[n], XtNsafeDir,b); n++; b = gv_gs_safer ? True : False; XtSetArg(args[n], XtNsafer,b); n++; b = gv_gs_quiet ? True : False; XtSetArg(args[n], XtNquiet,b); n++; b = app_res.use_bpixmap ? True : False; XtSetArg(args[n], XtNuseBackingPixmap,b); n++; XtSetArg(args[n], XtNarguments,gv_gs_arguments); n++; if (!toc_text) { XtSetArg(args[n], XtNfilename, filename); n++; } zpage = XtCreateManagedWidget(zoom_page, ghostviewWidgetClass,zviewControl, args, n); num_ghosts++; XtAddCallback(zpage, XtNcallback, cb_track, (XtPointer)NULL); XtAddCallback(zpage, XtNmessageCallback, cb_message, (XtPointer)zpage); XtAddCallback(zpage, XtNdestroyCallback, cb_destroyGhost,(XtPointer)zpage); n=0; zdismiss = XtCreateManagedWidget(zoom_dismiss, buttonWidgetClass,zcontrol, args, n); XtAddCallback(zdismiss, XtNcallback,cb_destroy,(XtPointer)zshell); XtInstallAccelerators(zcontrol, zdismiss); XtRealizeWidget(zshell); { Dimension page_width,page_height; INFMESSAGE(adjusting size) n=0; XtSetArg(args[n], XtNpreferredWidth, &page_width); n++; XtSetArg(args[n], XtNpreferredHeight, &page_height); n++; XtGetValues(zpage, args, n); IIMESSAGE(page_width,page_height) n=0; XtSetArg(args[n], XtNwidth, page_width); n++; XtSetArg(args[n], XtNheight, page_height); n++; XtSetValues(zpage, args, n); } XtInstallAccelerators(zcontrol,zdismiss); widgets_preferButton(zdismiss,1); { GhostviewReturnStruct rs; INFMESSAGE(positioning zoom popup) IIMESSAGE(llx,lly) IIMESSAGE(urx,ury) GhostviewGetAreaOfBB(page,llx,lly,urx,ury,&rs); popup_positionPopup( zshell,page,POPUP_POSITION_POS_CENTER, ((int)(rs.psx)+(int)(rs.width/2)), ((int)(rs.psy)+(int)(rs.height/2)) ); } GhostviewSetup(zpage); cb_positionPage(zpage,(XtPointer)1,(XtPointer)NULL); XSetWMProtocols(gv_display, XtWindow(zshell), &wm_delete_window, 1); XtPopup(zshell, XtGrabNone); if (toc_text) { if (!filename) { zoomfile = NULL; } else if (strcmp(filename, "-")) { zoomfile = fopen(filename, "r"); } else { zoomfile = stdin; } if (zoomfile == NULL) { ENDMESSAGE(zoom_createZoom) return; } GhostviewEnableInterpreter(zpage); GhostviewSendPS(zpage, zoomfile, doc->beginprolog, doc->lenprolog, False); GhostviewSendPS(zpage, zoomfile, doc->beginsetup, doc->lensetup, False); if (doc->pageorder == DESCEND) i = (doc->numpages - 1) - current_page; else i = current_page; GhostviewSendPS(zpage, zoomfile, doc->pages[i].begin, doc->pages[i].len, True); } else GhostviewEnableInterpreter(zpage); ENDMESSAGE(zoom_createZoom) } #if 0 n=0; zredisplay = XtCreateManagedWidget(zoom_redisplay, buttonWidgetClass,zcontrol, args, n); if (toc_text) { INFMESSAGE(have useful toc) XtAddCallback(zredisplay, XtNcallback, cb_redisplay, (XtPointer)current_page); } else { INFMESSAGE(doc frame does not have useful toc) XtAddCallback(zredisplay, XtNcallback, cb_redisplay, (XtPointer)0); } #endif gv-3.7.4/src/Clip.c0000664000076400007640000004324611735103745010735 00000000000000/* ** ** Clip.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Authors: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include "paths.h" #include INC_X11(IntrinsicP.h) #include INC_X11(StringDefs.h) #include INC_XAW(XawInit.h) #include INC_XMU(Misc.h) #include "ClipP.h" #include #define CW_CORE cw->core #define CW_CLIP cw->clip #define CW_COMPOSITE cw->composite #define CW_RESIZE CW_CLIP.resize #define CW_CHILD_NAT_WIDTH CW_CLIP.child_width_nat #define CW_CHILD_NAT_HEIGHT CW_CLIP.child_height_nat #define CW_CHILD_NAT_X CW_CLIP.child_x_nat #define CW_CHILD_NAT_Y CW_CLIP.child_y_nat #define CW_CHILD_NAT_BORDER CW_CLIP.child_border_nat #define CW_CHILD_P CW_COMPOSITE.children #define CW_CHILD (CW_COMPOSITE.children[0]) /* * resources for the clip */ static XtResource resources[] = { #define poff(field) XtOffsetOf(ClipRec, clip.field) { XtNreportCallback, XtCReportCallback, XtRCallback, sizeof(XtPointer), poff(report_callbacks), XtRCallback, (XtPointer) NULL }, #if 0 { XtNchildX, XtCChildX, XtRInt, sizeof(int), poff(child_x), XtRImmediate, (XtPointer) 0 }, { XtNchildY, XtCChildY, XtRInt, sizeof(int), poff(child_y), XtRImmediate, (XtPointer) 0 }, #endif #undef poff }; /* * widget class methods used below */ static void InsertChild(Widget); static void Initialize(Widget,Widget,ArgList,Cardinal*); #if 0 static Boolean SetValues(); #endif static void Realize(Widget,XtValueMask*,XSetWindowAttributes*); /* set gravity and upcall */ static void Resize(Widget); /* report new size */ static XtGeometryResult GeometryManager(Widget,XtWidgetGeometry*,XtWidgetGeometry*); /* deal with child requests */ static void ChangeManaged(Widget); /* somebody added a new widget */ static XtGeometryResult QueryGeometry(Widget,XtWidgetGeometry*,XtWidgetGeometry*); /* say how big would like to be */ static XtGeometryResult LayoutClip(ClipWidget); #define SuperClass ((CompositeWidgetClass)&compositeClassRec) ClipClassRec clipClassRec = { { /* core fields */ /* superclass */ (WidgetClass)SuperClass, /* class_name */ "Clip", /* widget_size */ sizeof(ClipRec), /* class_initialize */ XawInitializeWidgetSet, /* class_part_initialize */ NULL, /* class_inited */ FALSE, /* initialize */ Initialize, /* initialize_hook */ NULL, /* realize */ Realize, /* actions */ NULL, /* num_actions */ 0, /* resources */ resources, /* num_resources */ XtNumber(resources), /* xrm_class */ NULLQUARK, /* compress_motion */ TRUE, /* compress_exposure */ TRUE, /* compress_enterleave */ TRUE, /* visible_interest */ FALSE, /* destroy */ NULL, /* resize */ Resize, /* expose */ NULL, /* set_values */ NULL, /* set_values_hook */ NULL, /* set_values_almost */ XtInheritSetValuesAlmost, /* get_values_hook */ NULL, /* accept_focus */ NULL, /* version */ XtVersion, /* callback_private */ NULL, /* tm_table */ NULL, /* query_geometry */ QueryGeometry, /* display_accelerator */ XtInheritDisplayAccelerator, /* extension */ NULL }, { /* composite fields */ /* geometry_manager */ GeometryManager, /* change_managed */ ChangeManaged, /* insert_child */ InsertChild, /* delete_child */ XtInheritDeleteChild, /* extension */ NULL }, { /* clip fields */ /* ignore */ 0 } }; WidgetClass clipWidgetClass = (WidgetClass) &clipClassRec; /***************************************************************************** * * * utility routines * * * *****************************************************************************/ /*---------------------------------------------------*/ /* SendReport */ /*---------------------------------------------------*/ static void SendReport (ClipWidget cw, unsigned int changed) { Widget child = CW_CHILD; BEGINMESSAGE(SendReport) if (cw->clip.report_callbacks && child) { XawPannerReport prep; prep.changed = changed; prep.slider_x = -child->core.x; /* clip is "inner" */ prep.slider_y = -child->core.y; /* child is outer since it is larger */ prep.slider_width = cw->core.width; prep.slider_height = cw->core.height; prep.canvas_width = child->core.width; prep.canvas_height = child->core.height; IIMESSAGE(prep.slider_x,prep.slider_y) XtCallCallbackList ((Widget)cw, cw->clip.report_callbacks,(XtPointer) &prep); } ENDMESSAGE(SendReport) } /***************************************************************************** * * * Clip Widget Class Methods * * * *****************************************************************************/ static void Realize (gw, valueMask, attributes) register Widget gw; Mask *valueMask; XSetWindowAttributes *attributes; { BEGINMESSAGE(Realize) SMESSAGE(XtName(gw)) attributes->bit_gravity = NorthWestGravity; *valueMask |= CWBitGravity; if (gw->core.width < 1) gw->core.width = 1; if (gw->core.height < 1) gw->core.height = 1; (*clipWidgetClass->core_class.superclass->core_class.realize) (gw, valueMask, attributes); ENDMESSAGE(Realize) } /*---------------------------------------------------*/ /* Initialize */ /*---------------------------------------------------*/ static void Initialize(Widget request _GL_UNUSED, Widget new, ArgList args _GL_UNUSED, Cardinal *num_args _GL_UNUSED) { ClipWidget cw = (ClipWidget) new; BEGINMESSAGE(Initialize) SMESSAGE(XtName(new)) if (CW_CORE.width == 0) CW_CORE.width = 1; if (CW_CORE.height == 0) CW_CORE.height = 1; CW_CHILD_NAT_WIDTH = CW_CHILD_NAT_HEIGHT = CW_CHILD_NAT_BORDER = CW_CHILD_NAT_X = CW_CHILD_NAT_Y = 0; ENDMESSAGE(Initialize) } #if 0 /*---------------------------------------------------*/ /* SetValues */ /*---------------------------------------------------*/ static Boolean SetValues(current, request, new) Widget current, request, new; { ClipWidget cw = (ClipWidget) new; ClipWidget cc = (ClipWidget) current; if (cw->clip.child_x != cc->clip.child_x || cw->clip.child_y != cc->clip.child_y) { ClipWidgetSetCoordinates(new,cw->clip.child_x,cw->clip.child_y); } return(False); } #endif /*---------------------------------------------------*/ /* Resize */ /*---------------------------------------------------*/ static void Resize (Widget w) { ClipWidget cw = (ClipWidget) w; Widget child = CW_CHILD; BEGINMESSAGE(Resize) SMESSAGE(XtName(w)) if (child) { Position minx, miny; Position x = CW_CHILD_NAT_X; Position y = CW_CHILD_NAT_Y; Dimension width = CW_CHILD_NAT_WIDTH; Dimension height = CW_CHILD_NAT_HEIGHT; INFIIMESSAGE(size of clip,cw->core.width,cw->core.height) INFIIMESSAGE(current size of child,width,height) if (width < cw->core.width) width = cw->core.width; if (height < cw->core.height) height = cw->core.height; minx = ((Position) cw->core.width) - ((Position) width); miny = ((Position) cw->core.height) - ((Position) height); if (x < minx) x = minx; if (y < miny) y = miny; if (x > 0) x = 0; if (y > 0) y = 0; INFIIMESSAGE(resizing child to,width,height) XtConfigureWidget (CW_CHILD, x, y, width, height, (Dimension) 0); } SendReport (cw, (unsigned int) (XawPRCanvasWidth | XawPRCanvasHeight)); ENDMESSAGE(Resize) } /*---------------------------------------------------*/ /* GetDesiredSizeOfChild */ /*---------------------------------------------------*/ static void GetDesiredSizeOfChild(Widget child) { ClipWidget cw; XtWidgetGeometry desired; BEGINMESSAGE(GetDesiredSizeOfChild) cw = (ClipWidget) XtParent(child); XtQueryGeometry (child, (XtWidgetGeometry *)NULL, &desired); CW_CHILD_NAT_BORDER = desired.border_width; CW_CHILD_NAT_WIDTH = desired.width; CW_CHILD_NAT_HEIGHT = desired.height; CW_CHILD_NAT_X = desired.x; CW_CHILD_NAT_Y = desired.y; IIMESSAGE(CW_CHILD_NAT_WIDTH,CW_CHILD_NAT_HEIGHT) IMESSAGE(CW_CHILD_NAT_BORDER) ENDMESSAGE(GetDesiredSizeOfChild) } /*---------------------------------------------------*/ /* InsertChild */ /*---------------------------------------------------*/ static void InsertChild(Widget child) { BEGINMESSAGE(InsertChild) SMESSAGE(XtName(child)) (*SuperClass->composite_class.insert_child) (child); GetDesiredSizeOfChild(child); ENDMESSAGE(InsertChild) } /*---------------------------------------------------*/ /* GetNaturalSize */ /*---------------------------------------------------*/ static void GetNaturalSize(ClipWidget cw, Dimension *wP, Dimension *hP) { BEGINMESSAGE(GetNaturalSize) *wP = CW_CHILD_NAT_WIDTH; *hP = CW_CHILD_NAT_HEIGHT; ENDMESSAGE(GetNaturalSize) } /*---------------------------------------------------*/ /* QueryGeometry */ /*---------------------------------------------------*/ static XtGeometryResult QueryGeometry(Widget w, XtWidgetGeometry *request, XtWidgetGeometry *preferred_return) { ClipWidget cw = (ClipWidget)w; Dimension nw,nh; BEGINMESSAGE(QueryGeometry) SMESSAGE(XtName(w)) if (CW_CHILD_P && CW_CHILD) GetDesiredSizeOfChild(CW_CHILD); GetNaturalSize(cw,&nw,&nh); preferred_return->request_mode = (CWWidth|CWHeight); preferred_return->width = nw; preferred_return->height = nh; if ( !(request->request_mode & CWWidth) || !(request->request_mode & CWHeight) || ((request->request_mode & CWWidth) && nw != request->width) || ((request->request_mode & CWHeight) && nh != request->height) ) { INFMESSAGE(XtGeometryAlmost) ENDMESSAGE(QueryGeometry) return XtGeometryAlmost; } if ((nw == w->core.width) && (nh == w->core.height)) { INFMESSAGE(XtGeometryNo) ENDMESSAGE(QueryGeometry) return XtGeometryNo; } INFMESSAGE(XtGeometryYes) ENDMESSAGE(QueryGeometry) return XtGeometryYes; } /*---------------------------------------------------*/ /* GeometryManager */ /*---------------------------------------------------*/ #define IS_REQUEST(fff) (request->request_mode & fff) static XtGeometryResult GeometryManager(Widget child, XtWidgetGeometry *request, XtWidgetGeometry *geometry_return _GL_UNUSED) { ClipWidget cw; XtGeometryResult answer; int changed; BEGINMESSAGE(GeometryManager) INFSMESSAGE(received request from child, XtName(child)) if (!(request->request_mode & (CWWidth | CWHeight | CWBorderWidth))) { INFMESSAGE(request not of interest) ENDMESSAGE(GeometryManager) return XtGeometryYes; } if (request->request_mode & XtCWQueryOnly) { /* query requests are not properly implemented ... ###jp### */ INFMESSAGE(request is query only and will be denied) ENDMESSAGE(GeometryManager) return XtGeometryNo; } INFIIMESSAGE(current size of child:,child->core.width,child->core.height) cw = (ClipWidget) XtParent(child); changed = 0; if (IS_REQUEST(CWBorderWidth)) { IIMESSAGE(request->border_width,child->core.border_width) CW_CHILD_NAT_BORDER = request->border_width; if (CW_CHILD_NAT_BORDER != child->core.border_width) changed = 1; } if (IS_REQUEST(CWWidth)) { IIMESSAGE(request->width,child->core.width) CW_CHILD_NAT_WIDTH = request->width; if (CW_CHILD_NAT_WIDTH != child->core.width) changed = 1; } if (IS_REQUEST(CWHeight)) { IIMESSAGE(request->height,child->core.height) CW_CHILD_NAT_HEIGHT = request->height; if (CW_CHILD_NAT_HEIGHT != child->core.height) changed = 1; } if (IS_REQUEST(CWX)) { IIMESSAGE(request->x,child->core.x) CW_CHILD_NAT_X = request->x; if (CW_CHILD_NAT_X != child->core.x) changed = 1; } if (IS_REQUEST(CWY)) { IIMESSAGE(request->y,child->core.y) CW_CHILD_NAT_Y = request->y; if (CW_CHILD_NAT_Y != child->core.y) changed = 1; } if (changed) { answer = LayoutClip(cw); INFIIMESSAGE(new size of child:,child->core.width,child->core.height) INFIIMESSAGE(new position of child:,child->core.x,child->core.y) INFIMESSAGE(new border width of child:,child->core.border_width) ENDMESSAGE(GeometryManager) return answer; } else { ENDMESSAGE(GeometryManager) return XtGeometryYes; } } /*---------------------------------------------------*/ /* ChangeManaged */ /*---------------------------------------------------*/ static void ChangeManaged(Widget w) { ClipWidget cw = (ClipWidget) w; Widget child = CW_CHILD; BEGINMESSAGE(ChangeManaged) SMESSAGE(XtName(w)) if (child) { if (!XtIsRealized (w)) { XtWidgetGeometry geom, retgeom; geom.request_mode = 0; if (cw->core.width == 0) { geom.width = child->core.width; geom.request_mode |= CWWidth; } if (cw->core.height == 0) { geom.height = child->core.height; geom.request_mode |= CWHeight; } if (geom.request_mode && XtMakeGeometryRequest (w, &geom, &retgeom) == XtGeometryAlmost) { (void) XtMakeGeometryRequest (w, &retgeom, (XtWidgetGeometry *)NULL); } } XtResizeWidget (child, Max (child->core.width, cw->core.width), Max (child->core.height, cw->core.height), 0); SendReport (cw, (unsigned int) XawPRAll); } ENDMESSAGE(ChangeManaged) } /*---------------------------------------------------*/ /* LayoutClip */ /*---------------------------------------------------*/ static XtGeometryResult LayoutClip(ClipWidget cw) { XtWidgetGeometry request; XtGeometryResult answer; BEGINMESSAGE(LayoutClip) GetNaturalSize(cw,&request.width,&request.height); if (request.width != cw->core.width || request.height != cw->core.height) { request.request_mode = (CWWidth | CWHeight); INFMESSAGE(will request new geometry from parent) answer = XtMakeGeometryRequest((Widget) cw, &request, &request); switch (answer) { case XtGeometryYes: INFMESSAGE(XtGeometryYes) INFMESSAGE(parent reconfigured window) break; case XtGeometryAlmost: INFIIMESSAGE(XtGeometryAlmost:,request.width,request.height) INFMESSAGE(requesting approval of these values) answer = XtMakeGeometryRequest((Widget) cw, &request, &request); if (answer!=XtGeometryYes) { INFIIMESSAGE(parent proposes,request.width,request.height) fprintf(stderr,"ClipWidget: Warning, parent didn't accept the size he proposed."); INFMESSAGE(giving up) answer = XtGeometryNo; } else { INFMESSAGE(XtGeometryYes) INFMESSAGE(parent reconfigured window) } break; case XtGeometryNo: INFMESSAGE(XtGeometryNo) answer = XtGeometryNo; break; case XtGeometryDone: INFMESSAGE(XtGeometryDone) /* never reached */ break; } if (answer == XtGeometryYes) { Resize((Widget)cw); answer = XtGeometryDone; } } else { INFMESSAGE(XtGeometryDone) Resize((Widget)cw); answer = XtGeometryDone; } ENDMESSAGE(LayoutClip) return answer; } /*###################################################*/ /* ClipWidgetCheckCoordinates */ /*###################################################*/ void ClipWidgetCheckCoordinates(Widget w, int x, int y, int *xP, int *yP) { ClipWidget cw = (ClipWidget)w; Widget child = CW_CHILD; BEGINMESSAGE(ClipWidgetCheckCoordinates) *xP = x; *yP = y; if (*xP + (int)child->core.width < (int)cw->core.width) *xP = (int)cw->core.width-(int)child->core.width; if (*xP > 0) *xP = 0; if (*yP + (int)child->core.height < (int)cw->core.height) *yP = (int)cw->core.height-(int)child->core.height; if (*yP > 0) *yP = 0; ENDMESSAGE(ClipWidgetCheckCoordinates) } /*###################################################*/ /* ClipWidgetSetCoordinates */ /*###################################################*/ void ClipWidgetSetCoordinates(Widget w, int x, int y) { ClipWidget cw = (ClipWidget)w; Widget child = CW_CHILD; int px,py; BEGINMESSAGE(ClipWidgetSetCoordinates) ClipWidgetCheckCoordinates(w, x, y, &px,&py); XtMoveWidget(child, (Position)px, (Position)py); CW_CHILD_NAT_X = (Position)px; CW_CHILD_NAT_Y = (Position)py; SendReport (cw, (XawPRSliderX | XawPRSliderY)); ENDMESSAGE(ClipWidgetSetCoordinates) } gv-3.7.4/src/callbacks.h0000664000076400007640000000744111735103745011767 00000000000000/* ** ** callbacks.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Authors: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_CALLBACKS_H_ #define _GV_CALLBACKS_H_ extern void cb_showTitle (Widget, XtPointer, XtPointer); extern void cb_newtocScrollbar (Widget, XtPointer, XtPointer); extern void cb_newtocVisibleAdjust (Widget, XtPointer, XtPointer); extern void cb_adjustSlider (Widget, XtPointer, XtPointer); extern void cb_antialias (Widget, XtPointer, XtPointer); extern void cb_useBackingPixmap (Widget, XtPointer, XtPointer); extern void cb_handleDSC (Widget, XtPointer, XtPointer); extern void cb_handleEOF (Widget, XtPointer, XtPointer); extern void cb_stopInterpreter (Widget, XtPointer, XtPointer); extern void cb_pageAdjustNotify (Widget, XtPointer, XtPointer); extern void cb_checkFile (Widget, XtPointer, XtPointer); extern void cb_watchFile (Widget, XtPointer, XtPointer); extern void cb_print (Widget, XtPointer, XtPointer); extern void cb_print_pos (Widget, XtPointer, XtPointer); extern void cb_doPrint (Widget, XtPointer, XtPointer); extern void cb_doPrintPos (Widget, XtPointer, XtPointer); extern void cb_cancelPrint (Widget, XtPointer, XtPointer); extern void cb_save (Widget, XtPointer, XtPointer); extern void cb_doSave (Widget, XtPointer, XtPointer); extern void cb_openFile (Widget, XtPointer, XtPointer); extern void cb_doOpenFile (Widget, XtPointer, XtPointer); extern void cb_reopen (Widget, XtPointer, XtPointer); extern void cb_savepos (Widget, XtPointer, XtPointer); extern void cb_presentation (Widget, XtPointer, XtPointer); extern void cb_redisplay (Widget, XtPointer, XtPointer); extern void cb_page (Widget, XtPointer, XtPointer); extern void cb_positionPage (Widget, XtPointer, XtPointer); extern void cb_setPageMark (Widget, XtPointer, XtPointer); extern void cb_autoResize (Widget, XtPointer, XtPointer); extern void cb_setScale (Widget, XtPointer, XtPointer); extern void cb_setOrientation (Widget, XtPointer, XtPointer); extern void cb_setPagemedia (Widget, XtPointer, XtPointer); extern void cb_track (Widget, XtPointer, XtPointer); extern void cb_message (Widget, XtPointer, XtPointer); extern void cb_destroy (Widget, XtPointer, XtPointer); extern void cb_destroyGhost (Widget, XtPointer, XtPointer); extern void cb_quitGhostview (Widget, XtPointer, XtPointer); extern void cb_doQuit (Widget, XtPointer, XtPointer); extern void cb_cancelQuit (Widget, XtPointer, XtPointer); extern void cb_askPassword (Widget, XtPointer, XtPointer); #endif /* _GV_CALLBACKS_H_ */ gv-3.7.4/src/options_fs.h0000664000076400007640000000224611735103746012232 00000000000000/* ** ** options_fs.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_OPTIONS_FS_H_ #define _GV_OPTIONS_FS_H_ #endif /* _GV_OPTIONS_FS_H_ */ gv-3.7.4/src/options_gs.h0000664000076400007640000000224311735103746012230 00000000000000/* ** ** options_gs.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project */ #ifndef _GV_OPTIONS_GS_H_ #define _GV_OPTIONS_GS_H_ #endif /* _GV_OPTIONS_GS_H_ */ gv-3.7.4/src/options_gs.c0000664000076400007640000002540011735103746012223 00000000000000/* ** ** options_gs.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include "config.h" #include #include #include #include "paths.h" #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_X11(Shell.h) #include INC_XAW(SimpleMenu.h) #include INC_XAW(SmeBSB.h) #include INC_XAW(AsciiText.h) #include "Aaa.h" #include "Button.h" #include "FileSel.h" #include "Ghostview.h" #include "Frame.h" #include "MButton.h" #include "Switch.h" #include "types.h" #include "callbacks.h" #include "file.h" #include "widgets_misc.h" #include "main_resources.h" #include "main_globals.h" #include "misc.h" #include "note.h" #include "options.h" #include "options_gv.h" #include "resource.h" #include "ps.h" #include "doc_misc.h" #include "version.h" static Widget popup=NULL,optionControl; static Widget quietToggle,saferToggle,safeDirToggle; static Widget scan,conv,gs,x11dev,x11alphadev,arguments; static void options_gs_setOptionsAtEntry(void); static void options_gs_create(void); extern void main_setGhostscriptResources(XrmDatabase); extern String intern_resources[]; /* defined in resource.c */ /*------------------------------------------------------ OptionPopupStruct ------------------------------------------------------*/ OptionPopupStruct gv_options_gs_struct = { NULL, options_gs_create, options_gs_setOptionsAtEntry, False }; OptionPopup gv_options_gs = (OptionPopup) &gv_options_gs_struct; /*------------------------------------------------------ options_gs_setOptionsAtEntry ------------------------------------------------------*/ static void options_gs_setOptionsAtEntry(void) { BEGINMESSAGE(options_gs_setOptionsAtEntry) widgets_setToggle(safeDirToggle, gv_gs_safeDir); widgets_setToggle(saferToggle, gv_gs_safer); widgets_setToggle(quietToggle, gv_gs_quiet); SMESSAGE(gv_gs_interpreter) widgets_setText(gs, gv_gs_interpreter); SMESSAGE(gv_gs_cmd_scan_pdf) widgets_setText(scan, gv_gs_cmd_scan_pdf); SMESSAGE(gv_gs_cmd_conv_pdf) widgets_setText(conv, gv_gs_cmd_conv_pdf); SMESSAGE(gv_gs_x11_device) widgets_setText(x11dev, gv_gs_x11_device); SMESSAGE(gv_gs_x11_alpha_device) widgets_setText(x11alphadev, gv_gs_x11_alpha_device); SMESSAGE(gv_gs_arguments) widgets_setText(arguments, gv_gs_arguments); ENDMESSAGE(options_gs_setOptionsAtEntry) } /*------------------------------------------------------ options_gs_apply ------------------------------------------------------*/ static Boolean options_gs_change (Widget w, String *sP, String *fP) { String v; Boolean r=False; BEGINMESSAGE(options_gs_change) v = widgets_getText(w); v = options_squeeze(v); if (strcmp(v,*sP)) { *fP = *sP; *sP = v; r = True; } else XtFree(v); ENDMESSAGE(options_gs_change) return(r); } static void options_gs_cb_apply(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { Arg args[10]; Cardinal n; int i; Boolean reopen=False; String f[6] = {NULL,NULL,NULL,NULL,NULL,NULL}; BEGINMESSAGE(options_gs_cb_apply) i = gv_gs_quiet; gv_gs_quiet = SwitchIsSet(quietToggle) ? 1 : 0; if (i != gv_gs_quiet) reopen=True; i = gv_gs_safer; gv_gs_safer = SwitchIsSet(saferToggle) ? 1 : 0; if (i != gv_gs_safer) reopen=True; i = gv_gs_safeDir; gv_gs_safeDir = SwitchIsSet(safeDirToggle) ? 1 : 0; if (i != gv_gs_safeDir) reopen=True; reopen |= options_gs_change(gs,&gv_gs_interpreter,&(f[0])); reopen |= options_gs_change(scan,&gv_gs_cmd_scan_pdf,&(f[1])); options_gs_change(conv,&gv_gs_cmd_conv_pdf,&(f[2])); reopen |= options_gs_change(x11dev,&gv_gs_x11_device,&(f[3])); reopen |= options_gs_change(x11alphadev,&gv_gs_x11_alpha_device,&(f[4])); reopen |= options_gs_change(arguments,&gv_gs_arguments,&(f[5])); if (reopen) { cb_stopInterpreter(page,NULL,NULL); n=0; XtSetArg(args[n], XtNinterpreter,gv_gs_interpreter); n++; if (gv_gs_safeDir) XtSetArg(args[n], XtNsafeDir,True); else XtSetArg(args[n], XtNsafeDir,False); n++; if (gv_gs_safer) XtSetArg(args[n], XtNsafer,True); else XtSetArg(args[n], XtNsafer,False); n++; if (gv_gs_quiet) XtSetArg(args[n], XtNquiet,True); else XtSetArg(args[n], XtNquiet,False); n++; XtSetArg(args[n], XtNarguments,gv_gs_arguments); n++; XtSetValues(page, args, n); if (gv_filename) show_page(REQUEST_REOPEN,NULL); } for (i=0; i<6 ; i++) XtFree(f[i]); ENDMESSAGE(options_gs_cb_apply) } /*------------------------------------------------------ options_gs_cb_save ------------------------------------------------------*/ static void options_gs_setArg(Widget w, String *argiP, String *argvP, int *argnP, String format, String name) { String s; s = widgets_getText(w); s = options_squeeze(s); options_setArg(argiP,argvP,format,name,s); ++(*argnP); XtFree(s); } static void options_gs_cb_save(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { int argn = 0; String argi[20]; String argv[20]; String t = "True"; String f = "False"; BEGINMESSAGE(options_gv_cb_save) options_setArg(&(argi[argn]),&(argv[argn]),s_version ,gv_class ,versionResource); ++argn; options_gs_setArg(gs ,&(argi[argn]),&(argv[argn]),&argn,s_gsInterpreter ,gv_class); options_gs_setArg(scan ,&(argi[argn]),&(argv[argn]),&argn,s_gsCmdScanPDF ,gv_class); options_gs_setArg(conv ,&(argi[argn]),&(argv[argn]),&argn,s_gsCmdConvPDF ,gv_class); options_gs_setArg(x11dev ,&(argi[argn]),&(argv[argn]),&argn,s_gsX11Device ,gv_class); options_gs_setArg(x11alphadev,&(argi[argn]),&(argv[argn]),&argn,s_gsX11AlphaDevice ,gv_class); options_gs_setArg(arguments ,&(argi[argn]),&(argv[argn]),&argn,s_gsArguments ,gv_class); options_setArg(&(argi[argn]),&(argv[argn]),s_gsSafeDir ,gv_class ,SwitchIsSet(safeDirToggle) ? t : f); ++argn; options_setArg(&(argi[argn]),&(argv[argn]),s_gsSafer ,gv_class ,SwitchIsSet(saferToggle) ? t : f); ++argn; options_setArg(&(argi[argn]),&(argv[argn]),s_gsQuiet ,gv_class ,SwitchIsSet(quietToggle) ? t : f); ++argn; options_save(argn,argi,argv); while (--argn >=0) { XtFree(argi[argn]); XtFree(argv[argn]); } ENDMESSAGE(options_gv_cb_save) } /*------------------------------------------------------ options_gs_cb_defaults ------------------------------------------------------*/ static void options_gs_cb_defaults(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { XrmDatabase db = NULL; String *sP = intern_resources; BEGINMESSAGE(options_gs_cb_defaults) while (*sP) XrmPutLineResource(&db,*sP++); main_setGhostscriptResources(db); XrmDestroyDatabase(db); options_gs_setOptionsAtEntry(); ENDMESSAGE(options_gs_cb_defaults) } /*------------------------------------------------------ options_gs_create ------------------------------------------------------*/ void options_gs_create(void) { Arg args[5]; Cardinal n; Widget w; BEGINMESSAGE(options_gs_create) if (popup) { INFMESSAGE(popup exists) ENDMESSAGE(options_gs_create) return; } n=0; XtSetArg(args[n], XtNallowShellResize, True); n++; popup = XtCreatePopupShell("optiongsPopup",transientShellWidgetClass,toplevel, args, n); gv_options_gs->popup = popup; n=0; optionControl = XtCreateManagedWidget("optionControl",aaaWidgetClass,popup,args,n); safeDirToggle = XtCreateManagedWidget("safeDir",switchWidgetClass,optionControl,NULL,(Cardinal)0); saferToggle = XtCreateManagedWidget("safer",switchWidgetClass,optionControl,NULL,(Cardinal)0); quietToggle = XtCreateManagedWidget("quiet",switchWidgetClass,optionControl,NULL,(Cardinal)0); gs = widgets_createLabeledLineTextField("gs", optionControl); x11dev = widgets_createLabeledLineTextField("x11dev", optionControl); x11alphadev = widgets_createLabeledLineTextField("x11alphadev", optionControl); arguments = widgets_createLabeledLineTextField("arguments", optionControl); scan = widgets_createLabeledTextField("scan", optionControl); conv = widgets_createLabeledTextField("conv", optionControl); n=0; XtSetArg(args[n], XtNwrap, XawtextWrapWord); ++n; XtSetArg(args[n], XtNresize, XawtextResizeHeight); ++n; XtSetArg(args[n], XtNscrollVertical, XawtextScrollNever); ++n; XtSetValues(scan, args, n); XtSetValues(conv, args, n); n=0; w = XtCreateManagedWidget("apply", buttonWidgetClass,optionControl, args, n); XtAddCallback(w, XtNcallback, options_gs_cb_apply,NULL); XtInstallAccelerators(optionControl, w); w = XtCreateManagedWidget("save", buttonWidgetClass,optionControl, args, n); XtAddCallback(w, XtNcallback, options_gs_cb_save,NULL); XtInstallAccelerators(optionControl, w); w = XtCreateManagedWidget("dismiss", buttonWidgetClass,optionControl, args, n); XtAddCallback(w, XtNcallback, options_cb_popdown, (XtPointer)gv_options_gs); XtInstallAccelerators(optionControl, w); w = XtCreateManagedWidget("defaults", buttonWidgetClass,optionControl, args, n); XtAddCallback(w, XtNcallback, options_gs_cb_defaults, NULL); XtInstallAccelerators(optionControl, w); options_gs_setOptionsAtEntry(); options_realize(popup,optionControl); ENDMESSAGE(options_gv_cb_create) } gv-3.7.4/src/widgets_misc.c0000664000076400007640000002066311735103746012526 00000000000000/* ** ** widgets_misc.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include #include "paths.h" #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_XAW(AsciiText.h) #include INC_XAW(Cardinals.h) #include "Button.h" #include "Frame.h" #include "Switch.h" #include "types.h" #include "main_resources.h" #include "main_globals.h" #include "widgets_misc.h" /*##################################################*/ /* widgets_setSelectedBitmap */ /*##################################################*/ void widgets_setSelectedBitmap(w,on) Widget w; int on; { Arg args[1]; Pixmap bitmap; BEGINMESSAGE(widgets_setSelectedBitmap) if (on) bitmap = app_res.selected_bitmap; else bitmap = None; XtSetArg(args[0], XtNleftBitmap, bitmap); XtSetValues(w,args, ONE); ENDMESSAGE(widgets_setSelectedBitmap) } /*##################################################*/ /* widgets_setToggle */ /*##################################################*/ void widgets_setToggle(w,value) Widget w; int value; { BEGINMESSAGE(widgets_setToggle) if (value) ButtonSet(w,NULL,NULL,NULL); else ButtonUnset(w,NULL,NULL,NULL); ENDMESSAGE(widgets_setToggle) } /*##################################################*/ /* widgets_createLabeledLineTextField */ /* Create a label/single-line-text-field */ /* widget pair. */ /*##################################################*/ static char *LineTextTr = "\ Return: no-op()\n\ Escape: no-op()\n\ Down: no-op()\n\ Up: no-op()\n\ Linefeed: no-op()\n\ CtrlJ: no-op()\n\ CtrlM: no-op()\n\ CtrlN: no-op()\n\ CtrlO: no-op()\n\ CtrlP: no-op()\n\ CtrlR: no-op()\n\ CtrlS: no-op()\n\ CtrlV: no-op()\n\ CtrlZ: no-op()\n\ MetaV: no-op()\n\ MetaZ: no-op()\n\ BackSpace: delete-previous-character()\n\ Delete: delete-next-character()\n\ Right: forward-character()\n\ Left: backward-character()\n\ :display-caret(on,always)display-caret(off,always)\n\ :display-caret(on,always)\n\ :display-caret(off,always)\ "; Widget widgets_createLabeledLineTextField(name, parent) String name; Widget parent; { Arg args[9]; Cardinal n; char tmp[50]; Widget frame,text; static XtTranslations trans=NULL; INFMESSAGE(executing widgets_createLabeledLineTextField) sprintf(tmp,"%sLabel",name); XtSetArg(args[0], XtNresize, False); XtCreateManagedWidget(tmp,labelWidgetClass,parent,args,ONE); sprintf(tmp,"%sFrame",name); frame = XtCreateManagedWidget(tmp,frameWidgetClass,parent,NULL,ZERO); n=0; XtSetArg(args[n], XtNtype, XawAsciiString); n++; XtSetArg(args[n], XtNuseStringInPlace, False); n++; XtSetArg(args[n], XtNscrollHorizontal, XawtextScrollNever); n++; XtSetArg(args[n], XtNscrollVertical, XawtextScrollNever); n++; XtSetArg(args[n], XtNdisplayCaret, False); n++; XtSetArg(args[n], XtNeditType, XawtextEdit); n++; XtSetArg(args[n], XtNresize, XawtextResizeWidth); n++; text = XtCreateManagedWidget(name,asciiTextWidgetClass,frame,args,n); if (!trans) trans=XtParseTranslationTable(LineTextTr); XtOverrideTranslations(text,trans); return text; } /*##################################################*/ /* widgets_createLabeledTextField */ /* Create a label/text-field widget pair. */ /*##################################################*/ static char *TextTr = "\ Escape: no-op()\n\ CtrlJ: no-op()\n\ CtrlM: no-op()\n\ CtrlN: no-op()\n\ CtrlO: no-op()\n\ CtrlP: no-op()\n\ CtrlR: no-op()\n\ CtrlS: no-op()\n\ CtrlV: no-op()\n\ CtrlZ: no-op()\n\ MetaV: no-op()\n\ MetaZ: no-op()\n\ BackSpace: delete-previous-character()\n\ Delete: delete-next-character()\n\ Right: forward-character()\n\ Left: backward-character()\n\ :display-caret(on,always)display-caret(off,always)\n\ :display-caret(on,always)\n\ :display-caret(off,always)\ "; Widget widgets_createLabeledTextField(name, parent) String name; Widget parent; { Arg args[9]; Cardinal n; char tmp[50]; Widget frame,text; static XtTranslations trans=NULL; INFMESSAGE(executing widgets_createLabeledTextField) sprintf(tmp,"%sLabel",name); XtSetArg(args[0], XtNresize, False); XtCreateManagedWidget(tmp,labelWidgetClass,parent,args,ONE); sprintf(tmp,"%sFrame",name); frame = XtCreateManagedWidget(tmp,frameWidgetClass,parent,NULL,ZERO); n=0; XtSetArg(args[n], XtNtype, XawAsciiString); n++; XtSetArg(args[n], XtNuseStringInPlace, False); n++; XtSetArg(args[n], XtNscrollHorizontal, XawtextScrollNever); n++; XtSetArg(args[n], XtNscrollVertical, XawtextScrollWhenNeeded);n++; XtSetArg(args[n], XtNdisplayCaret, False); n++; XtSetArg(args[n], XtNeditType, XawtextEdit); n++; XtSetArg(args[n], XtNresize, XawtextResizeWidth); n++; text = XtCreateManagedWidget(name,asciiTextWidgetClass,frame,args,n); if (!trans) trans=XtParseTranslationTable(TextTr); XtOverrideTranslations(text,trans); return text; } /*##################################################*/ /* widgets_getText */ /*##################################################*/ char * widgets_getText(w) Widget w; { Arg args[1]; String value; BEGINMESSAGE(widgets_getText) XtSetArg(args[0], XtNstring, &value); XtGetValues(w, args, ONE); ENDMESSAGE(widgets_getText) return value; } /*##################################################*/ /* widgets_setText */ /*##################################################*/ void widgets_setText(w,value) Widget w; String value; { Arg args[1]; BEGINMESSAGE(widgets_setText) if (value) { XtSetArg(args[0], XtNstring, value); XtSetValues(w,args,ONE); XtSetArg(args[0], XtNinsertPosition, strlen(value)); XtSetValues(w,args,ONE); } ENDMESSAGE(widgets_setText) } /*##################################################*/ /* widgets_preferButton */ /*##################################################*/ void widgets_preferButton(w,prefer) Widget w; int prefer; { BEGINMESSAGE(widgets_preferButton) if (w) { if (prefer) ButtonHighlight(w,NULL,NULL,NULL); else ButtonReset(w,NULL,NULL,NULL); } ENDMESSAGE(widgets_preferButton) #if 0 XEvent event; Position rx,ry; XtTranslateCoords(w, 0, 0, &rx, &ry); event.xcrossing.type = prefer ? EnterNotify : LeaveNotify; event.xcrossing.display = XtDisplay(w); event.xcrossing.window = XtWindow(w); event.xcrossing.root = RootWindowOfScreen(XtScreen(w)); event.xcrossing.subwindow = None; event.xcrossing.time = 0; event.xcrossing.x = 0; event.xcrossing.y = 0; event.xcrossing.x_root = (int)rx; event.xcrossing.y_root = (int)ry; event.xcrossing.mode = 0; event.xcrossing.detail = 0; event.xcrossing.same_screen = 0; event.xcrossing.focus = 0; event.xcrossing.state = 0; XSendEvent(XtDisplay(w),XtWindow(w), False, prefer ? EnterWindowMask : LeaveWindowMask, &event); #endif } gv-3.7.4/src/gv_user_res.dat0000664000076400007640000000540611736064614012715 00000000000000 !########## gv_user_res.dat !##### Application specific Resources GV.pageMedia: Automatic GV.orientation: Automatic GV.fallbackOrientation: Portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: True GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: False GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.geometry: +5+5 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.titleStyle: 1 GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ Arbitrary magnification, -2 \n\ Fit height to window, -3 \n\ Fit width to window, -1 \n\ Fit to window, 0.000 \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ 14x24, 1008 1728 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 !##### Ghostview Widget GV*Ghostview.background: white GV*Ghostview.foreground: black gv-3.7.4/src/ClipP.h0000664000076400007640000000377311735103745011063 00000000000000/* ** ** ClipP.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Authors: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _XawClipP_h #define _XawClipP_h #include INC_X11(CompositeP.h) #include "Clip.h" typedef struct { /* new fields in widget class */ int dummy; } ClipClassPart; typedef struct _ClipClassRec { /* Clip widget class */ CoreClassPart core_class; CompositeClassPart composite_class; ClipClassPart clip_class; } ClipClassRec; typedef struct { /* new fields in widget */ /* resources... */ XtCallbackList report_callbacks; /* callback/Callback */ #if 0 int child_x; int child_y; #endif /* private data... */ Dimension child_width_nat; Dimension child_height_nat; Dimension child_border_nat; Position child_x_nat; Position child_y_nat; } ClipPart; typedef struct _ClipRec { CorePart core; CompositePart composite; ClipPart clip; } ClipRec; /* * external declarations */ extern ClipClassRec clipClassRec; #endif /* _XawClipP_h */ gv-3.7.4/src/scale.h0000664000076400007640000000271211735103746011134 00000000000000/* ** ** scale.h ** ** Copyright (C) 1997 Johannes Plass ** Copyrigth (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_SCALE_H_ #define _GV_SCALE_H_ extern void scale_freeScales (Scale*); extern Scale* scale_parseScales (char*); extern int scale_checkScaleNum (Scale*, int); extern void scale_getScreenSize (Display*, Screen*, XrmDatabase, char*, char*, int*, int*); extern void scale_getScreenResourceName (Display*, char*); #endif /* _GV_SCALE_H_ */ gv-3.7.4/src/save.c0000664000076400007640000002426511735103746011005 00000000000000/* ** ** save.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyrigth (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include #include #include "paths.h" #include INC_X11(Intrinsic.h) #include "Ghostview.h" #include "types.h" #include "config.h" #include "error.h" #include "file.h" #include "main_resources.h" #include "main_globals.h" #include "misc.h" #include "note.h" #include "process.h" #include "ps.h" #include "doc_misc.h" #include "save.h" # include # include /*############################################################*/ /* save_alllocSaveData */ /*############################################################*/ SaveData save_allocSaveData(void) { SaveData sd; Cardinal size = sizeof(SaveDataStruct); BEGINMESSAGE(save_alllocSaveData) sd = (SaveData) XtMalloc(size); memset((void*) sd ,0,(size_t)size); ENDMESSAGE(save_allocSaveData) return(sd); } /*############################################################*/ /* save_freeSaveData */ /*############################################################*/ void save_freeSaveData(SaveData sd) { BEGINMESSAGE(save_freeSaveData) XtFree(sd->save_fn); XtFree(sd->src_fn); XtFree(sd->conv_fn); XtFree(sd->pagelist); XtFree(sd->print_cmd); XtFree((XtPointer)sd); ENDMESSAGE(save_freeSaveData) } /*------------------------------------------------------------*/ /* print_file */ /*------------------------------------------------------------*/ # define SYSTEM_SUCCEEDED_ON(bbb) (system(bbb) == 0) # define SYSTEM_FAILED_ON(bbb) (system(bbb) != 0) static String print_file(String print_command, String print_filename) { String error=NULL; char *print_quoted_filename; char *c,*p; Cardinal m,n; String printfail=GV_ERROR_PRINT_FAIL; BEGINMESSAGE(print_file) print_quoted_filename = quote_filename(print_filename); p = XtNewString(print_command); n=0; c=p; while ((c=strstr(c,"%s"))) { c+=2; n++; } m = (strlen(p)+(n>0?n:1)*strlen(print_quoted_filename)+5)*sizeof(char); c = (char*) XtMalloc(m); if (n>0) { char *e,*s; e=s=p; c[0]='\0'; while (s) { s=strstr(e,"%s"); if (s) *s='\0'; strcat(c,e); if (s) { strcat(c,print_quoted_filename); e=s+2; } else s=NULL; } } else { sprintf(c, "%s %s",p,print_quoted_filename); } INFSMESSAGE(printing:,c) if (SYSTEM_FAILED_ON(c)) { m = (strlen(printfail)+strlen(c)+1)*sizeof(char); error = (char*) XtMalloc(m); sprintf(error,printfail,c); } XtFree(c); XtFree(p); XtFree(print_quoted_filename); ENDMESSAGE(print_file) return(error); } /*------------------------------------------------------------*/ /* save_forkPDFToPSConversionDone */ /*------------------------------------------------------------*/ static void save_forkPDFToPSConversionDone(XtPointer client_data, int type) { char *error=NULL; SaveData sd = (SaveData) client_data; BEGINMESSAGE(save_forkPDFToPSConversionDone) if (type==PROCESS_NOTIFY) { INFMESSAGE(call is of type PROCESS_NOTIFY) error = save_saveFile(sd); if (error) { NotePopupShowMessage(error); XtFree(error); } } else if (type==PROCESS_KILL) { INFMESSAGE(call is of type PROCESS_KILL) if (sd->conv_fn) { INFSMESSAGE(deleting file, sd->conv_fn) unlink(sd->conv_fn); } save_freeSaveData(sd); } ENDMESSAGE(save_forkPDFToPSConversionDone) } /*------------------------------------------------------------*/ /* save_forkPDFToPSConversion */ /*------------------------------------------------------------*/ static String save_forkPDFToPSConversion(SaveData sd) { char command[512], tmp[512]; char proc_name[256]; char *error=NULL; char *pos; char *pdfpos; char *pspos; char *quoted_src_fn, *quoted_conv_fn; char* src = command; char* dest = tmp; int spaceFound = 0; BEGINMESSAGE(save_forkPDFToPSConversion) pos=file_locateFilename(sd->src_fn); strcpy(proc_name,pos); strcat(proc_name," conversion"); quoted_src_fn = quote_filename(sd->src_fn); quoted_conv_fn = quote_filename(sd->conv_fn); if ((pdfpos = strstr(gv_gs_cmd_conv_pdf,"%pdf")) && (pspos = strstr(gv_gs_cmd_conv_pdf,"%ps"))) { command[0] = '\0'; if (pdfpos < pspos) { strncat(command,gv_gs_cmd_conv_pdf,(pdfpos-gv_gs_cmd_conv_pdf)); strcat(command,quoted_src_fn); strncat(command,pdfpos+4,(pspos-pdfpos-4)); strcat(command,quoted_conv_fn); strcat(command,pspos+3); } else { strncat(command,gv_gs_cmd_conv_pdf,(pspos-gv_gs_cmd_conv_pdf)); strcat(command,quoted_conv_fn); strncat(command,pspos+3,(pdfpos-pspos-3)); strcat(command,quoted_src_fn); strcat(command,pdfpos+4); } } else { sprintf(command,gv_gs_cmd_conv_pdf,quoted_conv_fn,quoted_src_fn); } XtFree(quoted_src_fn); XtFree(quoted_conv_fn); if (strstr(gv_gs_cmd_scan_pdf, "-P") || !gv_gs_safer) strcpy(tmp, gv_gs_cmd_scan_pdf); else { while (*src) { int isSpace = *src == ' '; *(dest++) = *(src++); if (!spaceFound && isSpace) { strcpy(dest, "-P- -dSAFER "); dest+=12; spaceFound = 1; } } *dest = 0; } INFSMESSAGE(starting conversion:,tmp) process_fork(proc_name,tmp,save_forkPDFToPSConversionDone,(XtPointer)sd); ENDMESSAGE(save_forkPDFToPSConversion) return(error); } /*------------------------------------------------------------*/ /* save_copyToFile */ /*------------------------------------------------------------*/ static String save_copyToFile(String save_filename, String src_filename, char *pagelist, int scanstyle) { FILE *save_file=NULL; FILE *src_file=NULL; String error=NULL; String openfail=GV_ERROR_OPEN_FAIL; char *tmp; BEGINMESSAGE(save_copyToFile) if ((save_file = fopen(save_filename, "w")) == NULL) error = open_fail_error(errno,openfail,save_filename,0); if (!error && (src_file=fopen(src_filename,"r"))==NULL) error = open_fail_error(errno,openfail,src_filename,0); if (!error) { if (pagelist) { Document src_doc=NULL; String s = XtNewString(src_filename); s = file_getUsefulName(s); INFMESSAGE(scanning document) doc_scanFile(&src_file,&src_doc,src_filename,s,NULL,NULL,NULL,NULL,scanstyle,gv_gs_safeDir); if (src_doc) { INFMESSAGE(calling pscopydoc) pscopydoc(save_file,src_filename,src_doc,pagelist); psfree(src_doc); } else { char *error_scan_fail = "Failed to scan file %s\n"; char tmp[512]; sprintf(tmp,error_scan_fail,src_filename); error=XtNewString(tmp); } } else { char buf[BUFSIZ]; int bytes; INFMESSAGE(copying file literaly) while ((bytes = read(fileno(src_file),buf,BUFSIZ))) bytes = write(fileno(save_file), buf, bytes); } } tmp = close_file(src_file,src_filename); if (!error) error = tmp; tmp = close_file(save_file,save_filename); if (!error) error = tmp; ENDMESSAGE(save_copyToFile) return(error); } /*############################################################*/ /* save_saveFile */ /*############################################################*/ String save_saveFile(sd) SaveData sd; { char *src_fn; String error=NULL,s; BEGINMESSAGE(save_saveFile) if (!sd->save_fn && !sd->print_cmd && sd->save_to_file) { INFMESSAGE(save_filename not useful) ENDMESSAGE(save_saveFile) return(error); } if (!error && sd->convert && !sd->conv_fn) { s = sd->save_fn ? sd->save_fn : sd->src_fn; s = XtNewString(s); s = file_getUsefulName(s); s = file_pdfname2psname(s); sd->conv_fn = file_getTmpFilename(NULL, s, NULL); XtFree(s); if (sd->conv_fn == NULL) return XtNewString("Cannot create temporary file!"); INFSMESSAGE(converting from file,sd->src_fn) INFSMESSAGE(converting to file,sd->conv_fn) error = save_forkPDFToPSConversion(sd); ENDMESSAGE(save_saveFile) return(error); } src_fn = sd->src_fn; if (sd->conv_fn) src_fn = sd->conv_fn; if (!error && sd->save_to_file) { if (!sd->save_fn) { s = XtNewString(sd->src_fn); s = file_getUsefulName(s); s = file_pdfname2psname(s); sd->save_fn = file_getTmpFilename(NULL, s, NULL); XtFree(s); } if (!sd->save_fn) { error = XtNewString("Cannot create temporary file!"); } else { INFSMESSAGE(saving from file,src_fn) INFSMESSAGE(saving to file,sd->save_fn) error = save_copyToFile(sd->save_fn,src_fn,sd->pagelist,sd->scanstyle); src_fn = sd->save_fn; } } if (!error && sd->save_to_printer) { INFSMESSAGE(saving to printer from file,src_fn) error = print_file(sd->print_cmd,src_fn); if (src_fn != sd->src_fn && !(sd->print_kills_file)) { INFSMESSAGE(deleting file, src_fn) unlink(src_fn); } } if (sd->conv_fn) { INFSMESSAGE(deleting file, sd->conv_fn) unlink(sd->conv_fn); } save_freeSaveData(sd); ENDMESSAGE(save_saveFile) return(error); } gv-3.7.4/src/options_setup.h0000664000076400007640000000226311735103746012761 00000000000000/* ** ** options_setup.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_OPTIONS_SETUP_H_ #define _GV_OPTIONS_SETUP_H_ #endif /* _GV_OPTIONS_SETUP_H_ */ gv-3.7.4/src/setenv.h0000664000076400007640000000207411735103746011352 00000000000000/* setenv and unsetenv emulation code Copyright (C) 1992,1995-1999,2000-2003,2005-2008 Free Software Foundation, Copyright (C) 2008 Markus Steinborn This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef setenv_h #define setenv_h #ifdef USE_SETENV_CODE int gnu_gv_setenv (const char *name, const char *value, int overwrite); int gnu_gv_unsetenv (const char *name); #else #define gnu_gv_setenv setenv #define gnu_gv_unsetenv unsetenv #endif #endif gv-3.7.4/src/COPYING0000664000076400007640000010451311735103745010730 00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . gv-3.7.4/src/secscanf.h0000664000076400007640000000007011735103746011625 00000000000000extern int sec_sscanf(const char *, const char *, ...); gv-3.7.4/src/save.h0000664000076400007640000000316111735103746011002 00000000000000/* ** ** save.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_SAVE_H_ #define _GV_SAVE_H_ typedef struct SaveDataStruct_ { char *save_fn; char *src_fn; char *conv_fn; char *pagelist; char *print_cmd; int convert; int save_to_file; int save_to_printer; int print_kills_file; int scanstyle; } SaveDataStruct, *SaveData; extern SaveData save_allocSaveData (void); extern void save_freeSaveData (SaveData); extern String save_saveFile (SaveData); #endif /* _GV_SAVE_H_ */ gv-3.7.4/src/ad2c0000775000076400007640000000315111437764362010437 00000000000000#!/bin/sh # # ad2c : Convert app-defaults file to C strings decls. # # George Ferguson, ferguson@cs.rcohester.edu, 12 Nov 1990. # 19 Mar 1991: gf # Made it self-contained. # 6 Jan 1992: mycroft@gnu.ai.mit.edu (Charles Hannum) # Removed use of "-n" and ":read" label since Gnu and # IBM sed print pattern space on "n" command. Still works # with Sun sed, of course. # 7 Jan 1992: matthew@sunpix.East.Sun.COM (Matthew Stier) # Escape quotes after escaping backslashes. # 8 Jul 1992: Version 1.6 # Manpage fixes. # 19 Apr 1993: Version 1.7 # Remove comments that were inside the sed command since # some versions of sed don't like them. The comments are # now given here in the header. # # Comments on the script by line: # /^!/d Remove comments # /^$/d Remove blanks # s/\\/\\\\/g Escape backslashes... # s/\\$//g ...except the line continuation ones # s/"/\\"/g Escape quotes # s/^/"/ Add leading quote # : test Establish label for later branch # /\\$/b slash Branch to label "slash" if line ends in backslash # s/$/",/ Otherwise add closing quote and comma... # p ...output the line... # d ...and clear the pattern space so it's not printed again # : slash Branch comes here if line ends in backslash # n Read next line, append to pattern space # [...] The "d" and "s" commands that follow just delete # comments and blank lines and escape control sequences # b test Branch up to see if the line ends in backslash or not # sed ' /^!/d /^$/d s/\\/\\\\/g s/\\$//g s/"/\\"/g s/^/"/ : test /\\$/b slash s/$/",/ p d : slash n /^!/d /^$/d s/"/\\"/g s/\\\\/\\/g s/\\n/\\\\n/g s/\\t/\\\\t/g s/\\f/\\\\f/g s/\\b/\\\\b/g b test' "$@" gv-3.7.4/src/misc.c0000664000076400007640000015043111736064614010776 00000000000000/* ** ** misc.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ /* for canonicalize_file_name: */ #define _GNU_SOURCE 1 #include "ac_config.h" /* * This code is derived from: */ /* * misc.c -- Everything that isn't a callback or action. * Copyright (C) 1992 Timothy O. Theisen * Author: Tim Theisen Systems Programmer * Internet: tim@cs.wisc.edu Department of Computer Sciences * UUCP: uwvax!tim University of Wisconsin-Madison * Phone: (608)262-0438 1210 West Dayton Street * FAX: (608)262-9777 Madison, WI 53706 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. * */ /* #define MESSAGES */ #include "message.h" #include "config.h" #include #include #include #include "ac_config.h" #include #ifndef SEEK_SET # define SEEK_SET 0 #endif #include #ifdef SIGNALRETURNSINT # define SIGVAL int #else # define SIGVAL void #endif #define GV_MAXLENGTH 512 # include # include # include #include #include "paths.h" #include INC_X11(Xos.h) #include INC_X11(Xatom.h) #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_X11(Shell.h) #include INC_XAW(Cardinals.h) #include INC_XAW(SimpleMenu.h) #include INC_XAW(SmeBSB.h) #include INC_XAW(SmeLine.h) #include INC_X11(IntrinsicP.h) #include INC_XAW(TextP.h) #include INC_XAW(Scrollbar.h) #include INC_XMU(StdCmap.h) #include "Aaa.h" #include "Button.h" #include "Clip.h" #include "Frame.h" #include "Ghostview.h" #include "Vlist.h" #include "types.h" #include "actions.h" #include "callbacks.h" #include "file.h" #include "ps.h" #include "doc_misc.h" #include "info.h" #include "main_resources.h" #include "main_globals.h" #include "misc.h" #include "note.h" #include "error.h" #include "save.h" #include "widgets_misc.h" #ifndef max # define max(a, b) ((a) > (b) ? (a) : (b)) #endif #ifndef min # define min(a, b) ((a) < (b) ? (a) : (b)) #endif #define UNMAP_CONTROL (1<<0) #define UNMAP_PAGEVIEW (1<<1) #define UNMAP_PAGE (1<<2) #define MAP_CONTROL (1<<3) #define MAP_PAGEVIEW (1<<4) #define MAP_PAGE (1<<5) static Boolean set_new_scale (void); static Boolean set_new_orientation (int); static Boolean set_new_pagemedia (int); static void layout_ghostview (void); /*############################################################*/ /* misc_drawEyeGuide */ /*############################################################*/ typedef struct { Widget w; int drawn; int x,y,width,height; XtIntervalId timer; } EyeGuideDataStruct,*EyeGuideData; static void misc_catchEyeGuideTimer(XtPointer client_data, XtIntervalId *idp _GL_UNUSED) { EyeGuideData egd = (EyeGuideData) client_data; BEGINMESSAGE(misc_catchEyeGuideTimer) if (egd->timer) misc_drawEyeGuide(egd->w,EYEGUIDE_REMOVE,0,0); ENDMESSAGE(misc_catchEyeGuideTimer) } void misc_drawEyeGuide(Widget w, int d, int x, int y) { unsigned long t = (unsigned long) 1000; static EyeGuideData egd = NULL; BEGINMESSAGE(misc_drawEyeGuide) if (!app_res.scrolling_eye_guide) { ENDMESSAGE(misc_drawEyeGuide) return; } if (!egd) { egd = (EyeGuideData) XtMalloc(sizeof(EyeGuideDataStruct)); egd->w = w; egd->drawn = 0; egd->timer = (XtIntervalId) 0; } if (d & EYEGUIDE_DRAW) { if (egd->timer) XtRemoveTimeOut(egd->timer); egd->timer = XtAppAddTimeOut(app_con,t,misc_catchEyeGuideTimer,(XtPointer)egd); if (!egd->drawn) { int x_1,y_1,x_2,y_2,nx,ny; Widget clip = XtParent(XtParent(w)); INFMESSAGE(drawing) nx = (int)w->core.x + (int) w->core.border_width; ny = (int)w->core.y + (int) w->core.border_width; if (-x>nx) x_1 = -x - nx; else x_1=0; if (-y>ny) y_1 = -y - ny; else y_1=0; x_2 = x_1 + (int)clip->core.width -1; if (-x w->core.width) x_2 = w->core.width; y_2 = y_1 + (int)clip->core.height - 1; if (-y w->core.height) y_2 = w->core.height; if (x_1==0) x_1 = -1; if (y_1==0) y_1 = -1; egd->x = x_1; egd->y = y_1; egd->width = x_2-x_1; egd->height = y_2-y_1; GhostviewDrawRectangle(w,egd->x,egd->y,egd->width,egd->height); egd->drawn=1; } } if (d & EYEGUIDE_REMOVE) { if (egd->drawn) { INFMESSAGE(removing) GhostviewDrawRectangle(w,egd->x,egd->y,egd->width,egd->height); } } if (d & (EYEGUIDE_REMOVE|EYEGUIDE_RESET)) { if (egd->timer) XtRemoveTimeOut(egd->timer); XtFree((char*)egd); egd = NULL; } ENDMESSAGE(misc_drawEyeGuide) } /*############################################################*/ /* misc_savePagePosition */ /*############################################################*/ static int pagepos_x,pagepos_y,pagepos_saved=0; void misc_savePagePosition(void) { int x,y,psx,psy; BEGINMESSAGE(misc_savePagePosition) x = ((int)viewClip->core.width)/2 - viewControl->core.x - page->core.x; y = ((int)viewClip->core.height)/2 - viewControl->core.y - page->core.y; GhostviewCoordsXtoPS(page,x,y,&psx,&psy); pagepos_x = psx; pagepos_y = psy; pagepos_saved = 1; ENDMESSAGE(misc_savePagePosition) } /*############################################################*/ /* misc_restorePagePosition */ /*############################################################*/ int misc_restorePagePosition(int *xP, int *yP) { BEGINMESSAGE(misc_restorePagePosition) if (pagepos_saved) { *xP = pagepos_x; *yP = pagepos_y; ENDMESSAGE(misc_restorePagePosition) return(1); } ENDMESSAGE(misc_restorePagePosition) return(0); } /*############################################################*/ /* misc_restorePagePosition */ /*############################################################*/ void misc_resetPagePosition(void) { BEGINMESSAGE(misc_resetPagePosition) pagepos_saved = 0; ENDMESSAGE(misc_resetPagePosition) } /*############################################################*/ /* misc_setPageMarker */ /*############################################################*/ void misc_setPageMarker(int entry, int kind, XEvent *event, Boolean check_toc) /* kind: 0 = selected, 1 = highlighted , 2 = bring selected in sight*/ { int firstvisible, lastvisible; int maxvisible, numentries; Boolean b = False; INFMESSAGE(misc_setPageMarker) if (toc_text && (entry >= 0)) { if (kind == 0 && VlistSelected(newtoc) != entry) VlistChangeSelected(newtoc,entry,XawVlistSet); else if (kind == 1 && VlistHighlighted(newtoc) != entry) VlistChangeHighlighted(newtoc,entry,XawVlistSet); else if (kind == 2) { entry=VlistSelected(newtoc); if (entry<0) return; } firstvisible = VlistGetFirstVisible(newtoc); maxvisible = VlistMaxEntriesVisible(newtoc, newtocClip->core.height); numentries = VlistEntries(newtoc); IIMESSAGE(entry,firstvisible) IIMESSAGE(maxvisible,numentries) if (numentries < maxvisible) { /* check if everything fits */ /* this can happen if the window size is increased */ if (entry != 0) { VlistSetFirstVisible(newtoc, 0); b = True; } } else if (firstvisible > entry || (entry > 0 && firstvisible >= entry)) { if (entry > 0) VlistSetFirstVisible(newtoc, entry - 1); else VlistSetFirstVisible(newtoc, entry); b = True; } else { /* sadly newtoc does not know it's height, so it cannot be told * to made an item visible and we need to trick: */ lastvisible = VlistEntryOfPosition(newtoc, newtocClip->core.height); IIMESSAGE(lastvisible,maxvisible) if (entry > firstvisible && entry >= lastvisible) { int firstentry; firstentry = entry - (lastvisible - firstvisible - 1); /* make the entry second last */ if (firstentry > numentries - maxvisible) firstentry = numentries - maxvisible; /* avoid empty holes at the end */ if (firstentry < 0) firstentry = 0; /* keep in range */ VlistSetFirstVisible(newtoc, firstentry); b = True; } } /* if this happened by mouse, we have the information to get the * highlight up to date again: */ if (b) { if (event) { entry = VlistEntryOfPosition(newtoc, (int)event->xbutton.y); if (entry != VlistHighlighted(newtoc) && check_toc) VlistChangeHighlighted(newtoc,entry,XawVlistSet); } } } } /*------------------------------------------------------------*/ /* misc_openFile */ /*------------------------------------------------------------*/ static String misc_openFile(String name, FILE **fpP) { char *str,*error=NULL; FILE *fp=NULL; BEGINMESSAGE(misc_openFile) if (!name) name = ""; if (strcmp(name, "-")) { INFSMESSAGE(trying to open,name) if (file_fileIsNotUseful(name)) { size_t l; INFMESSAGE(file is not useful) str="Invalid file: %s"; l = strlen(str) + strlen(name) + 1; error = XtMalloc(l*sizeof(char)); sprintf(error,str,name); } else if ((fp = fopen(name, "r")) == NULL) { INFMESSAGE(failed to open) INFIMESSAGE(error number,errno) error = open_fail_error(errno,GV_ERROR_OPEN_FAIL,name,0); } } if (fpP) *fpP=fp; else if (fp) fclose(fp); ENDMESSAGE(misc_openFile) return(error); } /*############################################################*/ /* misc_testFile */ /*############################################################*/ String misc_testFile(String name) { char *error; BEGINMESSAGE(misc_testFile) error = misc_openFile(name,NULL); ENDMESSAGE(misc_testFile) return(error); } /*############################################################*/ /* misc_changeFile */ /*############################################################*/ String misc_changeFile(String name) { FILE *fp=NULL; String error=NULL; char *p; Boolean b = False; BEGINMESSAGE(misc_changeFile) if (!name) name=""; p = XtMalloc((strlen(name)+5)*sizeof(char)); strcpy(p,name); if (strcmp(name,"-")) { if (!b && file_fileIsNotUseful(p)) sprintf(p,"%s.ps",name); else b = True; if (!b && file_fileIsNotUseful(p)) sprintf(p,"%s.pdf",name); else b = True; if (!b) strcpy(p,name); name = canonicalize_file_name(p); if (name) p = name; } name = p; INFSMESSAGE(trying to open,name) error = misc_openFile(name,&fp); if (error) { ENDMESSAGE(misc_changeFile) XtFree(name); return(error); } XtFree(gv_filename_old); XtFree(gv_filename_raw); gv_filename_old = gv_filename; if (gv_filename_dsc) { unlink(gv_filename_dsc); XtFree(gv_filename_dsc); gv_filename_dsc=NULL; } if (gv_filename_unc) { unlink(gv_filename_unc); XtFree(gv_filename_unc); gv_filename_unc=NULL; } if (gv_psfile) fclose(gv_psfile); gv_filename = XtNewString(name); gv_filename_raw = XtNewString(name); gv_filename_raw = file_getUsefulName(gv_filename_raw); gv_psfile = fp; if (strcmp(name,"-")) { struct stat sbuf; stat(gv_filename, &sbuf); mtime = sbuf.st_mtime; INFSMESSAGE(new,gv_filename) } XtFree(name); ENDMESSAGE(misc_changeFile) return(error); } /*############################################################*/ /* close_file */ /*############################################################*/ String close_file(FILE *file, String name) { char *error=NULL; BEGINMESSAGE(close_file) if (file && fclose(file)!=0) { char *error_close_fail = "Cannot close file %s\n"; size_t l; l = strlen(error_close_fail) + strlen(name) + 1; error = XtMalloc(l*sizeof(char)); sprintf(error,error_close_fail,name); } ENDMESSAGE(close_file) return(error); } /*############################################################*/ /* check_file */ /* check if there is a new version of the file */ /* returns -1 if no filename or error in checking file */ /* 0 if no new version exists */ /* 1 if new version exists */ /*############################################################*/ int check_file(int mode) { int status=0; struct stat sbuf; char *tmpname; int r = -1; BEGINMESSAGE(check_file) if (!gv_filename) { INFMESSAGE(file not useful) ENDMESSAGE(check_file) return(r); } if (!strcmp(gv_filename,"-")) { INFMESSAGE(reading from stdin; nothing to update) ENDMESSAGE(check_file) return(0); } if (1) { INFMESSAGE(checking file date) status = stat(gv_filename, &sbuf); if (!status && mtime != sbuf.st_mtime) { INFMESSAGE(file has changed) ENDMESSAGE(check_file) return(1); } } tmpname=gv_filename; r=status; if (r<0) { char message[GV_MAXLENGTH]; if (r != -2) { INFSMESSAGE(cannot access file:,tmpname) sprintf(message,"Unable to access file '%s'\n",tmpname); } else { /* privilege violation */ INFSMESSAGE(user not authorized to access file:,tmpname) sprintf(message,"User is not authorized to access file '%s'\n",tmpname); } NotePopupShowMessage(message); } if (gv_filename!=tmpname) XtFree(tmpname); ENDMESSAGE(check_file) return(r); } /*------------------------------------------------------------*/ /* render_page */ /* Start rendering a new page */ /*------------------------------------------------------------*/ static void render_page(Widget gvw) { int i; BEGINMESSAGE(render_page) if (!gv_filename) { INFMESSAGE(no file) ENDMESSAGE(render_page) return; } INFIMESSAGE(displaying page,current_page) if (toc_text) { Boolean processflag; Boolean idleflag; Boolean noinputflag; INFMESSAGE(toc available) GhostviewState(gvw,&processflag,&idleflag,&noinputflag); # ifdef MESSAGES if (processflag) {INFMESSAGE(interpreter running)} else {INFMESSAGE(no interpreter running)} if (idleflag) {INFMESSAGE(widget is idle)} else {INFMESSAGE(widget is busy)} if (noinputflag) {INFMESSAGE(interpreter has no input)} else {INFMESSAGE(interpreter has input)} # endif /* Check first what the state of the ghostview widget is. Some documents show additional lines between the 'showpage' and the next '%%Page' comment. In this case the 'noinputflag' is 'False' but the additional lines are not really of significance (at least in no document I have encountered). So we ignore this flag and start from scratch only if the widget is busy or if no interpreter is running. Only if 'GV_RESTART_IF_CBUSY' is defined the noinputflag will be considered. */ #ifdef GV_RESTART_IF_BUSY /* ###jp### added 1.2.95 */ if (processflag && idleflag && noinputflag) { #else if (processflag && idleflag) { #endif INFMESSAGE(displaying next page) GhostviewNextPage(gvw); } else { INFMESSAGE(starting new interpreter) GhostviewEnableInterpreter(gvw); GhostviewSendPS(gvw, gv_psfile, doc->beginprolog, doc->lenprolog, False); GhostviewSendPS(gvw, gv_psfile, doc->beginsetup, doc->lensetup, False); } if (doc->pageorder == DESCEND) i = (doc->numpages - 1) - current_page; else i = current_page; GhostviewSendPS(gvw, gv_psfile, doc->pages[i].begin,doc->pages[i].len, False); } else { INFMESSAGE(no toc available) if (!GhostviewIsInterpreterRunning(gvw)) { INFMESSAGE(enabling interpreter for unstructured document) GhostviewEnableInterpreter(gvw); } else if (GhostviewIsInterpreterReady(gvw)) { INFMESSAGE(displaying page of unstructured document) GhostviewNextPage(gvw); } else { INFMESSAGE(interpreter running but not ready) XBell(XtDisplay(gvw), 0); } } if (gvw == page) { if (toc_text) { if (show_prevPage) { if (current_page == 0) ButtonReset(w_prevPage,NULL,NULL,NULL); XtSetSensitive(w_prevPage, current_page != 0); } if (show_nextPage) { if (current_page == doc->numpages-1) ButtonReset(w_nextPage,NULL,NULL,NULL); XtSetSensitive(w_nextPage, current_page != doc->numpages-1); } XtSetSensitive(prevEntry, current_page != 0); XtSetSensitive(nextEntry, current_page != doc->numpages-1); } { int n = doc ? doc->nummedia : 0; Boolean b = (doc_mediaIsOk(doc,current_page,n) ? True : False); XtSetSensitive(pagemediaEntry[n],b); } if (toc_text) { INFMESSAGE(marking current_page as current) misc_setPageMarker(current_page,0,NULL,True); } } ENDMESSAGE(render_page) } /*############################################################*/ /* show_page */ /* This routine is probably the heart of GV */ /* It receives requests from the various callbacks and actions, */ /* maps them onto three flags (need_layout, need_setup, need_render) */ /* and calls the necessary subroutines */ /*############################################################*/ void show_page(int number, XtPointer data1) { Bool need_layout = False; Bool need_setup = False; Bool need_render = False; int request=number; int ori_request=number; BEGINMESSAGE(show_page) INFIMESSAGE(received,request) if ( /* check if file has changed */ gv_filename && (request != REQUEST_NEW_FILE) && (request != REQUEST_REOPEN) && (request != REQUEST_TOGGLE_RESIZE) && (request != REQUEST_SETUP) ) { int changed = check_file(CHECK_FILE_DATE); if (changed==1) { INFMESSAGE(file has changed; requesting new file) request = REQUEST_NEW_FILE; if (number < NO_CURRENT_PAGE) number = current_page; } else if (changed == -1) { INFMESSAGE(file is not accessible) ENDMESSAGE(show_page) return; } } if (!toc_text && (request==REQUEST_REDISPLAY)) { INFMESSAGE(request to redisplay non DSC file; changing to request for new file) request=REQUEST_NEW_FILE; } if (request >= NO_CURRENT_PAGE) { INFMESSAGE(request for new page) if (GhostviewIsBusy(page)) { INFMESSAGE(busy state) if (toc_text) { number = doc_putPageInRange(doc,number); gv_pending_page_request=number; INFIMESSAGE(will remember,gv_pending_page_request) } ENDMESSAGE(show_page) return; } need_layout = need_setup = set_new_orientation(number)|set_new_pagemedia(number); if (need_layout && !app_res.auto_resize && gv_scales[gv_scale]->scale <= 0) set_new_scale(); need_render = True; } else if (requestnummedia && m >= 0) { if (m >= olddoc->nummedia) m = m - olddoc->nummedia; else m = MEDIA_ID_INVALID; } if (doc && doc->nummedia && m >= 0) { m = m + doc->nummedia; } if (m != gv_pagemedia) gv_pagemedia = gv_pagemedia_old = m; } if (gv_pagemedia == MEDIA_ID_INVALID) { int m; gv_pagemedia_old = MEDIA_ID_INVALID; m = doc_convStringToPageMedia(doc,app_res.default_pagemedia); if (m== MEDIA_ID_AUTO) { gv_pagemedia_auto = 1; gv_pagemedia_auto_old = 0; gv_pagemedia = MEDIA_ID_INVALID; } else { gv_pagemedia_auto = 0; gv_pagemedia_auto_old = 1; gv_pagemedia = m; } } cb_showTitle(toplevel,NULL,NULL); if (show_date) { if (doc && doc->date) { label = doc->date; bitmap = app_res.document_bitmap; } else { if (gv_psfile) { label = ctime(&mtime); } else { label = ""; } bitmap = None; } n=0; XtSetArg(args[n], XtNlabel, label); n++; XtSetValues(datebutton, args, n); if (datemenu) XtDestroyWidget(datemenu); datemenu = build_label_menu(datebutton, "date", label, bitmap); } misc_buildPagemediaMenu(); { int media_bbox = doc ? doc->nummedia : 0; Boolean b = (doc_mediaIsOk(doc,current_page,media_bbox) ? True : False); XtSetSensitive(pagemediaEntry[media_bbox], b); } /* Reset ghostscript and output messages popup */ if (!doc || !olddoc || strcmp(gv_filename_old, gv_filename) || olddoc->beginprolog != doc->beginprolog || olddoc->endprolog != doc->endprolog || olddoc->beginsetup != doc->beginsetup || olddoc->endsetup != doc->endsetup) { INFMESSAGE(disabling interpreter) GhostviewDisableInterpreter(page); cb_popdownInfoPopup((Widget)NULL,(XtPointer)NULL,(XtPointer)NULL); cb_resetInfoPopup((Widget)NULL,(XtPointer)NULL,(XtPointer)NULL); } /* Build table of contents */ if (doc && doc->structured) { int maxlen = 0; int i, j; INFMESSAGE(toc available) if (doc->labels_useful) { for (i = 0; i < doc->numpages; i++) maxlen = max(maxlen, (int)strlen(doc->pages[i].label)); } else { double x; x = doc->numpages; maxlen = log10(x) + 1; } toc_entry_length = maxlen + 1; toc_length = doc->numpages * toc_entry_length - 1; toc_text = XtMalloc(toc_length + 2); /* include final NULL */ for (i = 0, tocp = toc_text; i < doc->numpages; i++, tocp += toc_entry_length) { if (doc->labels_useful) { if (doc->pageorder == DESCEND) { j = (doc->numpages - 1) - i; } else { j = i; } sprintf(tocp, "%*s\n", maxlen, doc->pages[j].label); } else { sprintf(tocp, "%*d\n", maxlen, i+1); } } toc_text[toc_length] = '\0'; n=0; XtSetArg(args[n], XtNfilename, NULL); n++; XtSetValues(page, args, n); } else { String fn; fn = gv_filename_unc ? gv_filename_unc : gv_filename; INFMESSAGE(toc not available) toc_length = 0; toc_entry_length = 1; n=0; XtSetArg(args[n], XtNfilename, fn); n++; XtSetValues(page, args, n); } { String s; int i=0; if (toc_text) { s = (char*)XtMalloc((doc->numpages+1)*sizeof(char)); while (i < doc->numpages) { s[i] = 'p'; i++; } s[i] = '\0'; n=0; if ( (!gv_filename_old) || (!olddoc) || (strcmp(gv_filename_old, gv_filename)) || (doc->numpages != olddoc->numpages) ) XtSetArg(args[n], XtNvlist, s); n++; XtSetArg(args[n], XtNlabel, toc_text); n++; } else { s = NULL; XtSetArg(args[n], XtNvlist, ""); n++; XtSetArg(args[n], XtNlabel, ""); n++; } XtSetValues(newtoc, args, n); ClipWidgetSetCoordinates(newtocClip,0,0); INFMESSAGE(setup_ghostview calling XawScrollbarSetThumb) XawScrollbarSetThumb(newtocScroll, VlistScrollPosition(newtoc), VlistVisibleLength(newtoc,newtocClip->core.height)); XtFree(s); } misc_setBitmap(w_toggleCurrentPage , show_toggleCurrentPage , app_res.mark_current_bitmap); misc_setBitmap(w_toggleEvenPages , show_toggleEvenPages , app_res.mark_even_bitmap); misc_setBitmap(w_toggleOddPages , show_toggleOddPages , app_res.mark_odd_bitmap); misc_setBitmap(w_unmarkAllPages , show_unmarkAllPages , app_res.mark_unmark_bitmap); misc_setSensitive(w_saveMarkedPages , show_saveMarkedPages , (toc_text != NULL)); misc_setSensitive(w_saveAllPages , show_saveAllPages , (gv_psfile != NULL)); misc_setSensitive(w_printMarkedPages , show_printMarkedPages , (toc_text != NULL)); misc_setSensitive(w_printAllPages , show_printAllPages , (gv_psfile != NULL)); misc_setSensitive(w_checkFile , show_checkFile , (gv_filename != NULL)); misc_setSensitive(w_updateFile , show_updateFile , (gv_filename != NULL)); misc_setSensitive(w_showThisPage , show_showThisPage , (gv_psfile != NULL || (gv_gs_arguments && *gv_gs_arguments))); misc_setSensitive(w_prevPage , show_prevPage , (toc_text != NULL)); misc_setSensitive(w_nextPage , show_nextPage , (gv_filename != NULL)); misc_setSensitive(w_toggleCurrentPage , show_toggleCurrentPage , (toc_text != NULL)); misc_setSensitive(w_toggleEvenPages , show_toggleEvenPages , (toc_text != NULL)); misc_setSensitive(w_toggleOddPages , show_toggleOddPages , (toc_text != NULL)); misc_setSensitive(w_unmarkAllPages , show_unmarkAllPages , (toc_text != NULL)); XtSetSensitive(reopenEntry, (gv_psfile != NULL)); XtSetSensitive(saveposEntry, (gv_psfile != NULL)); XtSetSensitive(presentationEntry, (gv_psfile != NULL)); XtSetSensitive(printAllEntry, (gv_psfile != NULL)); XtSetSensitive(printMarkedEntry, (toc_text != NULL)); XtSetSensitive(saveAllEntry, (gv_psfile != NULL)); XtSetSensitive(saveMarkedEntry, (toc_text != NULL)); XtSetSensitive(nextEntry, (gv_filename != NULL)); XtSetSensitive(redisplayEntry, (gv_psfile != NULL || (gv_gs_arguments && *gv_gs_arguments))); XtSetSensitive(prevEntry, (toc_text != NULL)); XtSetSensitive(currentEntry, (toc_text != NULL)); XtSetSensitive(oddEntry, (toc_text != NULL)); XtSetSensitive(evenEntry, (toc_text != NULL)); XtSetSensitive(unmarkEntry, (toc_text != NULL)); ENDMESSAGE(setup_ghostview) return oldtoc_entry_length != toc_entry_length; } Dimension view_width, view_height, view_border; Dimension control_width, control_height; /*------------------------------------------------------------*/ /* layout_ghostview */ /*------------------------------------------------------------*/ static void layout_ghostview(void) { Arg args[10]; Cardinal n; Dimension page_prefWidth, page_prefHeight; Dimension page_width, page_height; static Boolean firsttime=True; Boolean auto_resize; BEGINMESSAGE(layout_ghostview) if (!firsttime) { XtSetArg(args[0], XtNallowShellResize,&auto_resize); XtGetValues(toplevel, args,ONE); if (auto_resize != app_res.auto_resize) { INFMESSAGE(######## changing resize behaviour) # ifdef MESSAGES if (app_res.auto_resize) {INFMESSAGE(shell is allowed to resize)} else {INFMESSAGE(shell must not resize)} # endif XtSetArg(args[0], XtNallowShellResize,app_res.auto_resize); XtSetValues(toplevel, args,ONE); if (app_res.auto_resize==False) { ENDMESSAGE(layout_ghostview) return; } INFIMESSAGE(setting tocFrame height:,TOC3D_INITIAL_HEIGHT) XtSetArg(args[0], XtNheight,TOC3D_INITIAL_HEIGHT); XtSetValues(newtocFrame, args, ONE); } } INFMESSAGE(#### retrieving dimensions) XtSetArg(args[0], XtNpreferredWidth, &page_prefWidth); XtSetArg(args[1], XtNpreferredHeight, &page_prefHeight); XtSetArg(args[2], XtNwidth, &page_width); XtSetArg(args[3], XtNheight, &page_height); XtGetValues(page, args, FOUR); INFIIMESSAGE(## preferred,page_prefWidth,page_prefHeight) INFIIMESSAGE(## actual,page_width,page_height) if (page_prefWidth != page_width || page_prefHeight != page_height) { INFMESSAGE(#### setting ghostview widget size to its preferred size) XtSetArg(args[0], XtNwidth, page_prefWidth); XtSetArg(args[1], XtNheight, page_prefHeight); XtSetValues(page, args, TWO); } cb_positionPage(page,(XtPointer)NULL,(XtPointer)NULL); if (firsttime) { n=0; XtSetArg(args[n], XtNminWidth, (Dimension)app_res.minimum_width); n++; XtSetArg(args[n], XtNminHeight,(Dimension)app_res.minimum_height);n++; if (app_res.auto_resize==False) { INFMESSAGE(switching to No-Resize mode) XtSetArg(args[n], XtNallowShellResize,app_res.auto_resize); n++; } XtSetValues(toplevel, args,n); firsttime=False; } ENDMESSAGE(layout_ghostview) } /*############################################################*/ /* setup_layout_ghostview */ /*############################################################*/ void setup_layout_ghostview(void) { BEGINMESSAGE(setup_layout_ghostview ) ENDMESSAGE(setup_layout_ghostview) } /*------------------------------------------------------------*/ /* set_new_scale */ /*------------------------------------------------------------*/ static Boolean set_new_scale(void) { int new_scale,new_scale_base; Boolean changed = False; Arg args[2]; Cardinal n; Scale scale; float ascale; BEGINMESSAGE(set_new_scale) new_scale_base = gv_scale_base; if (!default_xdpi || !default_ydpi || new_scale_base != gv_scale_base_current) { scale = gv_scales[new_scale_base]; ascale = scale->scale; if ((scale->is_base)&SCALE_IS_REAL_BASED) { default_xdpi = gv_real_xdpi; default_ydpi = gv_real_ydpi; } else { default_xdpi = gv_pixel_xdpi; default_ydpi = gv_pixel_ydpi; } default_xdpi *= ascale; default_ydpi *= ascale; INFIMESSAGE(old scale base,gv_scale_base_current); INFIMESSAGE(new scale base,new_scale_base); XtSetArg(args[0], XtNleftBitmap, None); if (gv_scale_base_current >=0) XtSetValues(scaleEntry[gv_scale_base_current],args, ONE); XtSetArg(args[0], XtNleftBitmap, app_res.selected_bitmap); XtSetValues(scaleEntry[new_scale_base],args, ONE); gv_scale_base_current = new_scale_base; changed=True; } new_scale = gv_scale; if (changed || new_scale != gv_scale_current || gv_scales[new_scale]->scale <=0) { float xdpi, ydpi; GhostviewDisableInterpreter(page); scale = gv_scales[new_scale]; ascale = scale->scale; if (!ascale) { int dx = current_urx - current_llx + 1; int dy = current_ury - current_lly + 1; float ascale1; float ascale2; if (gv_orientation == 2 || gv_orientation == 3) { int hlp = dx; dx = dy; dy = hlp; } ascale1 = (float)viewClip->core.width / dx / 72.0 * default_xdpi; ascale2 = (float)viewClip->core.height / dy / 72.0 * default_ydpi; ascale = ascale1 < ascale2 ? ascale1 : ascale2; } else if (fabs(ascale+1) <= 0.001) { int dx = current_urx - current_llx + 1; int dy = current_ury - current_lly + 1; if (gv_orientation == 2 || gv_orientation == 3) { int hlp = dx; dx = dy; dy = hlp; } ascale = (float)viewClip->core.width / dx / 72.0 * default_xdpi; } else if (fabs(ascale+3) <= 0.001) { int dx = current_urx - current_llx + 1; int dy = current_ury - current_lly + 1; if (gv_orientation == 2 || gv_orientation == 3) { int hlp = dx; dx = dy; dy = hlp; } ascale = (float)viewClip->core.height / dy / 72.0 * default_xdpi; } else if (fabs(ascale+2) <= 0.001) { ascale = gv_ascale; } xdpi = default_xdpi / ascale; ydpi = default_ydpi / ascale; n=0; XtSetArg(args[n], XtNlabel, scale->name); n++; XtSetValues(scaleButton, args, n); n=0; XtSetArg(args[n], XtNlxdpi, (1000*xdpi)); n++; XtSetArg(args[n], XtNlydpi, (1000*ydpi)); n++; XtSetValues(page, args, n); n=0; XtSetArg(args[n], XtNleftBitmap, None); n++; if (gv_scale_current >=0) XtSetValues(scaleEntry[gv_scale_current],args, n); n=0; XtSetArg(args[n], XtNleftBitmap, app_res.selected_bitmap); n++; XtSetValues(scaleEntry[new_scale],args, n); gv_scale_current = new_scale; changed=True; } ENDMESSAGE(set_new_scale) return changed; } /*------------------------------------------------------------*/ /* set_orientationButton_label */ /*------------------------------------------------------------*/ static void set_orientationButton_label(int orientation) { Arg args[1]; Widget w = portraitEntry; String label; BEGINMESSAGE(set_orientationButton_label) if (orientation == O_LANDSCAPE) w = landscapeEntry; else if (orientation == O_UPSIDEDOWN) w = upsidedownEntry; else if (orientation == O_SEASCAPE) w = seascapeEntry; XtSetArg(args[0], XtNlabel,&label); XtGetValues(w, args, ONE); XtSetArg(args[0], XtNlabel,label); XtSetValues(orientationButton, args, ONE); ENDMESSAGE(set_orientationButton_label) } /*------------------------------------------------------------*/ /* set_newBitmapIfChanged */ /*------------------------------------------------------------*/ static void set_newBitmapIfChanged(Widget w, Pixmap new_bitmap) { Arg args[1]; Pixmap old_bitmap; BEGINMESSAGE(set_newBitmapIfChanged) if (!w) return; /* continuing will eventually cause a core dump */ XtSetArg(args[0], XtNleftBitmap, &old_bitmap); XtGetValues(w, args, ONE); if (new_bitmap != old_bitmap) { XtSetArg(args[0], XtNleftBitmap, new_bitmap); XtSetValues(w, args, ONE); } ENDMESSAGE(set_newBitmapIfChanged) } /*------------------------------------------------------------*/ /* set_new_orientation */ /*------------------------------------------------------------*/ static Boolean set_new_orientation(int pagenumber) { Boolean changed = False; int from_doc = 0; int no; Widget w; Pixmap bitmap; XtPageOrientation xto,xto_old; BEGINMESSAGE(set_new_orientation) no = O_UNSPECIFIED; if (no == O_UNSPECIFIED && gv_orientation != gv_orientation_old) { INFIMESSAGE(forcing new orientation to be,no) no = gv_orientation; INFMESSAGE(disabling automatic orientation) gv_orientation_auto = 0; } if (no == O_UNSPECIFIED && gv_orientation_auto) { int po; po = doc_preferredOrientationOfPage(doc,pagenumber); INFIMESSAGE(using orientation from doc, po) if (po != O_UNSPECIFIED) { INFIMESSAGE(using orientation from doc, po) no = po; from_doc = 1; } } if (no==O_UNSPECIFIED) no = gv_orientation_old; if (no!=O_PORTRAIT && no!=O_LANDSCAPE && no!=O_SEASCAPE && no!=O_UPSIDEDOWN) no = gv_fallback_orientation; gv_orientation = no; xto = doc_convDocOrientToXtOrient(gv_orientation, gv_swap_landscape ); xto_old = doc_convDocOrientToXtOrient(gv_orientation_old,gv_swap_landscape_old); IIMESSAGE(xto,xto_old) if (xto != xto_old) { Arg args[1]; if (gv_orientation_old == O_PORTRAIT) w = portraitEntry; else if (gv_orientation_old == O_LANDSCAPE) w = landscapeEntry; else if (gv_orientation_old == O_UPSIDEDOWN) w = upsidedownEntry; else w = seascapeEntry; widgets_setSelectedBitmap(w,0); INFIMESSAGE(changing orientation for page to be,xto) GhostviewDisableInterpreter(page); XtSetArg(args[0], XtNorientation, xto); XtSetValues(page, args, ONE); changed = True; set_orientationButton_label(gv_orientation); } if (from_doc) bitmap = app_res.document_bitmap; else bitmap = app_res.selected_bitmap; if ( no == O_PORTRAIT) w = portraitEntry; else if ( no == O_LANDSCAPE) w = landscapeEntry; else if ( no == O_UPSIDEDOWN) w = upsidedownEntry; else w = seascapeEntry; if (w) set_newBitmapIfChanged(w,bitmap); if (gv_swap_landscape != gv_swap_landscape_old) widgets_setSelectedBitmap(swapEntry,gv_swap_landscape); if (gv_orientation_auto != gv_orientation_auto_old) widgets_setSelectedBitmap(autoOrientEntry,gv_orientation_auto); gv_orientation_old = gv_orientation; gv_orientation_auto_old = gv_orientation_auto; gv_swap_landscape_old = gv_swap_landscape; ENDMESSAGE(set_new_orientation) return(changed); } /*------------------------------------------------------------*/ /* set_pagemediaButton */ /*------------------------------------------------------------*/ static void set_pagemediaButton_label(int media_id) { String s = NULL; Arg args[1]; BEGINMESSAGE(set_pagemediaButton_label) if (media_id>=0) { Widget w; if (pagemediaEntry[media_id]) w = pagemediaEntry[media_id]; else if (media_id <= 0) w = NULL; else w = pagemediaEntry[media_id-1]; if (!w) goto out; XtSetArg(args[0], XtNlabel, &s); XtGetValues(w, args, ONE); } else s = "?"; XtSetArg(args[0], XtNlabel, s); XtSetValues(pagemediaButton, args, ONE); out: ENDMESSAGE(set_pagemediaButton_label) return; } /*------------------------------------------------------------*/ /* set_new_pagemedia */ /*------------------------------------------------------------*/ static Boolean set_new_pagemedia(int pagenumber) { int new_llx,new_lly,new_urx,new_ury; Boolean changed = False; int from_doc = 0; Arg args[4]; Widget w = NULL; Pixmap bitmap; int num_doc_media; int nm; int media_bbox; BEGINMESSAGE(set_new_pagemedia) num_doc_media=0; if (doc) num_doc_media = doc->nummedia; media_bbox = num_doc_media; nm = MEDIA_ID_INVALID; if (gv_pagemedia != gv_pagemedia_old) { if (doc_mediaIsOk(doc,pagenumber,gv_pagemedia)) { nm = gv_pagemedia; INFIMESSAGE(forcing new pagemedia to be,nm) INFMESSAGE(disabling automatic pagemedia) gv_pagemedia_auto = 0; } } else if (gv_pagemedia==media_bbox && !gv_pagemedia_auto) { if (doc_mediaIsOk(doc,pagenumber,gv_pagemedia)) nm = gv_pagemedia; } else if (gv_pagemedia_auto) { nm = doc_preferredMediaOfPage(doc,pagenumber,&new_llx,&new_lly,&new_urx,&new_ury); if (nm != MEDIA_ID_INVALID) { INFIMESSAGE(using pagemedia preferred from doc, nm) from_doc = 1; } } if (nm==MEDIA_ID_INVALID && doc_mediaIsOk(doc,pagenumber,gv_pagemedia_old)) nm = gv_pagemedia_old; if (nm==MEDIA_ID_INVALID) nm = gv_fallback_pagemedia; gv_pagemedia = nm; /* If pagemedia changed, remove the old marker. */ IIMESSAGE(gv_pagemedia,gv_pagemedia_old) if (gv_pagemedia != gv_pagemedia_old) { if (gv_pagemedia_old>=0) { if (pagemediaEntry[gv_pagemedia_old]) w = pagemediaEntry[gv_pagemedia_old]; else w = pagemediaEntry[gv_pagemedia_old-1]; widgets_setSelectedBitmap(w,0); } set_pagemediaButton_label(gv_pagemedia); } if (gv_pagemedia >= 0) { if (from_doc) bitmap = app_res.document_bitmap; else bitmap = app_res.selected_bitmap; if (pagemediaEntry[gv_pagemedia]) w = pagemediaEntry[gv_pagemedia]; else w = pagemediaEntry[gv_pagemedia-1]; if (w) set_newBitmapIfChanged(w,bitmap); } if (gv_pagemedia_auto != gv_pagemedia_auto_old) widgets_setSelectedBitmap(autoMediaEntry,gv_pagemedia_auto); if (gv_pagemedia == num_doc_media) { doc_boundingBoxOfPage(doc,pagenumber,&new_llx,&new_lly,&new_urx,&new_ury); } else { new_llx = new_lly = 0; if (gv_pagemedia < num_doc_media) { new_urx = doc->media[gv_pagemedia].width-1; new_ury = doc->media[gv_pagemedia].height-1; } else { new_urx = gv_medias[gv_pagemedia-num_doc_media]->width-1; new_ury = gv_medias[gv_pagemedia-num_doc_media]->height-1; } } /* If bounding box changed, setup for new size. */ if ((new_llx != current_llx) || (new_lly != current_lly) || (new_urx != current_urx) || (new_ury != current_ury)) { INFMESSAGE(bounding box changed) INFIIMESSAGE(lower left:,new_llx,new_lly) INFIIMESSAGE(upper right:,new_urx,new_ury) GhostviewDisableInterpreter(page); changed = True; current_llx = new_llx; current_lly = new_lly; current_urx = new_urx; current_ury = new_ury; XtSetArg(args[0], XtNllx, current_llx); XtSetArg(args[1], XtNlly, current_lly); XtSetArg(args[2], XtNurx, current_urx); XtSetArg(args[3], XtNury, current_ury); XtSetValues(page, args, FOUR); } gv_pagemedia_old = gv_pagemedia; gv_pagemedia_auto_old = gv_pagemedia_auto; ENDMESSAGE(set_new_pagemedia) return changed; } /*------------------------------------------------------------*/ /* same_document_media */ /*------------------------------------------------------------*/ static Boolean same_document_media(void) { int i; Boolean same = True; BEGINMESSAGE(same_document_media) if (olddoc == NULL && doc == NULL) same=True; else if (olddoc == NULL || doc == NULL) same=False; else if (olddoc->nummedia != doc->nummedia) same=False; else for (i = 0; i < doc->nummedia; i++) { if (strcmp(olddoc->media[i].name, doc->media[i].name)) { same=False; break; } } ENDMESSAGE(same_document_media) return(same); } /*############################################################*/ /* misc_buildPagemediaMenu */ /*############################################################*/ void misc_buildPagemediaMenu(void) { Widget w; int i,num_doc_media; BEGINMESSAGE(misc_buildPagemediaMenu) if (pagemediaMenu && same_document_media()) { ENDMESSAGE(misc_buildPagemediaMenu) return; } if (pagemediaMenu) XtDestroyWidget(pagemediaMenu); pagemediaMenu = XtCreatePopupShell("menu", simpleMenuWidgetClass,pagemediaButton, NULL,(Cardinal)0); autoMediaEntry = XtCreateManagedWidget("automatic",smeBSBObjectClass,pagemediaMenu,NULL,(Cardinal)0); XtAddCallback(autoMediaEntry,XtNcallback,cb_setPagemedia,(XtPointer)MEDIA_ID_AUTO); widgets_setSelectedBitmap(autoMediaEntry,gv_pagemedia_auto); XtCreateManagedWidget("line",smeLineObjectClass,pagemediaMenu,NULL,(Cardinal)0); /* Build the Page Media menu */ /* the Page media menu has three parts. * - the automatic media detection entry. * - the document defined page medias * - the standard page medias */ num_doc_media = 0; if (doc) num_doc_media = doc->nummedia; i = gv_num_std_pagemedia + num_doc_media; XtFree((XtPointer)pagemediaEntry); pagemediaEntry = (Widget *) XtMalloc(i * sizeof(Widget)); if (doc && doc->nummedia) { for (i = 0; i < doc->nummedia; i++) { pagemediaEntry[i] = XtCreateManagedWidget(doc->media[i].name,smeBSBObjectClass, pagemediaMenu,NULL,(Cardinal)0); XtAddCallback(pagemediaEntry[i], XtNcallback,cb_setPagemedia, (XtPointer)(intptr_t)i); } w = XtCreateManagedWidget("line", smeLineObjectClass, pagemediaMenu,NULL,(Cardinal)0); } for (i = 0; gv_medias[i]; i++) { pagemediaEntry[i+num_doc_media] = NULL; if (!(gv_medias[i]->used)) continue; pagemediaEntry[i+num_doc_media] = XtCreateManagedWidget(gv_medias[i]->name,smeBSBObjectClass, pagemediaMenu,NULL,(Cardinal)0); XtAddCallback(pagemediaEntry[i+num_doc_media], XtNcallback,cb_setPagemedia, (XtPointer)(intptr_t)(i+num_doc_media)); } { Boolean b = (doc_mediaIsOk(doc,current_page,num_doc_media) ? True : False); XtSetSensitive(pagemediaEntry[num_doc_media],b); } ENDMESSAGE(misc_buildPagemediaMenu) } /*------------------------------------------------------------*/ /* build_label_menu */ /*------------------------------------------------------------*/ Widget build_label_menu(Widget parent, String name, String label, Pixmap bitmap) { Arg args[5]; Cardinal n; Widget menu, entry; BEGINMESSAGE(build_label_menu) n=0; menu = XtCreatePopupShell("menu", simpleMenuWidgetClass,parent, args, n); n=0; XtSetArg(args[n], XtNlabel, label); n++; if (bitmap) { XtSetArg(args[n], XtNleftMargin, 20); n++; XtSetArg(args[n], XtNleftBitmap, bitmap); n++; } XtSetArg(args[n], XtNjustify, XtJustifyCenter); n++; entry = XtCreateManagedWidget(name, smeBSBObjectClass,menu, args, n); ENDMESSAGE(build_label_menu) return menu; } /*############################################################*/ /* catch_Xerror */ /* Catch X errors die gracefully if one occurs */ /*############################################################*/ int catch_Xerror(Display *dpy, XErrorEvent *err) { BEGINMESSAGE(catch_Xerror) if (err->error_code == BadImplementation) { old_Xerror(dpy, err); return 0; } if (dying) return 0; dying = True; bomb = *err; XtDestroyWidget(toplevel); ENDMESSAGE(catch_Xerror) return 0; } /*############################################################*/ /* quote_filename */ /* Quotes special characters in filenames */ /* (taken from bash sources) */ /*############################################################*/ char * quote_filename (char *string) { int c; char *result, *r, *s; BEGINMESSAGE(quote_filename) result = (char*) XtMalloc((2 * strlen (string) + 1) * sizeof(char)); for (r = result, s = string; s && (c = *s); s++) { switch (c) { case ' ': case '\t': case '\n': /* IFS white space */ case '\'': case '"': case '\\': /* quoting chars */ case '|': case '&': case ';': /* shell metacharacters */ case '(': case ')': case '<': case '>': case '!': case '{': case '}': /* reserved words */ case '*': case '[': case '?': case ']': /* globbing chars */ case '^': case '$': case '`': /* expansion chars */ *r++ = '\\'; *r++ = c; break; case '#': /* comment char */ if (s == string) *r++ = '\\'; /* FALLTHROUGH */ default: *r++ = c; break; } } *r = '\0'; ENDMESSAGE(quote_filename) return (result); } gv-3.7.4/src/options_gv.h0000664000076400007640000000240711735103746012235 00000000000000/* ** ** options_gv.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_OPTIONS_GV_H_ #define _GV_OPTIONS_GV_H_ extern void options_gv_createScaleMenus (void); extern void options_gv_createMediaMenus (void); #endif /* _GV_OPTIONS_GV_H_ */ gv-3.7.4/src/process.h0000664000076400007640000000326211735103746011524 00000000000000/* ** ** process.h ** ** Copyright (C) 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_PROCESS_H_ #define _GV_PROCESS_H_ extern void cb_processKillProcess ( Widget, XtPointer, XtPointer ); extern void process_kill_process ( ProcessData /* pd */ ); extern void process_kill_all_processes ( void ); extern ProcessData process_fork ( String, /* name */ String, /* command */ ProcessNotifyProc, /* notify_proc */ XtPointer /* data */ ); extern void process_menu ( ProcessData, /* pd */ int /* action */ ); extern char* process_disallow_quit ( void ); #endif /* _GV_PROCESS_H_ */ gv-3.7.4/src/confirm.h0000664000076400007640000000335511735103745011505 00000000000000/* ** ** confirm.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@dipmza.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_CONFIRM_H_ #define _GV_CONFIRM_H_ #define CONFIRM_BUTTON_DONE (1<<0) #define CONFIRM_BUTTON_CANCEL (1<<1) extern void cb_popdownConfirmPopup (Widget, XtPointer, XtPointer); extern void cb_popupConfirmPopup (Widget, XtPointer, XtPointer); extern void action_preferConfirmPopupButton (Widget, XEvent *, String *, Cardinal *); extern void makeConfirmPopup (void); extern void ConfirmPopupSetButton (int, XtCallbackProc); extern void ConfirmPopupSetMessage (String, String); extern void ConfirmPopupSetInitialButton (int); #endif /* _GV_CONFIRM_H_ */ gv-3.7.4/src/gv_message.h0000664000076400007640000001207511735103745012167 00000000000000/* ** ** gv_messages.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** */ char *message_usage = "\ Usage: gv [OPTION]... [FILE]\n\ PostScript and PDF viewer.\n\ [-]-monochrome display document using only black and white\n\ [-]-grayscale display document without colors\n\ [-]-color display document as usual\n\ [-]-safer start ghostscript in safe mode\n\ [-]-nosafer do not start ghostscript in safe mode\n\ [-]-safedir start ghostscript from a safe diretory\n\ [-]-nosafedir do not start ghostscript from a safe diretory\n\ [-]-quiet start ghostscript with the -dQUIET option\n\ [-]-noquiet do not start ghostscript with the -dQUIET option\n\ [-]-infoSilent do not show any messages in the info popup window\n\ [-]-infoErrors do not show warning messages in the info popup window\n\ [-]-infoAll do show all messages in the info popup window\n\ [-]-arguments=ARGS start ghostscript with additional options as specified\n\ by the string ARGS\n\ [-]-page=LABEL display the page with label LABEL first\n\ [-]-center the page should be centered automatically\n\ [-]-nocenter the page should not be centered automatically\n\ [-]-media=MEDIA selects the paper size to be used\n\ [-]-orientation=ORIENTATION sets the orientation of the page\n\ [-]-scale=N|f.f selects the scale N, or arbitrary scale f.f\n\ [-]-scalebase=N selects the scale base N\n\ [-]-swap interchange the meaning of the orientations landscape\n\ and seascape\n\ [-]-noswap do not interchange the meaning of the orientation\n\ landscape and seascape\n\ [-]-antialias use antialiasing\n\ [-]-noantialias do not use antialiasing\n\ [-]-dsc dsc comments are respected\n\ [-]-nodsc dsc comments are not respected\n\ [-]-eof ignore the postscript EOF comment while scanning\n\ documents\n\ [-]-noeof do not ignore the postscript EOF comment while\n\ scanning documents\n\ [-]-pixmap use backing pixmap\n\ [-]-nopixmap do not use backing pixmap\n\ [-]-watch watch the document file for changes\n\ [-]-nowatch do not watch the document file for changes\n\ [-]-help print a help message and exit\n\ [-]-usage print a usage message and exit\n\ [-]-resize fit the size of the window to the size of the page\n\ [-]-noresize do not fit the size of the window to the size of the page\n\ -geometry [][x][{+-}{+-}]\n\ [-]-ad=FILE read and use additional resources from FILE\n\ [-]-style=FILE read and use additional resources from FILE. These resources\n\ have lower priority than those provided on the context of --ad\n\ [-]-password=PASSWORD Sets the password for opening encrypted PDF files\n\ [-]-spartan shortcut for --style=gv_spartan.dat\n\ [-]-widgetless shortcut for --style=gv_widgetless.dat\n\ [-]-fullscreen start in fullscreen mode (needs support from WM)\n\ [-]-presentation Presentation mode (fullscreen, Fit to window,\n\ widgetless and no resizing of window)\n\ [-]-version show gv version and exit\n\ "; gv-3.7.4/src/Aaa_bison.h0000664000076400007640000000064211676665540011732 00000000000000 #define OC 258 #define CC 259 #define OA 260 #define CA 261 #define OP 262 #define CP 263 #define NAME 264 #define NUMBER 265 #define INFINITY 266 #define VERTICAL 267 #define HORIZONTAL 268 #define EQUAL 269 #define DOLLAR 270 #define PLUS 271 #define MINUS 272 #define TIMES 273 #define DIVIDE 274 #define PERCENTOF 275 #define PERCENT 276 #define WIDTH 277 #define HEIGHT 278 #define UMINUS 279 #define UPLUS 280 gv-3.7.4/src/gv_current.xbm0000664000076400007640000000057211437764362012572 00000000000000#define current_width 13 #define current_height 23 static unsigned char current_bits[] = { 0xff, 0x1f, 0x7f, 0x10, 0x7f, 0x17, 0x7f, 0x10, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0x7f, 0x10, 0x7f, 0x17, 0x7f, 0x10, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0x73, 0x10, 0x61, 0x10, 0x73, 0x10, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0x7f, 0x10, 0x7f, 0x17, 0x7f, 0x10, 0xff, 0x1f, }; gv-3.7.4/src/gv_even.xbm0000664000076400007640000000056111437764362012043 00000000000000#define even_width 13 #define even_height 23 static unsigned char even_bits[] = { 0xff, 0x1f, 0x7f, 0x10, 0x7f, 0x17, 0x7f, 0x10, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0x73, 0x10, 0x61, 0x17, 0x73, 0x10, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0x7f, 0x10, 0x7f, 0x17, 0x7f, 0x10, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0x73, 0x10, 0x61, 0x17, 0x73, 0x10, 0xff, 0x1f, }; gv-3.7.4/src/setenv.c0000664000076400007640000000364311735103746011350 00000000000000/* setenv and unsetenv emulation code Copyright (C) 1992,1995-1999,2000-2003,2005-2008 Free Software Foundation, Copyright (C) 2008 Markus Steinborn This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "ac_config.h" #include #include #include #include extern char **environ; int gnu_gv_setenv (const char *name, const char *value, int overwrite) { if (!overwrite && getenv(name)) return 0; char *tmp = malloc(strlen(name)+strlen(value)+2); strcpy(tmp, name); strcat(tmp, "="); strcat(tmp, value); return putenv(tmp); /* The string pointed to by string becomes part of the environment, so altering the string changes the environment. so we cannot free it. */ } int gnu_gv_unsetenv (const char *name) /* Taken from GNULIB, slightly modified */ { size_t len; char **ep; if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) { errno = EINVAL; return -1; } len = strlen (name); ep = environ; while (*ep != NULL) if (!strncmp (*ep, name, len) && (*ep)[len] == '=') { /* Found it. Remove this pointer by moving later ones back. */ char **dp = ep; do dp[0] = dp[1]; while (*dp++); /* Continue the loop in case NAME appears again. */ } else ++ep; return 0; } gv-3.7.4/src/media.h0000664000076400007640000000235311735103745011124 00000000000000/* ** ** media.h ** ** Copyright (C) 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** */ #ifndef _GV_MEDIA_H_ #define _GV_MEDIA_H_ extern void media_freeMedias (Media*); extern Media* media_parseMedias (char*); extern int media_numMedias (Media *); #endif /* _GV_MEDIA_H_ */ gv-3.7.4/src/gv_layout_res.dat0000664000076400007640000002254011735103745013250 00000000000000 !######################################## !##### Layouts !######################################## !##### Main Layout GV*viewControl.layout:\ |v{\ 4<+[1]>\ |h{\ 4<+[1]>\ page\ 4<+[1]>\ }\ 4<+[1]>\ } GV*control.layout:\ |v{\ f=8\ s=8\ ss=4\ sss=2\ a=6\ pbw=(10*(|width processButton))\ pbss=($ss*($pbw/($pbw+1)))\ $f\ |h{\ $f\ |v{\ fileButton<+[1]*>\ $s\ |h{\ 0<+[1]>\ |v{\ autoResize<+30*>\ $a\ |h{\ 1<+[1]>\ locator\ 1<+[1]>\ }\ $a\ openFile<+30*>\ 1\ printAll<+30*>\ 1\ printMarked<+30*>\ 1\ saveAll<+30*>\ 1\ saveMarked<+30*>\ $a\ |h{\ 0<+[1]>\ pannerFrame\ 0<+[1]>\ }\ $a\ |h{\ prevPage<+30*>\ 1\ nextPage<+30*>\ }\ 1\ redisplay<+30*>\ }\ 0<+[1]>\ }\ $a\ |h{\ 0<+[1]>\ toggleOdd\ 1\ toggleEven\ 1\ toggleCurrent\ 1\ unmarkAll\ 0<+[1]>\ }\ $a\ |h{\ 0<+30>\ newtocScroll<*+200[1]-[1]>\ $ss\ newtocFrame<-[2]*+200[1]-[1]>\ 0<+30>\ }\ }\ $s\ |v{\ |h{\ stateButton<-90%*>\ $ss<-90%>\ pageButton<-90%*>\ $ss<-90%>\ orientationButton<-90%*>\ $ss<-90%>\ scaleButton<-90%*>\ $ss<-90%>\ pagemediaButton<-90%*>\ $pbss<-90%>\ |v{\ 0<+[1]>\ processButton<-90%*>\ 0<+[1]>\ }\ $ss<-90%>\ |v{\ 0<+[1]>\ |h{\ titleButton<+5[1]-(100%)[1]*>\ $ss<-90%>\ dateButton<+[1]-(100%)[1]*>\ }\ 0<+[1]>\ }\ }\ $s\ |h{\ viewFrame<+9999-100%*+9999-100%>\ }\ }\ $f\ }\ $f\ } !##### Table of contents GV*newtocControl.layout:\ |v{\ |h{\ newtoc\ 0<+[1]>\ }\ 0<+[1]>\ } !##### Zoom Popup Layout GV*zviewControl.layout:\ |v{\ 4<+[1]>\ |h{\ 4<+[1]>\ page<-100%*-100%>\ 4<+[1]>\ }\ 4<+[1]>\ } GV*zoomControl.layout:\ |h{ \ s=8\ $s\ |v{ \ $s\ zviewFrame<+[2]-100%*+[2]-100%>\ $s\ dismiss<+[1]-100%*>\ $s\ }\ $s\ } !##### OptionsGV Popup Layout GV*optiongvPopup*layout:\ |v{ \ bs=8\ s=4\ ss=3\ sss=2\ $bs\ |h{\ $bs\ |v{\ orientLabel\ $sss\ orientButton\ $sss\ forientLabel\ $sss\ forientButton\ $sss\ scalesLabel\ $sss\ scalesButton\ (2*$bs)\ swapLandscape<+[1]*>\ $sss\ autoResize<+[1]*>\ $sss\ watch<+[1]*>\ $sss\ infoVerboseLabel<+[1]*>\ $sss\ infoVerboseButton<+[1]*>\ }\ $ss\ |v{\ mediaLabel\ $sss\ mediaButton\ $sss\ fmediaLabel\ $sss\ fmediaButton\ $sss\ scaleBaseLabel\ $sss\ scaleBaseButton\ (2*$bs)\ respectDSC<+[1]*>\ $sss\ eof<+[1]*>\ $sss\ antialias<+[1]*>\ $sss\ ascaleLabel<+[1]*>\ $sss\ ascaleFrame<+[1]*>\ }\ $bs\ }\ (2*$bs)\ |h{\ (3*$bs)<-90%>\ apply\ $bs<+[1]-100%>\ save\ $bs<+[1]-100%>\ dismiss\ (3*$bs)<-90%>\ }\ $bs\ } !##### OptionsSetup Popup Layout GV*optionsetupPopup*layout:\ |v{ \ bs=8\ s=4\ ss=3\ sss=2\ $bs\ |h{\ $bs\ |v{\ confirmLabel<+[1]*>\ $sss\ confirmButton<+[1]*>\ $sss\ titleLabel<+[1]*>\ $sss\ titleButton<+[1]*>\ $sss\ misc<+[1]*>\ $sss\ scrolling<+[1]*>\ $sss\ eyeGuide<+[1]*>\ $sss\ confirmPrint<+[1]*>\ $sss\ autoCenter<+[1]*>\ $sss\ pixmap<+[1]*>\ $sss\ magmenuLabel<+[1]*>\ $sss\ magmenuFrame<+[1]*+[1]>\ $sss\ miscmenuLabel<+[1]*>\ $sss\ miscmenuFrame<+[1]*+[1]>\ }\ $s\ |v{\ scalesLabel<+[2]-100%*>\ $ss\ scalesFrame<+[2]-100%*+[1]>\ $s\ |h{\ |v{\ $s\ screenSizeLabel<+[1]*>\ $bs\ printCommandLabel<+[1]*>\ }\ $s\ |v{\ screenSizeFrame<+[2]-100%*>\ $s\ printCommandFrame<+[2]-100%*>\ }\ }\ }\ $s\ |v{\ mediasLabel<+[2]-100%*>\ $ss\ mediasFrame<+[2]-100%*+[1]>\ }\ $bs\ }\ (2*$bs)\ |h{\ (3*$bs)<+[1]-90%>\ apply\ $bs<+[1]-100%>\ save\ $bs<+[1]-100%>\ dismiss\ (3*$bs)<+[1]-90%>\ }\ $bs\ } !##### OptionsFS Popup Layout GV*optionfsPopup*layout:\ |v{ \ bs=8\ s=4\ ss=3\ sss=2\ $bs\ |h{\ $bs\ |v{\ filtersLabel<+[2]-100%*>\ $ss\ filtersFrame<+[2]-100%*+[1]>\ }\ $bs\ |v{\ dirsLabel<+[2]-100%*>\ $ss\ dirsFrame<+[2]-100%*+[1]>\ }\ $bs\ }\ $bs\ |h{\ $bs\ |v{\ $s\ filterLabel<+[1]*>\ $bs\ scratchDirLabel<+[1]*>\ $bs\ saveDirLabel<+[1]*>\ }\ $s\ |v{\ filterFrame<+[2]-100%*>\ $s\ scratchDirFrame<+[2]-100%*>\ $s\ saveDirFrame<+[2]-100%*>\ }\ $bs\ }\ (2*$bs)\ |h{\ (3*$bs)<-90%>\ apply\ $bs<+[1]-100%>\ save\ $bs<+[1]-100%>\ dismiss\ (3*$bs)<-90%>\ }\ $bs\ } !##### OptionsGS Popup Layout GV*optiongsPopup*layout:\ |v{\ ls=15\ bs=8\ ss=3\ s=4\ sss=2\ $bs\ |h{\ $bs\ gsLabel\ 0<+[1]>\ }\ |h{\ $bs\ gsFrame<+[1]-95%*>\ $ss\ safeDir\ $ss\ safer\ $ss\ quiet\ $bs\ }\ $sss\ |h{\ $bs\ argumentsLabel\ 0<+[1]>\ }\ |h{\ $bs\ argumentsFrame<+[1]-95%*>\ $bs\ }\ $sss\ |h{\ $bs\ |v{\ |h{\ x11devLabel\ 0<+[1]>\ }\ x11devFrame<+[1]-95%*>\ }\ $ss\ |v{\ |h{\ x11alphadevLabel\ 0<+[1]>\ }\ x11alphadevFrame<+[1]-95%*>\ }\ $bs\ }\ $sss\ |h{\ $bs\ scanLabel\ 0<+[1]>\ }\ |h{\ $bs\ scanFrame<+[1]-50%*+[1]>\ $bs\ }\ $sss\ |h{\ $bs\ convLabel<+50*>\ 0<+[1]>\ }\ |h{\ $bs\ convFrame<+[1]-50%*+[1]>\ $bs\ }\ (2*$bs)\ |h{\ (4*$bs)<-90%>\ apply\ $bs<+[1]-100%>\ save\ $bs<+[1]-100%>\ defaults\ $bs<+[1]-100%>\ dismiss\ (4*$bs)<-90%>\ }\ $bs\ } !##### Note Popup Layout GV*notePopup*layout:\ |v{ \ vs=8\ $vs<+[1]>\ |h{ \ $vs<+[1]>\ message<+[1]-100%*+[1]-100%>\ $vs<+[1]>\ }\ $vs<+[1]>\ |h{\ $vs<+[1]>\ done<-100%*>\ $vs<+[1]>\ }\ $vs<+[1]>\ } !##### Dialog Popup Layout GV*dialogPopup*layout:\ |v{ \ s=7\ bs=14\ $bs\ |h{ \ (2*$bs)\ message<+[1]*>\ (2*$bs)\ }\ $bs\ |h{\ $bs\ dialog_textLabel\ $s \ dialog_textFrame<+[1]-100%*>\ $bs\ }\ $bs\ |h{\ (2*$bs)<+[1]>\ done\ $bs<+[1]>\ cancel\ (2*$bs)<+[1]>\ }\ $bs\ } !##### Confirm Popup Layout GV*confirmPopup*layout:\ |v{ \ h2 =(|height message2)\ h3 =(|height message3)\ s2 =(4*($h2/($h2+1)))\ s3 =(8*($h3/($h3+1)))\ vs=10\ (2*$vs)\ |h{\ $vs\ |v{\ message2<+[1]*>\ (2*$s2)\ message3<+[1]*>\ $s3\ }\ $vs\ }\ $vs\ |h{\ (2*$vs)<+[1]>\ done\ $vs<+[1]>\ cancel\ (2*$vs)<+[1]>\ }\ $vs\ } !##### Version Popup Layout GV*versionPopup*layout:\ |v{ \ vs=8\ (3*$vs)<+[1]-100%>\ |h{ \ $vs<+[1]>\ |h{\ |v{ \ versionTexta\ (|height versionTextb)\ $vs\ }\ $vs\ |v{ \ 0<+[1]>\ versionTextb\ }\ $vs\ }\ $vs\ $vs<+2[1]>\ |v{ 0<+[1]> versionDone 0<+[1]> }\ $vs<+[1]>\ }\ (3*$vs)\ |h{ $vs<+[1]> license $vs <+[1]> }\ (3*$vs)\ |h{ $vs<+[1]> authora $vs<+[1]> }\ $vs\ |h{ $vs<+[1]> authorb $vs<+[1]> }\ $vs\ |h{ $vs<+[1]> authorc $vs <+[1]> }\ (3*$vs)\ |h{ $vs<+[1]> authord $vs <+[1]> }\ (2*$vs)\ } !##### FileSelection Widget Layout GV*fileSel*Clip*Aaa.layout:\ |v{\ list<+[1]*>\ 0<+[1]>\ } GV*fileSel.layout:\ |v{\ bs = 8\ s = 4\ hs2 =(|height button2)\ hs3 =(|height button3)\ hs4 =(|height button4)\ bs2 =($bs*($hs2/($hs2+1)))\ bs3 =($bs*($hs3/($hs3+1)))\ bs4 =($bs*($hs4/($hs4+1)))\ $bs\ |h{\ $bs\ pathframe<+[1]-95%*>\ $bs\ }\ $bs\ |h{\ $bs\ |v{\ topframe<+200-95%*-90%>\ 2\ subframe<+[1]-[1]*+[1]-[1]>\ }\ $s\ |v{\ |h{\ |v{\ |h{\ rescan<+[1]-100%*>\ $s\ dirs<+[1]-100%*>\ }\ $s\ |h{\ filters\ $s\ filterframe<+[1]-95%*>\ }\ }\ }\ $s\ |h{\ subscroll<*+[1]-[1]>\ $s\ curframe<+[1]-[1]*+[1]-[1]>\ $s\ curscroll<*+[1]-[1]>\ }\ }\ $bs\ }\ $bs\ |h{\ 0<+[1]>\ (6*$bs)<-95%>\ button2\ 0<+[1]>\ $bs2<+($bs2)-90%>\ button3\ 0<+[1]>\ $bs3<+($bs3)-90%>\ button4\ 0<+[1]>\ $bs4<+($bs3)-90%>\ button1\ 0<+[1]>\ (6*$bs)<-95%>\ }\ $bs\ } gv-3.7.4/src/options_fs.c0000664000076400007640000001545711735103746012235 00000000000000/* ** ** options_fs.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include "config.h" #include #include #include #include "paths.h" #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_X11(Shell.h) #include "Aaa.h" #include "Button.h" #include "FileSel.h" #include "Switch.h" #include "types.h" #include "callbacks.h" #include "widgets_misc.h" #include "main_resources.h" #include "main_globals.h" #include "misc.h" #include "note.h" #include "options.h" #include "options_fs.h" #include "version.h" static Widget popup,optionControl; static Widget filter,scratch_dir,default_save_dir,filters,dirs; static void options_fs_create(void); static void options_fs_setOptionsAtEntry(void); /*------------------------------------------------------ OptionPopupStruct ------------------------------------------------------*/ OptionPopupStruct gv_options_fs_struct = { NULL, options_fs_create, options_fs_setOptionsAtEntry, False }; OptionPopup gv_options_fs = (OptionPopup) &gv_options_fs_struct; /*------------------------------------------------------ options_fs_setOptionsAtEntry ------------------------------------------------------*/ static void options_fs_setOptionsAtEntry(void) { String s; BEGINMESSAGE(options_fs_setOptionsAtEntry) SMESSAGE(app_res.scratch_dir) widgets_setText(scratch_dir, app_res.scratch_dir); SMESSAGE(app_res.default_save_dir) widgets_setText(default_save_dir, app_res.default_save_dir); SMESSAGE(gv_filters) s = options_squeezeMultiline(gv_filters); widgets_setText(filters,s); XtFree(s); SMESSAGE(gv_dirs) s = options_squeezeMultiline(gv_dirs); widgets_setText(dirs,s); XtFree(s); SMESSAGE(gv_filter) widgets_setText(filter,gv_filter); ENDMESSAGE(options_fs_setOptionsAtEntry) } /*------------------------------------------------------ options_fs_cb_apply ------------------------------------------------------*/ static void options_fs_cb_apply(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { Arg args[5]; Cardinal n; static Boolean s_scratch_dir = False; static Boolean s_default_save_dir = False; BEGINMESSAGE(options_fs_cb_apply) options_textApply(scratch_dir,&s_scratch_dir,&app_res.scratch_dir); options_textApply(default_save_dir,&s_default_save_dir,&app_res.default_save_dir); options_textApply(filters,NULL,&gv_filters); options_textApply(dirs,NULL,&gv_dirs); options_textApply(filter,NULL,&gv_filter); n=0; XtSetArg(args[n], XtNtmpDir, app_res.scratch_dir); n++; XtSetArg(args[n], XtNfilters, gv_filters); n++; XtSetArg(args[n], XtNdirs, gv_dirs); n++; XtSetArg(args[n], XtNfilter, gv_filter); n++; XtSetValues(FileSel, args, n); ENDMESSAGE(options_fs_cb_apply) } /*------------------------------------------------------ options_fs_cb_save ------------------------------------------------------*/ static void options_fs_cb_save(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { int argn = 0; String argi[30]; String argv[30]; BEGINMESSAGE(options_fs_cb_save) options_setArg(&(argi[argn]),&(argv[argn]),s_version ,gv_class ,versionResource); ++argn; options_setArg(&(argi[argn]),&(argv[argn]),"*filter" ,gv_class ,widgets_getText(filter)); ++argn; options_setArg(&(argi[argn]),&(argv[argn]),"*filters" ,gv_class ,widgets_getText(filters)); ++argn; options_setArg(&(argi[argn]),&(argv[argn]),"*dirs" ,gv_class ,widgets_getText(dirs)); ++argn; options_setArg(&(argi[argn]),&(argv[argn]),s_scratchDir ,gv_class ,widgets_getText(scratch_dir)); ++argn; options_setArg(&(argi[argn]),&(argv[argn]),s_defaultSaveDir ,gv_class ,widgets_getText(default_save_dir)); ++argn; options_save(argn,argi,argv); while (--argn >=0) { XtFree(argi[argn]); XtFree(argv[argn]); } ENDMESSAGE(options_fs_cb_save) } /*------------------------------------------------------ options_fs_create ------------------------------------------------------*/ static void options_fs_create(void) { Arg args[10]; Cardinal n; Widget w; BEGINMESSAGE(options_fs_create) n=0; XtSetArg(args[n], XtNallowShellResize, True); n++; popup = XtCreatePopupShell("optionfsPopup",transientShellWidgetClass,toplevel, args, n); gv_options_fs->popup = popup; n=0; optionControl = XtCreateManagedWidget("optionControl",aaaWidgetClass,popup,args,n); n=0; w = XtCreateManagedWidget("apply", buttonWidgetClass,optionControl, args, n); XtAddCallback(w, XtNcallback, options_fs_cb_apply,NULL); XtInstallAccelerators(optionControl, w); w = XtCreateManagedWidget("save", buttonWidgetClass,optionControl, args, n); XtAddCallback(w, XtNcallback, options_fs_cb_save,NULL); XtInstallAccelerators(optionControl, w); w = XtCreateManagedWidget("dismiss", buttonWidgetClass,optionControl, args, n); XtAddCallback(w, XtNcallback, options_cb_popdown,(XtPointer)gv_options_fs); XtInstallAccelerators(optionControl, w); scratch_dir = widgets_createLabeledLineTextField("scratchDir", optionControl); default_save_dir = widgets_createLabeledLineTextField("saveDir", optionControl); filter = widgets_createLabeledLineTextField("filter", optionControl); filters = widgets_createLabeledTextField("filters", optionControl); dirs = widgets_createLabeledTextField("dirs", optionControl); options_fs_setOptionsAtEntry(); options_realize(popup,optionControl); ENDMESSAGE(options_fs_create) } gv-3.7.4/src/secscanf.c0000664000076400007640000002664111735103746011634 00000000000000/* * Secure sscanf - sscanf with an additional size argument for string * arguments. All format specifiers should work as in the standard * scanf - except for those writing to a string buffer provided by the * caller. These specifiers take an additional argument of type size_t * that specifies the size of the buffer. * ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. * * Copyright (C) 2002, Olaf Kirch */ #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include "secscanf.h" static size_t GNU_strnlen(const char *s, size_t len) { size_t i; for(i=0; i (size_t)(s - string)) size = s - string; strncpy(buf, string, size); if (nul_terminated) buf[size] = '\0'; } break; case CONV_POINTER: { void **ptr; ptr = va_arg(ap, void **); *ptr = value.v_pointer; } break; case CONV_INTEGER: { void *ptr; ptr = va_arg(ap, void *); switch (conv_size) { case SIZE_SHORT: *(short *) ptr = value.v_integer; break; case SIZE_ANY: *(int *) ptr = value.v_integer; break; case SIZE_LONG: *(long *) ptr = value.v_integer; break; case SIZE_QUAD: *(long long *) ptr = value.v_integer; break; default: goto stop; } } break; case CONV_FLOAT: { void *ptr; ptr = va_arg(ap, void *); switch (conv_size) { case SIZE_ANY: *(float *) ptr = value.v_double; break; case SIZE_LONG: *(double *) ptr = value.v_double; break; case SIZE_QUAD: *(long double *) ptr = value.v_double; break; default: goto stop; } } break; default: goto stop; } num_fields++; } stop: return num_fields; eof: if (num_fields) return num_fields; return EOF; } static int process_number(union scan_value *vp, const char **sp, char fmt) { const char *s = *sp; switch (fmt) { case 'd': vp->v_signed = strtoll(s, (char **) sp, 10); break; case 'i': vp->v_signed = strtoll(s, (char **) sp, 0); break; case 'o': vp->v_integer = strtoull(s, (char **) sp, 8); break; case 'u': vp->v_integer = strtoull(s, (char **) sp, 10); break; case 'x': case 'X': vp->v_integer = strtoull(s, (char **) sp, 16); break; case 'p': vp->v_pointer = (void *)(intptr_t) strtoull(s, (char **) sp, 0); break; case 'f': case 'g': case 'e': case 'E': vp->v_double = strtold(s, (char **) sp); break; default: return 0; } return 1; } static int process_char_class(const char **fmt, const char **sp, int width) { unsigned char *s, c, prev_char = 0; unsigned char table[255]; int val = 1; s = (unsigned char *) *fmt; if (*s == '^') { memset(table, 1, sizeof(table)); val = 0; s++; } else { memset(table, 0, sizeof(table)); val = 1; } /* First character in set is closing bracket means add it to the * set of characters */ if ((c = *s) == ']') { table[c] = val; prev_char = c; s++; } /* Any other closing bracket finishes off the set */ while ((c = *s++) != ']') { if (prev_char) { if (c == '-' && *s != '\0' && *s != ']') { c = *s++; } else { //table[prev_char] = val; prev_char = '\0'; } } if (c == '\0') return 0; if (prev_char) { while (prev_char < c) table[prev_char++] = val; } table[c] = val; prev_char = c; } *fmt = (char *) s; #if 0 { int n; printf("char class="); for (n = 0; n < 255; n++) if (table[n]) printf(isprint(n)? "%c" : "\\%03o", n); printf("\n"); } #endif s = (unsigned char *) *sp; while ((c = *s) != '\0' && table[c] && width--) s++; *sp = (char *) s; return 1; } #ifdef TEST static int verify(const char *fmt, const char *s); static int verify_s(const char *fmt, const char *s); enum { S, I, L, F, D, P }; int main(int argc, char **argv) { verify("%d %d", "12 13"); verify("%d-%d", "12 13"); verify("%d-%d", "12-13"); verify("%u %u", "12 13"); verify("%o %o", "12 13"); verify("%x %x", "12 13"); verify("%X %X", "12 13"); verify("%hd %hd", "12 13"); verify("%ld %ld", "12 13"); verify("%lld %lld", "12 13"); verify("%Ld %Ld", "12 13"); verify("%qd %qd", "12 13"); verify("%f %f", "12 13"); verify("%lf %lf", "12 13"); verify("%Lf %Lf", "12 13"); verify("%qf %qf", "12 13"); verify("%*d-%d", "12-13"); verify("%*s %d", "12 13"); verify("%p", "0xdeadbeef"); verify("%*[a-e] %x", "deadbeef feeb"); verify("%*[a-f] %x", "deadbeef feeb"); verify("%*[^g-z] %x", "deadbeef feeb"); verify("%*[^ g-z] %x", "deadbeef feeb"); verify("%*[^ g-z-] %x", "dead-beef feeb"); verify("%*5s %d", "toast123 456"); verify("", "lalla"); verify("%u", ""); verify_s("%s", "aa bb"); verify_s("%s %s", "aa bb"); verify_s("%[a-z] %s", "aa bb"); verify_s("%c %s", "aa bb"); verify_s("%2c %s", " aa bb"); verify_s("%20c %s", " aa bb"); return 0; } static int verify(const char *fmt, const char *s) { union scan_value vals[5], vals_ref[5], *v; int n, m; memset(vals, 0xe5, sizeof(vals)); memset(vals_ref, 0xe5, sizeof(vals_ref)); v = vals; n = sec_sscanf(s, fmt, v + 0, v + 1, v + 2, v + 3, v + 4); v = vals_ref; m = sscanf(s, fmt, v + 0, v + 1, v + 2, v + 3, v + 4); if (m != n) { printf("FAILED: fmt=\"%s\"\n" " str=\"%s\"\n" " sec_scanf returns %d, sscanf returns %d\n", fmt, s, n, m); return 0; } if (memcmp(vals, vals_ref, sizeof(vals))) { printf("FAILED: fmt=\"%s\"\n" " str=\"%s\"\n" " data differs!\n", fmt, s); printf("0x%Lx != 0x%Lx\n", vals[0].v_integer, vals_ref[0].v_integer); return 0; } return 1; } static int verify_s(const char *fmt, const char *s) { char buf[3][256], buf_ref[3][256]; int n, m; memset(buf, 0xe5, sizeof(buf)); memset(buf_ref, 0xe5, sizeof(buf_ref)); n = sec_sscanf(s, fmt, buf, sizeof(buf[0]), buf + 1, sizeof(buf[1]), buf + 2, sizeof(buf[2])); m = sscanf(s, fmt, buf_ref, buf_ref + 1, buf_ref + 2); if (m != n) { printf("FAILED: fmt=\"%s\"\n" " str=\"%s\"\n" " sec_scanf returns %d, sscanf returns %d\n", fmt, s, n, m); return 0; } if (memcmp(buf, buf_ref, sizeof(buf))) { printf("FAILED: fmt=\"%s\"\n" " str=\"%s\"\n" " data differs!\n", fmt, s); printf("%s != %s\n", buf[0], buf_ref[0]); return 0; } return 1; } #endif gv-3.7.4/src/ButtonP.h0000664000076400007640000000410211735103745011432 00000000000000/* ** ** ButtonP.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Authors: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project */ #ifndef _ButtonP_h #define _ButtonP_h #include "paths.h" #include "Button.h" #include INC_XAW(CommandP.h) #include "Frame.h" typedef struct _ButtonClass { int makes_compiler_happy; /* not used */ } ButtonClassPart; typedef struct _ButtonClassRec { CoreClassPart core_class; SimpleClassPart simple_class; ThreeDClassPart threeD_class; LabelClassPart label_class; CommandClassPart command_class; ButtonClassPart button_class; } ButtonClassRec; extern ButtonClassRec buttonClassRec; typedef struct { /* resources */ XawFrameType set_frame_style; XawFrameType unset_frame_style; XawFrameType highlighted_frame_style; Pixel set_background; Pixel highlighted_background; /* private state */ GC set_background_GC; GC highlighted_background_GC; int highlighted; } ButtonPart; typedef struct _ButtonRec { CorePart core; SimplePart simple; ThreeDPart threeD; LabelPart label; CommandPart command; ButtonPart button; } ButtonRec; #endif /* _TocP_h */ gv-3.7.4/src/MButton.c0000664000076400007640000001451111735103745011427 00000000000000/* ** ** MButton.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include #include "paths.h" #include INC_X11(IntrinsicP.h) #include INC_X11(StringDefs.h) #include INC_XAW(XawInit.h) #include "MButtonP.h" static void ClassInitialize(void); static void PopupMenu(Widget,XEvent*,String*,Cardinal*); #define superclass ((ButtonWidgetClass)&buttonClassRec) static char defaultTranslations[] = "Any:set()PopupMenu()"; #define offset(field) XtOffsetOf(MButtonRec, field) static XtResource resources[] = { {XtNmenuName, XtCMenuName, XtRString, sizeof(String), offset(mbutton.menu_name), XtRString, (XtPointer)"menu"}, {XtNsetFrameStyle, XtCSetFrameStyle, XtRFrameType, sizeof(XawFrameType), offset(button.set_frame_style), XtRImmediate, (XtPointer) XawRAISED }, }; #undef offset static XtActionsRec actionsList[] = { {"PopupMenu", PopupMenu} }; MButtonClassRec mbuttonClassRec = { { (WidgetClass) superclass, /* superclass */ "MButton", /* class_name */ sizeof(MButtonRec), /* size */ ClassInitialize, /* class_initialize */ NULL, /* class_part_initialize */ FALSE, /* class_inited */ NULL, /* initialize */ NULL, /* initialize_hook */ XtInheritRealize, /* realize */ actionsList, /* actions */ XtNumber(actionsList), /* num_actions */ resources, /* resources */ XtNumber(resources), /* resource_count */ NULLQUARK, /* xrm_class */ FALSE, /* compress_motion */ TRUE, /* compress_exposure */ TRUE, /* compress_enterleave */ FALSE, /* visible_interest */ NULL, /* destroy */ XtInheritResize, /* resize */ XtInheritExpose, /* expose */ NULL, /* set_values */ NULL, /* set_values_hook */ XtInheritSetValuesAlmost, /* set_values_almost */ NULL, /* get_values_hook */ NULL, /* accept_focus */ XtVersion, /* version */ NULL, /* callback_private */ defaultTranslations, /* tm_table */ XtInheritQueryGeometry, /* query_geometry */ XtInheritDisplayAccelerator, /* display_accelerator */ NULL /* extension */ }, /* CoreClass fields initialization */ { XtInheritChangeSensitive /* change_sensitive */ }, /* SimpleClass fields initialization */ { XtInheritXaw3dShadowDraw, /* shadowdraw */ }, /* ThreeDClass fields initialization */ { 0, /* field not used */ }, /* LabelClass fields initialization */ { 0, /* field not used */ }, /* CommandClass fields initialization */ { 0, /* field not used */ }, /* ButtonClass fields initialization */ { 0, /* field not used */ } /* MbuttonClass fields initialization */ }; /* for public consumption */ WidgetClass mbuttonWidgetClass = (WidgetClass) &mbuttonClassRec; /**************************************************************** * * Private Procedures * ****************************************************************/ static void ClassInitialize(void) { XawInitializeWidgetSet(); XtRegisterGrabAction(PopupMenu, True, (unsigned int)(ButtonPressMask | ButtonReleaseMask), GrabModeAsync, GrabModeAsync); } void PopupMenu(Widget w, XEvent *event _GL_UNUSED, String *params _GL_UNUSED, Cardinal *num_params) { MButtonWidget mbw = (MButtonWidget) w; Widget temp; Widget menu; Arg args[5]; Cardinal n; int menu_x, menu_y; Dimension menu_width, menu_height,button_width,button_height; Position button_x, button_y; BEGINMESSAGE(PopupMenu) temp = w; menu = NULL; while(temp != NULL) { menu = XtNameToWidget(temp, mbw->mbutton.menu_name); if (!menu) temp = XtParent(temp); else break; } if (!menu) { #if 0 char error_buf[BUFSIZ]; (void) sprintf(error_buf, "Mbutton: %s %s.","Could not find menu widget named", mbw->mbutton.menu_name); XtAppWarning(XtWidgetToApplicationContext(w), error_buf); #endif ENDMESSAGE(PopupMenu) return; } if (!XtIsRealized(menu)) XtRealizeWidget(menu); menu_width = menu->core.width + 2 * menu->core.border_width; menu_height = menu->core.height + 2 * menu->core.border_width; button_width = w->core.width + 2 * w->core.border_width; button_height = w->core.height + 2 * w->core.border_width; XtTranslateCoords(w, 0, 0, &button_x, &button_y); menu_x = button_x; menu_y = button_y; if (*num_params==0) menu_y += button_height; if (menu_x >= 0) { int scr_width = WidthOfScreen(XtScreen(menu)); if (menu_x + menu_width > scr_width) menu_x = scr_width - menu_width; } if (menu_x < 0) menu_x = 0; if (menu_y >= 0) { int scr_height = HeightOfScreen(XtScreen(menu)); if (menu_y + menu_height > scr_height) menu_y = scr_height - menu_height; } if (menu_y < 0) menu_y = 0; n = 0; XtSetArg(args[n], XtNx, menu_x); n++; XtSetArg(args[n], XtNy, menu_y); n++; if (*num_params > 0 && menu_widthcore.border_width); n++; } XtSetValues(menu, args, n); XtPopupSpringLoaded(menu); ENDMESSAGE(PopupMenu) } gv-3.7.4/src/error.c0000664000076400007640000000353511735103745011174 00000000000000/* ** ** error.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include "config.h" #include #include #include #include "paths.h" #include INC_X11(Xos.h) #include INC_X11(Intrinsic.h) #include "types.h" #include "error.h" #include "main_resources.h" #include "main_globals.h" char* open_fail_error(errornumber,error_str,file_name,show) int errornumber; char *error_str; char *file_name; int show; { char *m; if (!(m = strerror(errornumber))) m = "Unknown error"; if (show) { fprintf(stderr,"%s: %s %s (%s)\n",gv_name,error_str,file_name,m); m = NULL; } else { char buf[1024]; sprintf(buf,"%s %s: %s",error_str,file_name,m); m = XtNewString(buf); } ENDMESSAGE(open_fail_error_message) return(m); } gv-3.7.4/src/Aaa_lex.c0000664000076400007640000003110711735103745011371 00000000000000/* ** ** Aaa_lex.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Authors: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project */ #include "ac_config.h" /* #define MESSAGES */ /* #define TEST_SCAN */ #ifdef TEST_SCAN # define MESSAGES #endif #include "Aaa_intern.h" #include "Aaa_bison.h" #define RETURN(rrr) { r = rrr; goto scan_end; } #define WORD_MAXLEN 20 #define ERROR -1 #define END 0 #define EOS '\0' #define KEYWORD_START '|' #define INF_START '[' #define INF_END ']' #define KEYWORD_WIDTH "width" #define KEYWORD_HEIGHT "height" #define KEYWORD_HBOX "h" #define KEYWORD_VBOX "v" #define KEYWORD_OF "of" #define IS_KEYWORD_WIDTH(sss) (!strcmp(sss,KEYWORD_WIDTH)) #define IS_KEYWORD_HEIGHT(sss) (!strcmp(sss,KEYWORD_HEIGHT)) #define IS_KEYWORD_HBOX(sss) (!strcmp(sss,KEYWORD_HBOX)) #define IS_KEYWORD_VBOX(sss) (!strcmp(sss,KEYWORD_VBOX)) #define IS_KEYWORD_OF(sss) (!strcmp(sss,KEYWORD_OF)) #define IS_OC(ccc) ((ccc) == '{') #define IS_CC(ccc) ((ccc) == '}') #define IS_OP(ccc) ((ccc) == '(') #define IS_CP(ccc) ((ccc) == ')') #define IS_OA(ccc) ((ccc) == '<') #define IS_CA(ccc) ((ccc) == '>') #define IS_EQUAL(ccc) ((ccc) == '=') #define IS_DOLLAR(ccc) ((ccc) == '$') #define IS_PLUS(ccc) ((ccc) == '+') #define IS_MINUS(ccc) ((ccc) == '-') #define IS_TIMES(ccc) ((ccc) == '*') #define IS_DIVIDE(ccc) ((ccc) == '/') #define IS_PERCENT(ccc) ((ccc) == '%') #define IS_INF_START(ccc) ((ccc) == INF_START) #define IS_INF_END(ccc) ((ccc) == INF_END) #define IS_KEYWORD_START(ccc) ((ccc) == KEYWORD_START) #define IS_DIGIT(ccc) ((ccc)>='0' && ((ccc) <= '9')) #define IS_SPACE(ccc) ((ccc)==' ' || (ccc)=='\n' || (ccc) =='\t') #define IS_EOS(ccc) ((ccc)== EOS) #define IS_CHAR(ccc) (((ccc) >='A' && (ccc)<='Z') || ((ccc) >='a' && (ccc)<='z')) #define IS_MIXED(ccc) (IS_CHAR((ccc)) || IS_DIGIT((ccc)) || (ccc)=='_') void layout_scan_error(s,layoutConverterStructP) char *s; void *layoutConverterStructP; { LayoutConverterArg layoutConverterArg = (LayoutConverterArg) (layoutConverterStructP); char *t; char *c,*base; int have_space; base = (char*) layoutConverterArg->base; c = (char*) layoutConverterArg->oldfrom; t = c - 35; if (t < base) t = base; have_space=0; while (*t && t < c + 35) { if (IS_SPACE(*t)) have_space=1; else { if (have_space) fputc(' ', stderr); fputc(*t, stderr); have_space=0; } t++; } if (!*t) fprintf(stderr,""); fprintf(stderr,"\n"); t = c - 35; have_space=0; if (t < base) t = base; while (*t && t < c + 35) { if (IS_SPACE(*t)) have_space=1; else { if (have_space) fputc(' ', stderr); if (t == c) { fputc('^',stderr); break; } else { fputc(' ',stderr); } have_space=0; } t++; } if (!*t) fputc('^',stderr); fprintf(stderr,"\n"); fprintf(stderr,"%s\n", s); } static void maxlen_exceeded(void *layoutConverterStructP) { layout_scan_error("Expression too long.",layoutConverterStructP); } int layout_lex(v,layoutConverterStructP) YYSTYPE *v; void *layoutConverterStructP; { char *c,*oldc; LayoutConverterArg layoutConverterArg = (LayoutConverterArg) (layoutConverterStructP); int r; BEGINMESSAGE1(layout_lex) oldc = c = (char*) layoutConverterArg->from; if (!c) { INFMESSAGE(layout_lex: received null pointer) ENDMESSAGE1(layout_lex) return (END); } scan_start: while (IS_SPACE(*c)) c++; layoutConverterArg->oldfrom = (String) c; if (IS_EOS(*c)) RETURN(END) else if (IS_OC(*c)) RETURN(OC) else if (IS_CC(*c)) RETURN(CC) else if (IS_OP(*c)) RETURN(OP) else if (IS_CP(*c)) RETURN(CP) else if (IS_OA(*c)) RETURN(OA) else if (IS_CA(*c)) RETURN(CA) else if (IS_EQUAL(*c)) RETURN(EQUAL) else if (IS_DOLLAR(*c)) RETURN(DOLLAR) else if (IS_PLUS(*c)) { v->oval = Plus; RETURN(PLUS) } else if (IS_MINUS(*c)) { v->oval = Minus; RETURN(MINUS) } else if (IS_TIMES(*c)) { v->oval = Times; RETURN(TIMES) } else if (IS_DIVIDE(*c)) { v->oval = Divide; RETURN(DIVIDE) } else if (IS_PERCENT(*c)) { char *cold = c; ++c; while (IS_SPACE(*c)) ++c; if (IS_CHAR(*c)) { char s[WORD_MAXLEN+1]; int i=0; while (IS_CHAR(*c) && ioval = Percent; RETURN(PERCENTOF) } } c = cold; v->oval = Percent; RETURN(PERCENT) } else if (IS_INF_START(*c)) { char s[WORD_MAXLEN+1]; int i=0; c++; while (IS_DIGIT(*c) && iival = atoi(s); RETURN(INFINITY) } else { layout_scan_error("No match.",layoutConverterStructP); RETURN(ERROR) } } else if (IS_DIGIT(*c)) { char s[WORD_MAXLEN+1]; int i=0; while (IS_DIGIT(*c) && iival = atoi(s); RETURN(NUMBER) } else if (IS_KEYWORD_START(*c)) { char s[WORD_MAXLEN+1]; int i=0; c++; while (IS_SPACE(*c)) c++; while (iqval = XrmStringToQuark (s); RETURN(NAME) } else { layoutConverterArg->oldfrom = (String) c; layout_scan_error("Ignoring character.",layoutConverterStructP); c++; goto scan_start; } scan_end: #ifdef MESSAGES switch (r) { case OC: INFMESSAGE(layout_lex: OC) break; case CC: INFMESSAGE(layout_lex: CC) break; case OA: INFMESSAGE(layout_lex: OA) break; case CA: INFMESSAGE(layout_lex: CA) break; case OP: INFMESSAGE(layout_lex: OP) break; case CP: INFMESSAGE(layout_lex: CP) break; case NAME: INFIMESSAGE(layout_lex: NAME,v->qval) INFSMESSAGE(the quark has the value,XrmQuarkToString(v->qval)) break; case NUMBER: INFIMESSAGE(layout_lex: NUMBER,v->ival) break; case INFINITY: INFIMESSAGE(layout_lex: INFINITY,v->ival) break; case VERTICAL: INFMESSAGE(layout_lex: VERTICAL) break; case HORIZONTAL: INFMESSAGE(layout_lex: HORIZONTAL) break; case EQUAL: INFMESSAGE(layout_lex: EQUAL) break; case DOLLAR: INFMESSAGE(layout_lex: DOLLAR) break; case PLUS: INFMESSAGE(layout_lex: PLUS) break; case MINUS: INFMESSAGE(layout_lex: MINUS) break; case TIMES: INFMESSAGE(layout_lex: TIMES) break; case DIVIDE: INFMESSAGE(layout_lex: DIVIDE) break; case PERCENTOF: INFMESSAGE(layout_lex: PERCENTOF) break; case PERCENT: INFMESSAGE(layout_lex: PERCENT) break; case WIDTH: INFMESSAGE(layout_lex: WIDTH) break; case HEIGHT: INFMESSAGE(layout_lex: HEIGHT) break; case UMINUS: INFMESSAGE(layout_lex: UMINUS) break; case UPLUS: INFMESSAGE(layout_lex: UPLUS) break; } #endif ENDMESSAGE1(layout_lex) if (r != END) c++; layoutConverterArg->from = (String) c; return r; } #ifdef TEST_SCAN #define teststring "\ |vbox{ \ frame = 8 \ s = 8% of |width fileButton \ ss = 4% of |height tagsFrame \ sss = 2 \ $frame \ |hbox{ \ $frame \ |vbox { \ fileButton<+[1]*> \ $ss \ pageButton<+[1]*-100%> \ 1<+2[1]> \ autoResize<+[1]*-100%> \ 1<+2[1]> \ optFrame<+[1]*-100%> \ 1<+2[1]> \ tagsFrame<+[1]*-100%> \ 1<+2[1]> \ |hbox{ \ 0<+[1]> \ pannerFrame<*-100%> \ 0<+[1]> \ } \ 1<+2[1]> \ |hbox { \ 0<+[1]> \ tocFrame<*+200[1]-100%> \ 0<+[1]> \ } \ } \ $ss \ |vbox { \ |hbox{ \ orientationButton<+[2]-[3]*> \ $ss<-90%> \ magstepButton<+[2]-[3]*> \ $ss<-90%> \ pagemediaButton<+[2]-[3]*> \ $ss<-90%> \ |vbox { \ 0<+[1]> \ |hbox{ \ titleButton<+15[1]-[3]*> \ $ss<-90%> \ dateButton<+5[3]-[4]*> \ } \ 0<+[1]> \ } \ } \ $ss \ 0<+[2]> \ |hbox{ \ 0<+[2]> \ pageview<-100%*-100%> \ 0<+[2]> \ } \ 0<+[2]> \ $ss \ |hbox{ \ locator<-[3]*> \ $ss<-[1]> \ message<+50[2]-10[3]*> \ $ss<-[1]> \ status<+[2]-10[3]*> \ } \ } \ $frame \ } \ $frame \ }" int main(argc,argv) int argc; char **argv; { char *str = teststring; int r; YYSTYPE v; MAINBEGINMESSAGE(main) while ((r=layout_lex(&v,&str)) != END); MAINENDMESSAGE(main) exit(0); return 0; } #endif /* TEST_SCAN */ gv-3.7.4/src/confirm.c0000664000076400007640000001703211735103745011475 00000000000000/* ** ** confirm.c ** ** Copyright (C) 1995, 1996 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@dipmza.physik.uni-mainz.de) ** Department of Physic ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" #include "config.h" #include /* #define MESSAGES */ #include "message.h" #include "paths.h" #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_XAW(Label.h) #include INC_X11(Shell.h) #include "Aaa.h" #include "Button.h" #include "Ghostview.h" #include "types.h" #include "main_resources.h" #include "main_globals.h" #include "popup.h" #include "widgets_misc.h" /*### Application dependencies ##############################################*/ #define CONFIRM_TOPLEVEL toplevel #define CONFIRM_POPUP_NAME "confirmPopup" #define CONFIRM_POPUP confirmpopup #include "confirm.h" static Bool confirmPopupCreated = False; static Bool confirmPopupVisible = False; static Widget doneButton=NULL,cancelButton=NULL,confirmAaa=NULL; static Widget message1=NULL,message2=NULL,message3=NULL; static int preferedButton=0,initialButton=0; /*######################################################## cb_popdownConfirmPopup #########################################################*/ void cb_popdownConfirmPopup(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { BEGINMESSAGE(cb_popdownConfirmPopup) if (confirmPopupVisible) { XtPopdown(CONFIRM_POPUP); confirmPopupVisible=False; } if (confirmPopupCreated==True) { INFMESSAGE(destroying confirmpopup) XtDestroyWidget(confirmpopup); confirmpopup=NULL; confirmPopupCreated = False; message1=message2=message3=NULL; } ENDMESSAGE(cb_popdownConfirmPopup) } /*######################################################## cb_popupConfirmPopup #########################################################*/ void cb_popupConfirmPopup(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer call_data _GL_UNUSED) { BEGINMESSAGE(cb_popupConfirmPopup) if (!confirmPopupVisible) { if (!confirmPopupCreated) makeConfirmPopup(); if (initialButton==CONFIRM_BUTTON_DONE) preferedButton=CONFIRM_BUTTON_CANCEL; else if (initialButton==CONFIRM_BUTTON_CANCEL) preferedButton=CONFIRM_BUTTON_DONE; action_preferConfirmPopupButton(NULL, NULL, NULL, NULL); popup_positionPopup(confirmpopup,viewFrame,POPUP_POSITION_POS,4,4); XtPopup(CONFIRM_POPUP,XtGrabNone); confirmPopupVisible=True; } ENDMESSAGE(cb_popupConfirmPopup) } /*######################################################## action_preferConfirmPopupButton #########################################################*/ void action_preferConfirmPopupButton(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { Widget pref,pref_old; BEGINMESSAGE(action_preferConfirmPopupButton) if (preferedButton==CONFIRM_BUTTON_DONE) { pref=cancelButton; pref_old=doneButton; preferedButton=CONFIRM_BUTTON_CANCEL; } else { pref=doneButton; pref_old=cancelButton; preferedButton=CONFIRM_BUTTON_DONE; } widgets_preferButton(pref,1); widgets_preferButton(pref_old,0); XtInstallAccelerators(confirmAaa,pref); ENDMESSAGE(action_preferConfirmPopupButton) } /*######################################################## ConfirmPopupSetButton #########################################################*/ void ConfirmPopupSetButton(int button, XtCallbackProc callback) { Widget response=NULL; BEGINMESSAGE(ConfirmPopupSetButton) if (!confirmPopupCreated) makeConfirmPopup(); if (button&CONFIRM_BUTTON_DONE) response = doneButton; else if (button&CONFIRM_BUTTON_CANCEL) response = cancelButton; if (response && callback) { XtRemoveAllCallbacks(response,XtNcallback); XtAddCallback(response, XtNcallback,callback,NULL); } ENDMESSAGE(ConfirmPopupSetButton) } /*######################################################## ConfirmPopupSetMessage #########################################################*/ void ConfirmPopupSetMessage(String which, String message) { Arg args[3]; Cardinal n; char *name=NULL; Widget *labelP = NULL; BEGINMESSAGE(ConfirmPopupSetMessage) if (!confirmPopupCreated) makeConfirmPopup(); if (!strcmp(which,"1")) { labelP = &message1; name="message1"; } else if (!strcmp(which,"2")) { labelP = &message2; name="message2"; } else if (!strcmp(which,"3")) { labelP = &message3; name="message3"; } else { ENDMESSAGE(ConfirmPopupSetMessage) return; } if (message) { n=0; XtSetArg(args[n], XtNlabel, message); n++; XtSetArg(args[n], XtNborderWidth, 0); n++; if (!(*labelP)) *labelP=XtCreateManagedWidget(name,labelWidgetClass,confirmAaa, args, n); else XtSetValues(*labelP,args,n); } else { if (*labelP) { n=0; XtSetArg(args[n], XtNheight,0); n++; XtSetValues(*labelP,args,n); XtDestroyWidget(*labelP); *labelP = NULL; } } ENDMESSAGE(ConfirmPopupSetMessage) } /*######################################################## ConfirmPopupSetInitialButton #########################################################*/ void ConfirmPopupSetInitialButton(int button) { BEGINMESSAGE(ConfirmPopupSetInitialButton) initialButton=button; ENDMESSAGE(ConfirmPopupSetInitialButton) } /*######################################################## makeConfirmPopup #########################################################*/ static char *tabTrans = "\ Tab: GV_TogConfPrefBut()\ "; void makeConfirmPopup(void) { Arg args[7]; Cardinal n; static XtTranslations tab_trans=(XtTranslations)NULL; BEGINMESSAGE(makeConfirmPopup) n=0; XtSetArg(args[n], XtNallowShellResize, True); n++; CONFIRM_POPUP = XtCreatePopupShell(CONFIRM_POPUP_NAME,transientShellWidgetClass,CONFIRM_TOPLEVEL, args, n); n=0; XtSetArg(args[n], XtNresizeWidth, True); n++; XtSetArg(args[n], XtNresizeHeight, True); n++; confirmAaa = XtCreateManagedWidget("confirmAaa",aaaWidgetClass,CONFIRM_POPUP,args,n); n=0; doneButton=XtCreateManagedWidget("done",buttonWidgetClass,confirmAaa,args,n); cancelButton=XtCreateManagedWidget("cancel",buttonWidgetClass,confirmAaa,args,n); message1=message2=message3=NULL; XtRealizeWidget(CONFIRM_POPUP); XtSetKeyboardFocus(confirmAaa,confirmAaa); if (!tab_trans) tab_trans=XtParseTranslationTable(tabTrans); XtOverrideTranslations(confirmAaa,tab_trans); XSetWMProtocols(XtDisplay(CONFIRM_POPUP),XtWindow(CONFIRM_POPUP),&wm_delete_window,1); confirmPopupCreated=True; ENDMESSAGE(makeConfirmPopup) } gv-3.7.4/src/Aaa_bison.c0000664000076400007640000007617311735103745011727 00000000000000 /* A Bison parser, made from layout_bison.y with Bison version GNU Bison version 1.24 */ #include "ac_config.h" #define YYBISON 1 /* Identify Bison output. */ #define yyparse layout_parse #define yylex layout_lex #define yyerror layout_error #define yylval layout_lval #define yychar layout_char #define yydebug layout_debug #define yynerrs layout_nerrs #define OC 258 #define CC 259 #define OA 260 #define CA 261 #define OP 262 #define CP 263 #define NAME 264 #define NUMBER 265 #define INFINITY 266 #define VERTICAL 267 #define HORIZONTAL 268 #define EQUAL 269 #define DOLLAR 270 #define PLUS 271 #define MINUS 272 #define TIMES 273 #define DIVIDE 274 #define PERCENTOF 275 #define PERCENT 276 #define WIDTH 277 #define HEIGHT 278 #define UMINUS 279 #define UPLUS 280 #ifndef YYLTYPE typedef struct yyltype { int timestamp; int first_line; int first_column; int last_line; int last_column; char *text; } yyltype; #define YYLTYPE yyltype #endif #include #include #include "Aaa_intern.h" #ifndef __cplusplus #ifndef __STDC__ #define const #endif #endif #define YYFINAL 68 #define YYFLAG -32768 #define YYNTBASE 26 #define YYTRANSLATE(x) ((unsigned)(x) <= 280 ? yytranslate[x] : 39) static const char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 }; #if YYDEBUG != 0 static const short yyprhs[] = { 0, 0, 2, 5, 8, 12, 14, 19, 22, 24, 32, 33, 38, 39, 42, 43, 46, 47, 50, 52, 54, 57, 60, 62, 65, 68, 72, 75, 77, 80, 84, 88, 92, 96, 100, 103, 106, 108, 110 }; static const short yyrhs[] = { 28, 0, 9, 30, 0, 35, 31, 0, 9, 14, 35, 0, 28, 0, 38, 3, 29, 4, 0, 27, 29, 0, 27, 0, 5, 32, 33, 18, 32, 33, 6, 0, 0, 5, 32, 33, 6, 0, 0, 16, 34, 0, 0, 17, 34, 0, 0, 36, 11, 0, 36, 0, 11, 0, 17, 36, 0, 16, 36, 0, 36, 0, 22, 9, 0, 23, 9, 0, 7, 37, 8, 0, 36, 21, 0, 10, 0, 15, 9, 0, 37, 16, 37, 0, 37, 17, 37, 0, 37, 18, 37, 0, 37, 19, 37, 0, 37, 20, 37, 0, 17, 37, 0, 16, 37, 0, 36, 0, 12, 0, 13, 0 }; #endif #if YYDEBUG != 0 static const short yyrline[] = { 0, 29, 32, 43, 54, 68, 73, 105, 110, 113, 124, 136, 147, 159, 161, 164, 166, 169, 171, 173, 176, 184, 186, 188, 194, 200, 202, 209, 215, 222, 231, 233, 235, 237, 239, 247, 249, 251, 253 }; static const char * const yytname[] = { "$","error","$undefined.","OC","CC", "OA","CA","OP","CP","NAME","NUMBER","INFINITY","VERTICAL","HORIZONTAL","EQUAL", "DOLLAR","PLUS","MINUS","TIMES","DIVIDE","PERCENTOF","PERCENT","WIDTH","HEIGHT", "UMINUS","UPLUS","layout","box","compositebox","boxes","bothparams","oneparams", "opStretch","opShrink","glue","signedExpr","simpleExpr","expr","orientation", "" }; #endif static const short yyr1[] = { 0, 26, 27, 27, 27, 27, 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, 34, 35, 35, 35, 36, 36, 36, 36, 36, 36, 37, 37, 37, 37, 37, 37, 37, 37, 38, 38 }; static const short yyr2[] = { 0, 1, 2, 2, 3, 1, 4, 2, 1, 7, 0, 4, 0, 2, 0, 2, 0, 2, 1, 1, 2, 2, 1, 2, 2, 3, 2, 1, 2, 3, 3, 3, 3, 3, 2, 2, 1, 1, 1 }; static const short yydefact[] = { 0, 37, 38, 1, 0, 0, 0, 10, 27, 0, 0, 0, 0, 0, 8, 5, 0, 12, 22, 0, 0, 36, 0, 14, 0, 2, 28, 21, 20, 23, 24, 7, 6, 14, 3, 26, 35, 34, 25, 0, 0, 0, 0, 0, 0, 16, 4, 16, 29, 30, 31, 32, 33, 19, 13, 18, 0, 0, 0, 17, 15, 14, 11, 16, 0, 9, 0, 0, 0 }; static const short yydefgoto[] = { 66, 14, 15, 16, 25, 34, 45, 57, 54, 17, 21, 22, 4 }; static const short yypact[] = { -2, -32768,-32768,-32768, 5, 21, 25, 7,-32768, 4, 43, 43, 6, 9, 21,-32768, 10, 11, 24, 25, 25, 24, 61, 36, 39,-32768,-32768, 24, 24,-32768,-32768, -32768,-32768, 36,-32768,-32768,-32768,-32768,-32768, 25, 25, 25, 25, 25, 53, 40,-32768, 40, 52, 52,-32768, -32768,-32768,-32768,-32768, -4, 53, 41, 67,-32768,-32768, 36,-32768, 40, 68,-32768, 27, 82,-32768 }; static const short yypgoto[] = {-32768, -32768, 83, 70,-32768,-32768, -32, -43, 29, 62, -5, -17,-32768 }; #define YYLAST 86 static const short yytable[] = { 18, 47, 36, 37, 58, 27, 28, 59, 5, 18, 1, 2, 23, 26, 32, 29, 33, 35, 30, 18, 64, 24, 48, 49, 50, 51, 52, 67, 6, 63, 7, 8, 6, 1, 2, 8, 9, 10, 11, 55, 9, 19, 20, 12, 13, 35, 6, 12, 13, 8, 6, 55, 44, 8, 9, 10, 11, 56, 9, 61, 6, 12, 13, 8, 53, 12, 13, 0, 9, 38, 41, 42, 43, 62, 65, 12, 13, 39, 40, 41, 42, 43, 68, 3, 31, 60, 46 }; static const short yycheck[] = { 5, 33, 19, 20, 47, 10, 11, 11, 3, 14, 12, 13, 5, 9, 4, 9, 5, 21, 9, 24, 63, 14, 39, 40, 41, 42, 43, 0, 7, 61, 9, 10, 7, 12, 13, 10, 15, 16, 17, 44, 15, 16, 17, 22, 23, 21, 7, 22, 23, 10, 7, 56, 16, 10, 15, 16, 17, 17, 15, 18, 7, 22, 23, 10, 11, 22, 23, -1, 15, 8, 18, 19, 20, 6, 6, 22, 23, 16, 17, 18, 19, 20, 0, 0, 14, 56, 24 }; #define YYPURE 1 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ /* Skeleton output parser for bison, Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison. */ #ifndef alloca #ifdef __GNUC__ #define alloca __builtin_alloca #else /* not GNU C. */ #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) #include #else /* not sparc */ #if defined (MSDOS) && !defined (__TURBOC__) #include #else /* not MSDOS, or __TURBOC__ */ #if defined(_AIX) #include #pragma alloca #else /* not MSDOS, __TURBOC__, or _AIX */ #ifdef __hpux #ifdef __cplusplus extern "C" { void *alloca (unsigned int); }; #else /* not __cplusplus */ void *alloca (); #endif /* not __cplusplus */ #endif /* __hpux */ #endif /* not _AIX */ #endif /* not MSDOS, or __TURBOC__ */ #endif /* not sparc. */ #endif /* not GNU C. */ #endif /* alloca not defined. */ /* This is the parser code that is written into each bison parser when the %semantic_parser declaration is not specified in the grammar. It was written by Richard Stallman by simplifying the hairy parser used when %semantic_parser is specified. */ /* Note: there must be only one dollar sign in this file. It is replaced by the list of actions, each action as one case of the switch. */ #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY -2 #define YYEOF 0 #define YYACCEPT return(0) #define YYABORT return(1) #define YYERROR goto yyerrlab1 /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 3 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(token, value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { yychar = (token), yylval = (value); \ yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { yyerror ("syntax error: cannot back up"); YYERROR; } \ while (0) #define YYTERROR 1 #define YYERRCODE 256 #ifndef YYPURE #define YYLEX yylex() #endif #ifdef YYPURE #ifdef YYLSP_NEEDED #ifdef YYLEX_PARAM #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) #else #define YYLEX yylex(&yylval, &yylloc) #endif #else /* not YYLSP_NEEDED */ #ifdef YYLEX_PARAM #define YYLEX yylex(&yylval, YYLEX_PARAM) #else #define YYLEX yylex(&yylval) #endif #endif /* not YYLSP_NEEDED */ #endif /* If nonreentrant, generate the variables here */ #ifndef YYPURE int yychar; /* the lookahead symbol */ YYSTYPE yylval; /* the semantic value of the */ /* lookahead symbol */ #ifdef YYLSP_NEEDED YYLTYPE yylloc; /* location data for the lookahead */ /* symbol */ #endif int yynerrs; /* number of parse errors so far */ #endif /* not YYPURE */ #if YYDEBUG != 0 int yydebug; /* nonzero means print parse trace */ /* Since this is uninitialized, it does not stop multiple parsers from coexisting. */ #endif /* YYINITDEPTH indicates the initial size of the parser's stacks */ #ifndef YYINITDEPTH #define YYINITDEPTH 200 #endif /* YYMAXDEPTH is the maximum size the stacks can grow to (effective only if the built-in stack extension method is used). */ #if YYMAXDEPTH == 0 #undef YYMAXDEPTH #endif #ifndef YYMAXDEPTH #define YYMAXDEPTH 10000 #endif /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ /*###jp###*/ int yyparse (void*); #endif #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ #define __yy_memcpy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT) #else /* not GNU C or C++ */ #ifndef __cplusplus /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_memcpy (from, to, count) char *from; char *to; int count; { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #else /* __cplusplus */ /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_memcpy (char *from, char *to, int count) { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #endif #endif /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. It should actually point to an object. Grammar actions can access the variable by casting it to the proper pointer type. */ #ifdef YYPARSE_PARAM #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; #else #define YYPARSE_PARAM #define YYPARSE_PARAM_DECL #endif int yyparse(YYPARSE_PARAM) YYPARSE_PARAM_DECL { register int yystate; register int yyn; register short *yyssp; register YYSTYPE *yyvsp; int yyerrstatus; /* number of tokens to shift before error messages enabled */ int yychar1 = 0; /* lookahead token as an internal (translated) token number */ short yyssa[YYINITDEPTH]; /* the state stack */ YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ short *yyss = yyssa; /* refer to the stacks thru separate pointers */ YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ #ifdef YYLSP_NEEDED YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ YYLTYPE *yyls = yylsa; YYLTYPE *yylsp; #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) #else #define YYPOPSTACK (yyvsp--, yyssp--) #endif int yystacksize = YYINITDEPTH; #ifdef YYPURE int yychar; YYSTYPE yylval; int yynerrs; #ifdef YYLSP_NEEDED YYLTYPE yylloc; #endif #endif YYSTYPE yyval; /* the variable used to return */ /* semantic values from the action */ /* routines */ int yylen; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Starting parse\n"); #endif yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss - 1; yyvsp = yyvs; #ifdef YYLSP_NEEDED yylsp = yyls; #endif /* Push a new state, which is found in yystate . */ /* In all cases, when you get here, the value and location stacks have just been pushed. so pushing a state here evens the stacks. */ yynewstate: *++yyssp = yystate; /* printf("---%d\n",(yyssp - yyss + 1)); */ if (yyssp >= yyss + yystacksize - 1) { /* Give user a chance to reallocate the stack */ /* Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; short *yyss1 = yyss; #ifdef YYLSP_NEEDED YYLTYPE *yyls1 = yyls; #endif /* Get the current used size of the three stacks, in elements. */ int size = yyssp - yyss + 1; #ifdef yyoverflow /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. */ #ifdef YYLSP_NEEDED /* This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), &yyls1, size * sizeof (*yylsp), &yystacksize); #else yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), &yystacksize); #endif yyss = yyss1; yyvs = yyvs1; #ifdef YYLSP_NEEDED yyls = yyls1; #endif #else /* no yyoverflow */ /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) { yyerror("parser stack overflow"); return 2; } yystacksize *= 2; if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); __yy_memcpy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp)); yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); __yy_memcpy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp)); #ifdef YYLSP_NEEDED yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); __yy_memcpy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp)); #endif #endif /* no yyoverflow */ yyssp = yyss + size - 1; yyvsp = yyvs + size - 1; #ifdef YYLSP_NEEDED yylsp = yyls + size - 1; #endif #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Stack size increased to %d\n", yystacksize); #endif if (yyssp >= yyss + yystacksize - 1) YYABORT; } #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Entering state %d\n", yystate); #endif goto yybackup; yybackup: /* Do appropriate processing given the current state. */ /* Read a lookahead token if we need one and don't already have one. */ /* yyresume: */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYFLAG) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* yychar is either YYEMPTY or YYEOF or a valid token in external form. */ if (yychar == YYEMPTY) { #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Reading a token: "); #endif yychar = YYLEX; } /* Convert token to internal form (in yychar1) for indexing tables with */ if (yychar <= 0) /* This means end of input. */ { yychar1 = 0; yychar = YYEOF; /* Don't call YYLEX any more */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Now at end of input.\n"); #endif } else { yychar1 = YYTRANSLATE(yychar); #if YYDEBUG != 0 if (yydebug) { fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); /* Give the individual parser a way to print the precise meaning of a token, for further debugging info. */ #ifdef YYPRINT YYPRINT (stderr, yychar, yylval); #endif fprintf (stderr, ")\n"); } #endif } yyn += yychar1; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) goto yydefault; yyn = yytable[yyn]; /* yyn is what to do for this token type in this state. Negative => reduce, -yyn is rule number. Positive => shift, yyn is new state. New state is final state => don't bother to shift, just return success. 0, or most negative number => error. */ if (yyn < 0) { if (yyn == YYFLAG) goto yyerrlab; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); #endif /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif /* count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; yystate = yyn; goto yynewstate; /* Do the default action for the current state. */ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; /* Do a reduction. yyn is the number of a rule to reduce with. */ yyreduce: yylen = yyr2[yyn]; if (yylen > 0) yyval = yyvsp[1-yylen]; /* implement default value of the action */ #if YYDEBUG != 0 if (yydebug) { int i; fprintf (stderr, "Reducing via rule %d (line %d), ", yyn, yyrline[yyn]); /* Print the symbols being reduced, and their result. */ for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) fprintf (stderr, "%s ", yytname[yyrhs[i]]); fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); } #endif switch (yyn) { case 1: { *(((LayoutConverterArg)layoutConverterArg)->to) = (LayoutPtr) yyvsp[0].bval; ; break;} case 2: { BoxPtr box = New(LBoxRec); MEMMESSAGE(WidgetBox) box->nextSibling = 0; box->type = WidgetBox; box->params = *yyvsp[0].pval; Dispose (yyvsp[0].pval); box->u.widget.quark = yyvsp[-1].qval; yyval.bval = box; ; break;} case 3: { BoxPtr box = New(LBoxRec); MEMMESSAGE(GlueBox) box->nextSibling = 0; box->type = GlueBox; box->params = *yyvsp[0].pval; Dispose (yyvsp[0].pval); box->u.glue.expr = yyvsp[-1].eval; yyval.bval = box; ; break;} case 4: { BoxPtr box = New(LBoxRec); MEMMESSAGE(VariableBox) box->nextSibling = 0; box->type = VariableBox; box->u.variable.quark = yyvsp[-2].qval; box->u.variable.expr = yyvsp[0].eval; ZeroGlue (box->params.stretch[LayoutHorizontal]); /*###jp###*/ ZeroGlue (box->params.shrink[LayoutHorizontal]); /*###jp###*/ ZeroGlue (box->params.stretch[LayoutVertical]); /*###jp###*/ ZeroGlue (box->params.shrink[LayoutVertical]); /*###jp###*/ yyval.bval = box; ; break;} case 5: { yyval.bval = yyvsp[0].bval; ; break;} case 6: { BoxPtr box = New(LBoxRec); BoxPtr child; MEMMESSAGE(BoxBox) box->nextSibling = 0; box->parent = 0; box->type = BoxBox; box->u.box.dir = yyvsp[-3].lval; box->u.box.firstChild = yyvsp[-1].bval; ZeroGlue (box->params.stretch[LayoutHorizontal]); /*###jp###*/ ZeroGlue (box->params.shrink[LayoutHorizontal]); /*###jp###*/ ZeroGlue (box->params.stretch[LayoutVertical]); /*###jp###*/ ZeroGlue (box->params.shrink[LayoutVertical]); /*###jp###*/ for (child = yyvsp[-1].bval; child; child = child->nextSibling) { if (child->type == GlueBox) { child->params.stretch[!yyvsp[-3].lval].expr = 0; child->params.shrink[!yyvsp[-3].lval].expr = 0; child->params.stretch[!yyvsp[-3].lval].order = 100000; child->params.shrink[!yyvsp[-3].lval].order = 100000; child->params.stretch[!yyvsp[-3].lval].value = 1; child->params.shrink[!yyvsp[-3].lval].value = 1; } child->parent = box; } yyval.bval = box; ; break;} case 7: { yyvsp[-1].bval->nextSibling = yyvsp[0].bval; yyval.bval = yyvsp[-1].bval; ; break;} case 8: { yyval.bval = yyvsp[0].bval; ; break;} case 9: { BoxParamsPtr p = New(BoxParamsRec); MEMMESSAGE(BoxParamsRec) p->stretch[LayoutHorizontal] = yyvsp[-5].gval; p->shrink[LayoutHorizontal] = yyvsp[-4].gval; p->stretch[LayoutVertical] = yyvsp[-2].gval; p->shrink[LayoutVertical] = yyvsp[-1].gval; yyval.pval = p; ; break;} case 10: { BoxParamsPtr p = New(BoxParamsRec); MEMMESSAGE(BoxParamsRec) ZeroGlue (p->stretch[LayoutHorizontal]); ZeroGlue (p->shrink[LayoutHorizontal]); ZeroGlue (p->stretch[LayoutVertical]); ZeroGlue (p->shrink[LayoutVertical]); yyval.pval = p; ; break;} case 11: { BoxParamsPtr p = New(BoxParamsRec); MEMMESSAGE(BoxParamsRec) p->stretch[LayoutHorizontal] = yyvsp[-2].gval; p->shrink[LayoutHorizontal] = yyvsp[-1].gval; p->stretch[LayoutVertical] = yyvsp[-2].gval; p->shrink[LayoutVertical] = yyvsp[-1].gval; yyval.pval = p; ; break;} case 12: { BoxParamsPtr p = New(BoxParamsRec); MEMMESSAGE(BoxParamsRec) ZeroGlue (p->stretch[LayoutHorizontal]); ZeroGlue (p->shrink[LayoutHorizontal]); ZeroGlue (p->stretch[LayoutVertical]); ZeroGlue (p->shrink[LayoutVertical]); yyval.pval = p; ; break;} case 13: { yyval.gval = yyvsp[0].gval; ; break;} case 14: { ZeroGlue (yyval.gval); ; break;} case 15: { yyval.gval = yyvsp[0].gval; ; break;} case 16: { ZeroGlue (yyval.gval); ; break;} case 17: { yyval.gval.order = yyvsp[0].ival; yyval.gval.expr = yyvsp[-1].eval; ; break;} case 18: { yyval.gval.order = 0; yyval.gval.expr = yyvsp[0].eval; ; break;} case 19: { yyval.gval.order = yyvsp[0].ival; yyval.gval.expr = 0; yyval.gval.value = 1; ; break;} case 20: { yyval.eval = New(ExprRec); MEMMESSAGE(ExprRec) yyval.eval->type = Unary; yyval.eval->u.unary.op = yyvsp[-1].oval; yyval.eval->u.unary.down = yyvsp[0].eval; ; break;} case 21: { yyval.eval = yyvsp[0].eval; ; break;} case 23: { yyval.eval = New(ExprRec); MEMMESSAGE(Width) yyval.eval->type = Width; yyval.eval->u.width = yyvsp[0].qval; ; break;} case 24: { yyval.eval = New(ExprRec); MEMMESSAGE(Height) yyval.eval->type = Height; yyval.eval->u.height = yyvsp[0].qval; ; break;} case 25: { yyval.eval = yyvsp[-1].eval; ; break;} case 26: { yyval.eval = New(ExprRec); yyval.eval->type = Unary; yyval.eval->u.unary.op = yyvsp[0].oval; yyval.eval->u.unary.down = yyvsp[-1].eval; ; break;} case 27: { yyval.eval = New(ExprRec); MEMMESSAGE(Constant) yyval.eval->type = Constant; yyval.eval->u.constant = yyvsp[0].ival; ; break;} case 28: { yyval.eval = New(ExprRec); MEMMESSAGE(Variable) yyval.eval->type = Variable; yyval.eval->u.variable = yyvsp[0].qval; ; break;} case 29: { binary: ; yyval.eval = New(ExprRec); MEMMESSAGE(Binary) yyval.eval->type = Binary; yyval.eval->u.binary.op = yyvsp[-1].oval; yyval.eval->u.binary.left = yyvsp[-2].eval; yyval.eval->u.binary.right = yyvsp[0].eval; ; break;} case 30: { goto binary; ; break;} case 31: { goto binary; ; break;} case 32: { goto binary; ; break;} case 33: { goto binary; ; break;} case 34: { /* unary: ; ###jp###*/ yyval.eval = New(ExprRec); MEMMESSAGE(Unary) yyval.eval->type = Unary; yyval.eval->u.unary.op = yyvsp[-1].oval; yyval.eval->u.unary.down = yyvsp[0].eval; ; break;} case 35: { yyval.eval = yyvsp[0].eval; ; break;} case 37: { yyval.lval = LayoutVertical; ; break;} case 38: { yyval.lval = LayoutHorizontal; ; break;} } /* the action file gets copied in in place of this dollarsign */ yyvsp -= yylen; yyssp -= yylen; #ifdef YYLSP_NEEDED yylsp -= yylen; #endif #if YYDEBUG != 0 if (yydebug) { short *ssp1 = yyss - 1; fprintf (stderr, "state stack now"); while (ssp1 != yyssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif *++yyvsp = yyval; #ifdef YYLSP_NEEDED yylsp++; if (yylen == 0) { yylsp->first_line = yylloc.first_line; yylsp->first_column = yylloc.first_column; yylsp->last_line = (yylsp-1)->last_line; yylsp->last_column = (yylsp-1)->last_column; yylsp->text = 0; } else { yylsp->last_line = (yylsp+yylen-1)->last_line; yylsp->last_column = (yylsp+yylen-1)->last_column; } #endif /* Now "shift" the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTBASE] + *yyssp; if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTBASE]; goto yynewstate; yyerrlab: /* here on detecting error */ if (! yyerrstatus) /* If not already recovering from an error, report this error. */ { ++yynerrs; #ifdef YYERROR_VERBOSE yyn = yypact[yystate]; if (yyn > YYFLAG && yyn < YYLAST) { int size = 0; char *msg; int x, count; count = 0; /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ for (x = (yyn < 0 ? -yyn : 0); x < (sizeof(yytname) / sizeof(char *)); x++) if (yycheck[x + yyn] == x) size += strlen(yytname[x]) + 15, count++; msg = (char *) malloc(size + 15); if (msg != 0) { strcpy(msg, "parse error"); if (count < 5) { count = 0; for (x = (yyn < 0 ? -yyn : 0); x < (sizeof(yytname) / sizeof(char *)); x++) if (yycheck[x + yyn] == x) { strcat(msg, count == 0 ? ", expecting `" : " or `"); strcat(msg, yytname[x]); strcat(msg, "'"); count++; } } yyerror(msg); free(msg); } else yyerror ("parse error; also virtual memory exceeded"); } else #endif /* YYERROR_VERBOSE */ yyerror("parse error"); } goto yyerrlab1; yyerrlab1: /* here on error raised explicitly by an action */ if (yyerrstatus == 3) { /* if just tried and failed to reuse lookahead token after an error, discard it. */ /* return failure if at end of input */ if (yychar == YYEOF) YYABORT; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); #endif yychar = YYEMPTY; } /* Else will try to reuse lookahead token after shifting the error token. */ yyerrstatus = 3; /* Each real token shifted decrements this */ goto yyerrhandle; yyerrdefault: /* current state does not do anything special for the error token. */ #if 0 /* This is wrong; only states that explicitly want error tokens should shift them. */ yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ if (yyn) goto yydefault; #endif yyerrpop: /* pop the current state because it cannot handle the error token */ if (yyssp == yyss) YYABORT; yyvsp--; yystate = *--yyssp; #ifdef YYLSP_NEEDED yylsp--; #endif #if YYDEBUG != 0 if (yydebug) { short *ssp1 = yyss - 1; fprintf (stderr, "Error: state stack now"); while (ssp1 != yyssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif yyerrhandle: yyn = yypact[yystate]; if (yyn == YYFLAG) goto yyerrdefault; yyn += YYTERROR; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) goto yyerrdefault; yyn = yytable[yyn]; if (yyn < 0) { if (yyn == YYFLAG) goto yyerrpop; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrpop; if (yyn == YYFINAL) YYACCEPT; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Shifting error token, "); #endif *++yyvsp = yylval; #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif yystate = yyn; goto yynewstate; } gv-3.7.4/src/Aaa_intern.h0000664000076400007640000001147111735103745012107 00000000000000/* ** ** Aaa_intern.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Authors: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _AAA_INTERN_H_ #define _AAA_INTERN_H_ /* #define MESSAGES #define MEMDEBUG */ /*---------------------------------------------------------*/ /* Include */ /*---------------------------------------------------------*/ #include #include #include "paths.h" #include INC_X11(Xlib.h) #include INC_X11(Xresource.h) #include INC_X11(IntrinsicP.h) #include INC_X11(cursorfont.h) #include INC_X11(StringDefs.h) #include INC_XMU(Misc.h) #include INC_XMU(Converters.h) #define DESTROY_EXPLICITLY #include "AaaP.h" #ifdef MEMDEBUG # define MESSAGES #endif #include "message.h" #ifdef MEMDEBUG # define MEMMESSAGE(sss) INFMESSAGE(sss) # define MEMBEGINMESSAGE(sss) BEGINMESSAGE(sss) # define MEMENDMESSAGE(sss) ENDMESSAGE(sss) #else # define MEMMESSAGE(sss) # define MEMBEGINMESSAGE(sss) # define MEMENDMESSAGE(sss) #endif /*---------------------------------------------------------*/ /* Bison Configuration */ /*---------------------------------------------------------*/ typedef union { int ival; XrmQuark qval; BoxPtr bval; BoxParamsPtr pval; GlueRec gval; LayoutDirection lval; ExprPtr eval; Operator oval; } YYSTYPE; typedef struct _LayoutConverterStruct { String base; String oldfrom; String from; LayoutPtr *to; } LayoutConverterStruct, *LayoutConverterArg; #define YYPARSE_PARAM layoutConverterArg #define YYLEX_PARAM layoutConverterArg /* ###todo### Currently I have no time to take care of alloca used in the dynamic stack extension, therefore we just show a polite message and exit in case a stack overflow occurs ###jp###. By the way, YYINITDEPTH=200 is already pretty much, I never got a stack size larger than 40 with the layouts I use. ###jp### */ #define YYINITDEPTH 200 #define yyoverflow(a1,a2,a3,a4,a5,a6) \ { \ fprintf(stderr,"yyoverflow: stack overflow\n"); \ fprintf(stderr," maximal stacksize: %d\n",yystacksize); \ fprintf(stderr," used : %d\n",size); \ fprintf(stderr,"Overflow forces image exit, bye bye.\n"); \ exit(0); \ } extern int layout_parse (void *); extern void layout_scan_error (char *, void *); extern int layout_lex (YYSTYPE *, void *); #define layout_error(sss) layout_scan_error(sss,YYLEX_PARAM) /*---------------------------------------------------------*/ /* Macros */ /*---------------------------------------------------------*/ #define New(ttt) (ttt *) XtMalloc(sizeof(ttt)) #define Dispose(xxx) XtFree((XtPointer)xxx) #define Some(ttt,nnn) (ttt *) XtMalloc(sizeof(ttt)*nnn) #define More(xxx,ttt,nnn) ( \ (xxx) ? \ (ttt *) XtRealloc(xxx,sizeof(ttt)*nnn) : \ (ttt *) XtMalloc(sizeof(ttt)*nnn) \ ) #define GlueEqual(a,b) \ ( (a).order == (b).order && (a).value == (b).value ) #define AddGlue(r,a,b) \ if (a.order == b.order) { \ r.order = a.order; \ r.value = a.value + b.value; \ } else { \ if (a.order > b.order) r = a; \ else r = b; \ } #define MinGlue(r,b) \ if (r.order == b.order) { \ if (r.value > b.value) r.value = b.value; \ } else { \ if (r.order > b.order) r = b; \ } #define SubGlue(r,a,b) \ if (a.order == b.order) { \ r.order = a.order; \ r.value = a.value - b.value; \ } else { \ if (a.order > b.order) \ r = a; \ else { \ r.order = b.order; \ r.value = -b.value; \ } \ } #define ZeroGlue(g) ((g).value = 0, (g).order = 0, (g).expr = 0) #define IsZeroGlue(g) ((g).value == 0) #define QuarkToWidget(l,q) XtNameToWidget((Widget) l, (char *) XrmQuarkToString(q)) #endif /* _AAA_INTERN_H_ */ gv-3.7.4/src/info.h0000664000076400007640000000265611735103745011006 00000000000000/* ** ** config.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_INFO_H_ #define _GV_INFO_H_ extern void makeInfoPopup (void); extern void cb_popupInfoPopup (Widget, XtPointer, XtPointer); extern void cb_popdownInfoPopup (Widget, XtPointer, XtPointer); extern void cb_appendInfoPopup (Widget, XtPointer, XtPointer); extern void cb_resetInfoPopup (Widget, XtPointer, XtPointer); #endif /* _GV_INFO_H_ */ gv-3.7.4/src/file.h0000664000076400007640000000301211735103745010755 00000000000000/* ** ** file.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_FILE_H_ #define _GV_FILE_H_ extern char* file_getDirOfPath (char *); extern char* file_locateFilename (char *); extern char* file_getTmpFilename (const char *, const char *, int *); extern void file_translateTildeInPath (char *, size_t); extern int file_fileIsDir (char *); extern int file_fileIsNotUseful (char *); extern char* file_pdfname2psname (char *); extern char* file_getUsefulName (char *); #endif /* _GV_FILE_H_ */ gv-3.7.4/src/options.h0000664000076400007640000000336211735103746011542 00000000000000/* ** ** options.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_OPTIONS_H_ #define _GV_OPTIONS_H_ extern void options_cb_popup (Widget, XtPointer, XtPointer); extern void options_cb_popdown (Widget, XtPointer, XtPointer); extern void options_cb_changeMenuLabel (Widget, XtPointer, XtPointer); extern void options_textApply (Widget, Boolean*, String*); extern void options_createLabeledMenu (String, Widget, Widget*, Widget*, Widget*); extern void options_realize (Widget, Widget); extern void options_setArg (String *, String *, String, String, String); extern String options_squeezeMultiline (String); extern String options_squeeze (String); extern void options_save (int, String *, String *); #endif /* _GV_OPTIONS_H_ */ gv-3.7.4/src/types.h0000664000076400007640000001325311735103746011213 00000000000000/* ** ** types.h ** ** Copyright (C) 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_TYPES_H_ #define _GV_TYPES_H_ #include /*############################################## options ##############################################*/ typedef void (*OptionPopupCreateProc)(void); typedef void (*OptionPopupUpdateProc)(void); typedef struct OptionPopupStruct_ { Widget popup; OptionPopupCreateProc create; OptionPopupUpdateProc update; Boolean visible; } OptionPopupStruct, *OptionPopup; /*############################################## miscmenu ##############################################*/ typedef struct MiscMenuEntryStruct_ { char *name; XtCallbackProc cb; XtPointer client_data; int sensitivity_type; } MiscMenuEntryStruct, *MiscMenuEntry; /*############################################## magmenu ##############################################*/ typedef struct MagMenuEntryStruct_ { char *name; float scale; int is_base; int is_center; } MagMenuEntryStruct, *MagMenuEntry; /*############################################## media ##############################################*/ typedef struct documentmedia { char *name; int width; int height; int used; } MediaStruct, *Media; /*############################################## scale ##############################################*/ typedef struct ScaleStruct_ { char *name; float scale; int is_base; int is_center; } ScaleStruct, *Scale; #define SCALE_IS_REAL_BASED 1 #define SCALE_IS_PIXEL_BASED 2 /*############################################## process ##############################################*/ typedef void (*ProcessNotifyProc)(XtPointer /* data */, int /* type */); #define PROCESS_NONE 0 #define PROCESS_NOTIFY 1 #define PROCESS_KILL 2 typedef struct ProcessDataStruct_ *ProcessData; typedef struct ProcessDataStruct_ { int type; pid_t pid; XtIntervalId timer; ProcessNotifyProc notify_proc; XtPointer data; ProcessData next; Widget menuentry; String name; } ProcessDataStruct; /*############################################## Definitions ##############################################*/ #define REQUEST_OPTION_CHANGE -10 #define REQUEST_TOGGLE_RESIZE -9 #define REQUEST_REDISPLAY -8 #define REQUEST_SETUP -7 #define REQUEST_NEW_SCALE -6 #define REQUEST_NEW_PAGEMEDIA -5 #define REQUEST_NEW_ORIENTATION -4 #define REQUEST_REOPEN -3 #define REQUEST_NEW_FILE -2 #define NO_CURRENT_PAGE -1 /* NO_CURRENT_PAGE must be -1 */ #define EYEGUIDE_DRAW (1<<0) #define EYEGUIDE_REMOVE (1<<1) #define EYEGUIDE_RESET (1<<2) #define SPM_ALL (1<<0) #define SPM_EVEN (1<<1) #define SPM_ODD (1<<2) #define SPM_CURRENT (1<<3) #define SPM_TOGGLE (1<<4) #define SPM_MARK (1<<5) #define SPM_UNMARK (1<<6) #define PAGE_MODE_INVALID 0 #define PAGE_MODE_ALL (1<<0) #define PAGE_MODE_MARKED (1<<1) #define PAGE_MODE_CURRENT (1<<2) #define PAGE_NONE 0 #define PAGE_LEFT (1<<0) #define PAGE_RIGHT (1<<1) #define PAGE_UP (1<<2) #define PAGE_DOWN (1<<3) #define PAGE_TOP (1<<4) #define PAGE_BOTTOM (1<<5) #define PAGE_LEFTEDGE (1<<6) #define PAGE_RIGHTEDGE (1<<7) #define PAGE_CENTER (1<<8) #define PAGE_REDISPLAY (1<<9) #define PAGE_PAGE (1<<10) #define PAGE_H (1<<11) #define PAGE_V (1<<12) #define PAGE_NOT (1<<13) #define CHECK_FILE_DATE (1<<0) #define CHECK_FILE_VERSION (1<<1) #define SCROLL_MODE_NONE 0 #define SCROLL_MODE_PANNER (1<<0) #define SCROLL_MODE_GHOSTVIEW (1<<1) #define SCROLL_MODE_SCROLLBAR (1<<2) #define FILE_TYPE_PS 0 #define FILE_TYPE_PDF 1 #define SAVE_MODE_NONE 0 #define SAVE_MODE_FILE 1 #define SAVE_MODE_PRINTER 2 #define PROCESS_NONE 0 #define PROCESS_NOTIFY 1 #define PROCESS_KILL 2 #define PROCESS_MENU_NONE 0 #define PROCESS_MENU_HIDE 1 #define PROCESS_MENU_SHOW 2 #define PROCESS_MENU_ADD_ENTRY 3 #define PROCESS_MENU_DEL_ENTRY 4 #define PROCESS_MENU_PROGRESS 5 /* orientations below match the definitions in ps.h */ #define O_INVALID -1000 #define O_UNSPECIFIED 0 #define O_PORTRAIT 1 #define O_LANDSCAPE 2 #define O_SEASCAPE 3 #define O_UPSIDEDOWN 4 #define O_AUTOMATIC 8 #define O_SWAP_LANDSCAPE 1000 #define MEDIA_ID_INVALID -3 #define MEDIA_ID_AUTO -2 #define SCALE_REL (1<<8) #define SCALE_ABS (1<<9) #define SCALE_BAS (1<<10) #define SCALE_MIN (1<<11) #define SCALE_VAL (~(SCALE_REL|SCALE_ABS|SCALE_BAS|SCALE_MIN)) #endif /* _GV_TYPES_H_ */ gv-3.7.4/src/Makefile.am0000664000076400007640000002212711735103745011731 00000000000000# Makefile.am for gv/src # # Copyright (C) 2004 José E. Marchesi # Process this file with automake to get Makefile.in # File distribution bin_PROGRAMS = gv bin_SCRIPTS = gv-update-userconfig pkgdata_DATA = gv_system.ad if !ENABLE_FALLBACK_STYLES pkgdata_DATA += gv_spartan.dat gv_widgetless.dat endif appdefaultsdir = $(pkgdatadir) appdefaults_DATA = ../GV EXTRA_DIST=ad2c gv_font_res.dat gv_font_res-I18N_mb.dat gv_layout_res.dat gv-i18n.pl gv_misc_res.dat Aaa_bison.yacc \ gv_current.xbm gv_doc.xbm gv_empty.xbm gv_even.xbm gv_icon.xbm gv_odd.xbm \ gv_selected.xbm gv_unmark.xbm $(srcdir)/nls/* \ gv_spartan.dat gv_widgetless.dat gv_user_res.dat gv_copyright.dat # Clean files CLEANFILES = ../GV \ GV.ad \ gv_system.ad \ gv_user.ad \ gv_spartan.h \ gv_widgetless.h \ gv_intern_res_unix.h \ gv_class.ad \ gv_class.h \ gv_make_res.dat \ gv_intern_res_unix.dat \ gv-update-userconfig MAINTAINERCLEANFILES = gv-i18n.h # Compilation flags AM_CPPFLAGS = -DNON_BLOCKING_IO -DGV_CODE -DGV_LIBDIR=\"$(pkgdatadir)\" \ -I$(top_srcdir)/lib -I$(top_builddir)/lib -g $(X_CFLAGS) AM_CFLAGS = LDADD = ../lib/libgnu.a gv_LDFLAGS = @X_LIBS@ gv_SOURCES = Aaa.c \ Aaa_bison.c \ Aaa_bison.h \ Aaa_lex.c \ Button.c \ Button.h \ ButtonP.h \ Clip.c \ Clip.h \ ClipP.h \ FileSel.c \ FileSel.h \ FileSelP.h \ Frame.c \ Frame.h \ FrameP.h \ Ghostview.c \ Ghostview.h \ GhostviewP.h \ MButton.c \ MButton.h \ MButtonP.h \ Switch.c \ Switch.h \ SwitchP.h \ Vlist.c \ Vlist.h \ VlistP.h \ actions.c \ actions.h \ callbacks.c \ callbacks.h \ confirm.c \ confirm.h \ config.h \ dialog.c \ dialog.h \ doc_misc.c \ doc_misc.h \ error.c \ error.h \ file.c \ file.h \ info.c \ info.h \ magmenu.c \ magmenu.h \ main.c \ main_globals.h \ main_resources.h \ media.c \ media.h \ message.h \ misc.c \ misc.h \ miscmenu.c \ miscmenu.h \ misc_private.c \ misc_private.h \ note.c \ note.h \ options.c \ options.h \ options_fs.c \ options_fs.h \ options_gs.c \ options_gs.h \ options_gv.c \ options_gv.h \ options_setup.c \ options_setup.h \ paths.h \ process.c \ process.h \ popup.c \ popup.h \ ps.c \ ps.h \ resource.c \ resource.h \ save.c \ save.h \ scale.c \ scale.h \ secscanf.c \ secscanf.h \ gv_signal.c \ gv_signal.h \ version.c \ version.h \ versionp.h \ widgets_misc.c \ widgets_misc.h \ zoom.c \ zoom.h \ message.h \ Aaa_intern.h \ Aaa.h \ AaaP.h \ gv_message.h \ types.h \ gv-i18n.h \ gv-update-userconfig.in BUILT_SOURCES = gv_spartan.h gv_widgetless.h gv_intern_res_unix.h gv_class.h gv-i18n.h # Additional rules for generating styles ../GV : GV.ad @echo "creating GV" sed -e 's/^[^!]/!&/' GV.ad > ../GV GV.ad : gv_system.ad @echo "creating GV.ad" @cp gv_system.ad GV.ad gv_system.ad : gv_user.ad @echo "creating gv_system.ad" @cp gv_user.ad gv_system.ad gv_user.ad : $(srcdir)/gv_user_res.dat gv_intern_res_unix.dat gv_make_res.dat @echo "creating gv_user.ad" @echo "!" > gv_user.ad @echo "! gv_user.ad" >> gv_user.ad @echo "! User specific application defaults for gv" >> gv_user.ad @echo "! Copyright (C) 1995, 1996, 1997 Johannes Plass" >> gv_user.ad @echo "! Copyright (C) 2004,2005,2006,2007 José E. Marchesi" >> gv_user.ad @echo "!" >> gv_user.ad @cat $(srcdir)/gv_user_res.dat >> gv_user.ad @cat gv_intern_res_unix.dat >> gv_user.ad @cat gv_make_res.dat >> gv_user.ad gv_spartan.h : $(srcdir)/gv_spartan.dat @sh $(srcdir)/ad2c $(srcdir)/gv_spartan.dat > gv_spartan.h gv_widgetless.h : $(srcdir)/gv_widgetless.dat @sh $(srcdir)/ad2c $(srcdir)/gv_widgetless.dat > gv_widgetless.h gv_intern_res_unix.h : gv_intern_res_unix.dat @echo "creating gv_intern_res_unix.h" @sh $(srcdir)/ad2c gv_intern_res_unix.dat > gv_intern_res_unix.h gv_intern_res_unix.dat : @echo "creating gv_intern_res_unix.dat" @echo "" > gv_intern_res_unix.dat @echo "!########## gv_intern_res.dat (generated by makefile)" >> gv_intern_res_unix.dat @echo "" >> gv_intern_res_unix.dat @echo "GV.gsInterpreter: gs" >> gv_intern_res_unix.dat @echo "GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s %s pdf2dsc.ps -c quit" >> gv_intern_res_unix.dat @echo "GV.gsCmdConvPDF: gs -dNOPAUSE -dQUIET -dBATCH -sDEVICE=pswrite -sOutputFile=%s -f %s -c save pop quit" >> gv_intern_res_unix.dat @echo "GV.gsX11Device: -sDEVICE=x11" >> gv_intern_res_unix.dat @echo "GV.gsX11AlphaDevice: -sDEVICE=x11 -dTextAlphaBits=4 -dGraphicsAlphaBits=2 -dMaxBitmap=10000000 -dNOPLATFONTS" >> gv_intern_res_unix.dat @echo "GV.gsSafeDir: True" >> gv_intern_res_unix.dat @echo "GV.gsSafer: True" >> gv_intern_res_unix.dat @echo "GV.gsQuiet: True" >> gv_intern_res_unix.dat @echo "GV.infoVerbose: Warnings" >> gv_intern_res_unix.dat @echo "GV.xinerama: Auto" >> gv_intern_res_unix.dat @echo "GV.gsArguments: -dFIXEDMEDIA" >> gv_intern_res_unix.dat @echo "GV.uncompressCommand: gzip -d -c %s > %s" >> gv_intern_res_unix.dat @echo "GV.printCommand: $(PRINT_COMMAND)" >> gv_intern_res_unix.dat gv_class.h : gv_class.ad @echo "creating gv_class.h" @sh $(srcdir)/ad2c gv_class.ad > gv_class.h gv-i18n.h: $(srcdir)/nls/LANGUAGES $(srcdir)/nls/*.dat perl $(srcdir)/gv-i18n.pl $(srcdir) > gv-i18n.h || { rm gv-i18n.h ; exit 1 ; } gv_class.ad : $(srcdir)/gv_font_res.dat $(srcdir)/gv_font_res-I18N_mb.dat $(srcdir)/gv_layout_res.dat gv_make_res.dat $(srcdir)/gv_misc_res.dat $(srcdir)/gv_user_res.dat gv_intern_res_unix.dat @echo "creating gv_class.ad" cp $(srcdir)/gv_copyright.dat gv_class.ad chmod u+w gv_class.ad @echo "!" >> gv_class.ad @echo "! gv_class.ad" >> gv_class.ad @echo "! Application class defaults for gv" >> gv_class.ad @echo "! Copyright (C) 1995, 1996, 1997 Johannes Plass" >> gv_class.ad @echo "! Copyright (C) 2004,2005,2006,2007 José E. Marchesi" >> gv_class.ad @echo "!" >> gv_class.ad @echo "" >> gv_class.ad @cat $(srcdir)/gv_user_res.dat >> gv_class.ad @cat gv_intern_res_unix.dat >> gv_class.ad @cat gv_make_res.dat >> gv_class.ad if ENABLE_INTERNATIONAL echo "GV*international: TRUE" >> gv_class.ad endif @cat $(srcdir)/gv_font_res-I18N_mb.dat >> gv_class.ad @cat $(srcdir)/gv_font_res.dat >> gv_class.ad @cat $(srcdir)/gv_misc_res.dat >> gv_class.ad @cat $(srcdir)/gv_layout_res.dat >> gv_class.ad sysdocdir = /usr/doc gv_make_res.dat : @echo "creating gv_make_res.dat" @echo "" > gv_make_res.dat @echo "!########## gv_make_res.dat (generated by makefile)" >> gv_make_res.dat @echo "" >> gv_make_res.dat @echo "GV.scratchDir: $(SCRATCH_DIR)" >> gv_make_res.dat @echo "GV.defaultSaveDir: $(SAVE_DIR)" >> gv_make_res.dat @echo "GV.fallbackPageMedia: $(PAPERSIZE)" >> gv_make_res.dat @echo "GV.useBackingPixmap: $(USE_BACKING_PIXMAP)" >> gv_make_res.dat @echo "GV*dirs: Home\n\\" >> gv_make_res.dat @echo " Tmp\n\\" >> gv_make_res.dat @echo " $(sysdocdir)\n\\" >> gv_make_res.dat @echo " /usr/local/doc" >> gv_make_res.dat @echo "GV*filter: no .*" >> gv_make_res.dat @echo "GV*filters: None\n\\" >> gv_make_res.dat @echo " *.*ps* *.pdf* no .*\n\\" >> gv_make_res.dat @echo " *.*ps* no .*\n\\" >> gv_make_res.dat @echo " *.pdf* no .*\n\\" >> gv_make_res.dat @echo " no .*" >> gv_make_res.dat @echo "" >> gv_make_res.dat gv-update-userconfig: $(srcdir)/gv-update-userconfig.in GV.ad cat $(srcdir)/gv-update-userconfig.in > gv-update-userconfig echo "__END__" >> gv-update-userconfig cat GV.ad >> gv-update-userconfig cat $(srcdir)/gv_misc_res.dat >> gv-update-userconfig # Conditional source files if USE_SCROLLBAR_CODE gv_SOURCES += Scrollbar.c Scrollbar.h ScrollbarP.h endif if USE_SETENV_CODE gv_SOURCES += setenv.c setenv.h AM_CPPFLAGS += -DUSE_SETENV_CODE endif install-data-local: $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)/safe-gs-workdir" chmod 755 "$(DESTDIR)$(pkgdatadir)/safe-gs-workdir" gv-3.7.4/src/Button.c0000664000076400007640000002625111735103745011316 00000000000000/* ** ** Button.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Authors: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project */ #include "ac_config.h" #include /* #define MESSAGES */ #include "message.h" #include "paths.h" #include INC_X11(IntrinsicP.h) #include INC_X11(StringDefs.h) #include INC_XMU(Misc.h) #include INC_XAW(XawInit.h) #include "ButtonP.h" #include INC_XMU(Converters.h) #include INC_XMU(CharSet.h) static void ClassInitialize(void); static void Initialize(Widget,Widget,ArgList,Cardinal*); static void Redisplay(Widget,XEvent *,Region); static void Destroy(Widget); static void PaintButtonWidget(Widget,XEvent *,Region); static void GetSetBackgroundGC(ButtonWidget); static void GetHighlightedBackgroundGC(ButtonWidget); /**************************************************************** * * Full class record constant * ****************************************************************/ /* Private Data */ static char defaultTranslations[] = ":highlight()\n\ :reset()\n\ :set()\n\ :notify()unset()"; #define offset(field) XtOffsetOf(ButtonRec, field) static XtResource resources[] = { {XtNsetFrameStyle, XtCSetFrameStyle, XtRFrameType, sizeof(XawFrameType), offset(button.set_frame_style), XtRImmediate, (XtPointer) XawSUNKEN }, {XtNunsetFrameStyle, XtCUnsetFrameStyle, XtRFrameType, sizeof(XawFrameType), offset(button.unset_frame_style), XtRImmediate, (XtPointer) XawRAISED }, {XtNhighlightedFrameStyle, XtCHighlightedFrameStyle, XtRFrameType, sizeof(XawFrameType), offset(button.highlighted_frame_style), XtRImmediate, (XtPointer) XawRAISED }, {XtNsetBackground, XtCSetBackground, XtRPixel, sizeof(Pixel), offset(button.set_background), XtRString, XtDefaultBackground}, {XtNhighlightedBackground, XtCHighlightedBackground, XtRPixel, sizeof(Pixel), offset(button.highlighted_background), XtRString, XtDefaultBackground}, {XtNhighlightThickness, XtCThickness, XtRDimension, sizeof(Dimension), offset(command.highlight_thickness), XtRImmediate,(XtPointer)0}, {XtNborderWidth, XtCBorderWidth, XtRDimension, sizeof(Dimension), XtOffsetOf(RectObjRec,rectangle.border_width), XtRImmediate, (XtPointer)0} }; #undef offset static XtActionsRec actionsList[] = { {"highlight", ButtonHighlight}, {"set", ButtonSet}, {"reset", ButtonReset}, {"unset", ButtonUnset}, }; #define SuperClass ((CommandWidgetClass)&commandClassRec) ButtonClassRec buttonClassRec = { { (WidgetClass) SuperClass, /* superclass */ "Button", /* class_name */ sizeof(ButtonRec), /* size */ ClassInitialize, /* class_initialize */ NULL, /* class_part_initialize */ FALSE, /* class_inited */ Initialize, /* initialize */ NULL, /* initialize_hook */ XtInheritRealize, /* realize */ actionsList, /* actions */ XtNumber(actionsList), /* num_actions */ resources, /* resources */ XtNumber(resources), /* resource_count */ NULLQUARK, /* xrm_class */ TRUE, /* compress_motion */ TRUE, /* compress_exposure */ TRUE, /* compress_enterleave */ FALSE, /* visible_interest */ Destroy, /* destroy */ XtInheritResize, /* resize */ Redisplay, /* expose */ NULL, /* set_values */ NULL, /* set_values_hook */ XtInheritSetValuesAlmost, /* set_values_almost */ NULL, /* get_values_hook */ NULL, /* accept_focus */ XtVersion, /* version */ NULL, /* callback_private */ defaultTranslations, /* tm_table */ XtInheritQueryGeometry, /* query_geometry */ XtInheritDisplayAccelerator, /* display_accelerator */ NULL /* extension */ }, /* CoreClass fields initialization */ { XtInheritChangeSensitive /* change_sensitive */ }, /* SimpleClass fields initialization */ { XtInheritXaw3dShadowDraw, /* shadowdraw */ }, /* ThreeD Class fields initialization */ { 0, /* field not used */ }, /* LabelClass fields initialization */ { 0, /* field not used */ }, /* CommandClass fields initialization */ { 0, /* field not used */ }, /* ButtonClass fields initialization */ }; /* for public consumption */ WidgetClass buttonWidgetClass = (WidgetClass) &buttonClassRec; /*---------------------------------------------------*/ /* ClassInitialize */ /*---------------------------------------------------*/ static void ClassInitialize() { BEGINMESSAGE(ClassInitialize) XawInitializeWidgetSet(); XtSetTypeConverter(XtRString, XtRFrameType, FrameConvertStringToFrameType, (XtConvertArgList)NULL, 0, XtCacheNone, NULL); ENDMESSAGE(ClassInitialize) } /*---------------------------------------------------*/ /* Initialize */ /*---------------------------------------------------*/ static void Initialize(Widget request _GL_UNUSED, Widget new, ArgList args _GL_UNUSED, Cardinal *num_args _GL_UNUSED) { ButtonWidget bw = (ButtonWidget) new; BEGINMESSAGE(Initialize) GetSetBackgroundGC(bw); GetHighlightedBackgroundGC(bw); bw->button.highlighted = 0; ENDMESSAGE(Initialize) } /*---------------------------------------------------*/ /* Redisplay */ /*---------------------------------------------------*/ static void Redisplay(w, event, region) Widget w; XEvent *event; Region region; { BEGINMESSAGE(Redisplay) PaintButtonWidget(w, event, region); ENDMESSAGE(Redisplay) } /*---------------------------------------------------*/ /* Destroy */ /*---------------------------------------------------*/ static void Destroy(w) Widget w; { ButtonWidget bw = (ButtonWidget)w; BEGINMESSAGE(Destroy) XtReleaseGC(w,bw->button.set_background_GC); XtReleaseGC(w,bw->button.highlighted_background_GC); ENDMESSAGE(Destroy) } /*---------------------------------------------------*/ /* GetHighlightedBackgroundGC */ /*---------------------------------------------------*/ static void GetHighlightedBackgroundGC(bw) ButtonWidget bw; { XGCValues values; BEGINMESSAGE(GetHighlightedBackgroundGC) values.foreground = bw->button.highlighted_background; values.background = bw->label.foreground; bw->button.highlighted_background_GC = XtGetGC((Widget)bw,(unsigned) (GCForeground | GCBackground),&values); ENDMESSAGE(GetHighlightedBackgroundGC) } /*---------------------------------------------------*/ /* GetSetBackgroundGC */ /*---------------------------------------------------*/ static void GetSetBackgroundGC(bw) ButtonWidget bw; { XGCValues values; BEGINMESSAGE(GetSetBackgroundGC) values.foreground = bw->button.set_background; values.background = bw->label.foreground; bw->button.set_background_GC = XtGetGC((Widget)bw,(unsigned) (GCForeground | GCBackground),&values); ENDMESSAGE(GetSetBackgroundGC) } /*---------------------------------------------------*/ /* PaintButtonWidget */ /*---------------------------------------------------*/ static void PaintButtonWidget(w, event, region) Widget w; XEvent *event; Region region; { ButtonWidget bw = (ButtonWidget)w; int wh,ww,sw,fs; GC cgc,lgc,gc; Boolean set; BEGINMESSAGE(PaintButtonWidget) if (bw->command.set) { gc = bw->button.set_background_GC; } else if (bw->button.highlighted) { gc = bw->button.highlighted_background_GC; } else { gc = bw->command.inverse_GC; } XFillRectangle(XtDisplay(w), XtWindow(w),gc,0,0,bw->core.width,bw->core.height); region = NULL; lgc = bw->label.normal_GC; sw = (int) bw->threeD.shadow_width; set = bw->command.set; bw->command.set = False; #if 0 bw->threeD.shadow_width = 0; #endif cgc = bw->command.normal_GC; if (bw->label.pixmap != None) { bw->command.normal_GC = gc; } (*SuperClass->core_class.expose) (w, event, region); bw->command.set = set; bw->threeD.shadow_width = (Dimension) sw; bw->label.normal_GC = lgc; bw->command.normal_GC = cgc; ww = (int)bw->core.width; wh = (int)bw->core.height; sw = (int)bw->threeD.shadow_width; if (bw->command.set) fs = (int)bw->button.set_frame_style; else if (bw->button.highlighted) fs = (int)bw->button.highlighted_frame_style; else fs = (int)bw->button.unset_frame_style; if (sw == 0 || 2*sw>ww || 2*sw>wh) { INFMESSAGE(not enough space to display anything) ENDMESSAGE(Redisplay) return; } FrameDrawFrame(w,0,0,ww,wh,fs,sw,bw->threeD.top_shadow_GC,bw->threeD.bot_shadow_GC); ENDMESSAGE(PaintButtonWidget) } /*####################################################################*/ /*####################################################################*/ /* Public Routines */ /*####################################################################*/ /*####################################################################*/ /*##################################################-*/ /* ACTIONS */ /*##################################################-*/ void ButtonHighlight(Widget w, XEvent *event, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { ButtonWidget bw = (ButtonWidget)w; Boolean set; BEGINMESSAGE(ButtonHighlight) bw->button.highlighted=1; set = bw->command.set; bw->command.set=False; if (XtIsRealized(w)) PaintButtonWidget(w, event, (Region)NULL); bw->command.set=set; ENDMESSAGE(ButtonHighlight) } void ButtonSet(Widget w, XEvent *event, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { ButtonWidget bw = (ButtonWidget)w; BEGINMESSAGE(ButtonSet) if (!bw->command.set) { bw->command.set= TRUE; if (XtIsRealized(w)) PaintButtonWidget(w, event, (Region)NULL); } ENDMESSAGE(ButtonSet) } void ButtonUnset(Widget w, XEvent *event, String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED) { ButtonWidget bw = (ButtonWidget)w; BEGINMESSAGE(ButtonUnset) bw->command.set = FALSE; if (XtIsRealized(w)) PaintButtonWidget(w, event, (Region)NULL); ENDMESSAGE(ButtonUnset) } void ButtonReset(w,event,params,num_params) Widget w; XEvent *event; String *params; /* unused */ Cardinal *num_params; /* unused */ { ButtonWidget bw = (ButtonWidget)w; BEGINMESSAGE(ButtonReset) bw->button.highlighted = 0; ButtonUnset(w, event, params, num_params); ENDMESSAGE(ButtonReset) } gv-3.7.4/src/gv-i18n.h0000664000076400007640000015177412121323362011237 00000000000000static String gv_nls_noint_de_dat [] = { "GV*miscmenuLabel.label: Extras: Menueeintraege", "GV*x11devLabel.label: Geraet", "GV*scratchDirLabel.label: Scratch Directory", "GV*misc.label: Extras", "GV*miscMenu.stop.label: Interpreter beenden", "GV*miscMenu.save_all.label: Alles speichern", "GV*saveDirLabel.label: Ordner zum Speichern", "GV*infoPopup.title: Ghostscript-Meldungen", "GV*dirsLabel.label: Dateiauswahlordner", "GV*scanLabel.label: Scan PDF", "GV*optiongvPopup*magLabel.label: Groesse", "GV*button2.label: Datei oeffnen", "GV*optionsetupPopup.title: Allg. Einstellungen", "GV*optiongvPopup*respectDSC.label: DSC beachten", "GV*miscMenu.save_marked.label: Markiertes speichern", "GV*scrolling.label: Umgekehrtes Scrollen", "GV*optiongvPopup*forientLabel.label: Rueckfall-Orientatierung", "GV*button1.label: Abbrechen", "GV*filters.label: Filter:", "GV*confirmLabel.label: Beenden bestaetigen", "GV*printMarked.label: Markiertes drucken", "GV*optiongvPopup*orientLabel.label: \\ Orientatierung \\ ", "GV*optiongvPopup*fmediaLabel.label: Rueckfall-Papiergroesse", "GV*confirmPopup*done.label: Beenden", "GV*optiongvPopup*autoResize.label: Variable Groesse", "GV*defaults.label: Standardeinstellungen", "GV*uncompressLabel.label: Dekomprimieren", "GV*miscMenu.unmark.label: Demarkieren", "GV*safer.label: Safer", "GV*saveMarked.label: Markiertes speichern", "GV*optiongvPopup*swapLandscape.label: Swap Querformat", "GV*miscMenu.update.label: Datei neu laden", "GV*miscMenu.print_marked.label: Markiertes drucken", "GV*scalesLabel.label: Vergroesserung", "GV*x11alphadevLabel.label: Antialias", "GV*saveAll.label: Alles speichern", "GV*miscMenu.toggle_current.label: Aktuelle umschaltewn", "GV*miscMenu.toggle_odd.label: Gerade umschalten", "GV*miscMenu.toggle_even.label: Ungerade umschalten", "GV*printCommandLabel.label: Druckkommando", "GV*updateFile.label: Neu laden", "GV*optiongsPopup.title: Ghostscript Einstellungen", "GV*quiet.label: Quiet", "GV*confirmPopup.title: Bestaetigen", "GV*mediasLabel.label: Mediengroessen", "GV*optionfsPopup.title: Dateiauswahloptionen", "GV*optiongvPopup*mediaLabel.label: \\ Papiergroesse \\ ", "GV*convLabel.label: Konvertiere PDF", "GV*zoomPopup.title: Lupe", "GV*optiongvPopup.title: gv Einstellungen", "GV*confirmPrint.label: Drucken bestaetigen", "GV*filterLabel.label: Standard-Filter", "GV*filtersLabel.label: Dateiauswahlfilters", "GV*checkFile.label: Datei beobachten", "GV*toggleOdd.label:", "GV*optiongvPopup*scalesLabel.label: \\ Vergroesserungen \\ ", "GV*toggleCurrent.label:", "GV*dialogPopup*cancel.label: Abbrechen", "GV*fileSelPopup.title: Datei oeffnen", "GV*eyeGuide.label: ?Scrolling Eye Guide?", "GV*magmenuLabel.label: Mag Menu Entries", "GV*rescan.label: Ordner neu einlesen", "GV*miscMenu.print_all.label: Alles drucken", "GV*gsLabel.label: Interpreter", "GV*optiongvPopup*antialias.label: Antialias", "GV*printAll.label: Alles drucken ", "GV*argumentsLabel.label: Argumente", "GV*toggleEven.label:", "GV*scaleBaseLabel.label: Vergroesserungsbasis", "GV*screenSizeLabel.label: Bildschiemgroesse (mm)", "GV*dialogPopup.title: Dialog", "GV*unmarkAll.label:", "GV*autoCenter.label: Automatisch zentrieren", "GV*redisplay.label: Neu laden", "GV*confirmPopup*cancel.label: Abbrechen", "GV*openFile.label: Oeffnen", "GV*save.label: Speichern", "GV*notePopup.title: Nachricht", "GV*optiongvPopup*eof.label: EOF ignorieren", "GV*apply.label: Anwenden", "GV*miscMenu.redisplay.label: Neu laden", "GV*dirs.label: Ordner", "GV*notePopup*done.label: OK", "GV*copyright.Label: Copyright", "GV*optionsgv.Label: gv Einstellungen ...", "GV*mark.Label: Markieren", "GV*dismiss.Label: Abbrechen", "GV*center.Label: Zentrieren", "GV*printMarkedPages.Label: Drucke markierte ...", "GV*update.Label: Neu laden", "GV*optionsgs.Label: Ghostscript Einstellungen ...", "GV*presentation.Label: Presentationsmodus", "GV*saveAllPages.Label: Speichere Dokument ...", "GV*pageButton*unmark.Label: Alle demarkieren", "GV*automatic.Label: Automatik", "GV*unmark.Label: Demarkieren", "GV*reopen.Label: Neu laden", "GV*dsc.Label: Beachte Documentstruktur", "GV*pixmap.Label: ?Backing Pixmap?", "GV*savepos.Label: Savepos", "GV*pageButton.Label: Seite", "GV*open.Label: Oeffnen...", "GV*fileButton.Label: Datei", "GV*antialias.Label: Antialias", "GV*show.Label: Neu anzeigen", "GV*stateButton.Label: Status", "GV*pageButton*current.Label: Aktuelle Markierung wechselnn", "GV*optionssetup.Label: Allg. Einstellungen ...", "GV*ascaleLabel.Label: Beliebige Vergroesserung", "GV*next.Label: Naechste", "GV*seascape.Label: Alt. Querformat", "GV*cancel.Label: Abbrechen", "GV*watch.Label: Datei beobachten", "GV*titleLabel.Label: Titel anzeigen", "GV*processButton.Label: \\ processing", "GV*stop.Label: Interpreter beenden", "GV*upsidedown.Label: Umgedreht", "GV*pageButton*even.Label: Gerade Markierungen wechseln", "GV*quit.Label: Beenden", "GV*nextPage.Label: >>", "GV*eof.Label: EOF Kommenatre ignorieren", "GV*landscape.Label: Querformat", "GV*printAllPages.Label: Dokument drucken ...", "GV*infoVerboseLabel.Label: Info.Popup", "GV*size.Label: Automatische Groesse", "GV*prevPage.Label: <<", "GV*prev.Label: Vorherige", "GV*saveMarkedPages.Label: Markierte Seiten speichern ...", "GV*pageButton*odd.Label: Ungerade Markierungen wechseln", "GV*optionsfs.Label: Dateiauswahloptionen ...", "GV*swap.Label: Querformat umschalten", "GV*portrait.Label: Hochformat", "GV*watchFile.Label: Datei beobachten", "GV*gs.errors.none.Label: Keine", "GV*gs.errors.all.Label: Alle", "GV*gs.errors.errors.Label: Fehler", "GV.scales: Natuerliche Groesse, 1.000, screen \\n\ Pixelbasiert, 1.000, pixel \\n\ Beliebige Vergroesserung, -2 \\n\ Hoehe anpassen, -3 \\n\ Breite anpassen, -1 \\n\ Beides anpassen, 0.000 \\n\ 0.100, 0.100 \\n\ 0.125, 0.125 \\n\ 0.250, 0.250 \\n\ 0.500, 0.500 \\n\ 0.707, 0.707 \\n\ 1.000, 1.000 \\n\ 1.414, 1.414 \\n\ 2.000, 2.000 \\n\ 4.000, 4.000 \\n\ 8.000, 8.000 \\n\ 10.00, 10.00", "GV*quitstyle.never.Label: Niemals", "GV*quitstyle.always.Label: Immer", "GV*quitstyle.whenprocessing.Label: Bei Verarbeitung", "GV*title.filename.Label: Dateiname", "GV*title.notitle.Label: Kein Titel", "GV*title.documenttitle.Label: Dokumenttitel", "GV*strings.saveMarkedPages: Markiere Seiten speichern", "GV*strings.saveCurrentPage: Aktuelle Seite speichern", "GV*strings.saveDocument: Dokument speichern", "GV*strings.saveAsPDF: Als PDF speichern", "GV*strings.openFile: Datei oeffnen", "GV*strings.passwordPrompt: Passwort:", "GV*strings.passwordRequired: Passwort erforderlich", "GV*strings.quitConfirm: Wollen Sie wirklich GNU gv beenden?", "GV*strings.putTexCommand: Schreibe eine TeX-Anweisung an die aktuelle Position", "GV*strings.texCommand: TeX -Anweisung", "GV*strings.stillInProgress: Noch in Bearbeitung:", "GV*strings.execOfFailed: Ausfuehrung von %s fehlgeschlagen", "GV*strings.copyrightTranslation: Markus Steinborn ", 0}; static String gv_nls_ko_KR_UTF_8_dat [] = { "GV*zoomPopup.title: GV - 확대", "GV*infoPopup.title: 고스트 스í¬ë¦½íЏ 메시지", "GV*dialogPopup.title: 다ì´ì•Œë¡œê·¸", "GV*notePopup.title: 메시지", "GV*confirmPopup.title: 확ì¸", "GV*optionfsPopup.title: íŒŒì¼ ì„ íƒ ì˜µì…˜", "GV*optiongsPopup.title: 고스트 스í¬ë¦½íЏ 옵션", "GV*optiongvPopup.title: GV 옵션", "GV*optionsetupPopup.title: 설정 옵션", "GV*fileSelPopup.title: íŒŒì¼ ì—´ê¸°", "GV*cancel.Label: 취소", "GV*dismiss.Label: 닫기", "GV*apply.label: ì ìš©", "GV*copyright.Label: 저작권", "GV*quit.Label: 종료", "GV*fileButton.Label: 파ì¼", "GV*open.Label: 열기 ...", "GV*reopen.Label: 재열기", "GV*update.Label: 경신", "GV*printAllPages.Label: 문서 ì¸ì‡„ ...", "GV*printMarkedPages.Label: 마í¬í•œ 페ì´ì§€ ì¸ì‡„ ...", "GV*saveAllPages.Label: 문서 저장 ...", "GV*saveMarkedPages.Label: 마í¬í•œ 페ì´ì§€ 저장 ...", "GV*stateButton.Label: 환경 설정", "GV*stop.Label: 중지", "GV*dsc.Label: 문서 구조화", "GV*eof.Label: EOF ì£¼ì„ ë¬´ì‹œ", "GV*antialias.Label: 매ë„러운 화면 처리", "GV*watchFile.Label: ìžë™ 파ì¼ê²½ì‹ ", "GV*showTitle.Label: 타ì´í‹€ 표시", "GV*pixmap.Label: Backing Pixmap", "GV*size.Label: ìžë™ í¬ê¸° ì¡°ì ˆ", "GV*watch.Label: ìžë™ 파ì¼ê²½ì‹ ", "GV*optionsgv.Label: GV 옵션 ...", "GV*optionsfs.Label: íŒŒì¼ ì„ íƒ ì˜µì…˜ ...", "GV*optionsgs.Label: 고스트 스í¬ë¦½íЏ 옵션 ...", "GV*optionssetup.Label: 설정 옵션 ...", "GV*pageButton.Label: 페ì´ì§€", "GV*next.Label: 다ìŒ", "GV*show.Label: 화면 재시작", "GV*prev.Label: ì´ì „", "GV*center.Label: 중간", "GV*pageButton*current.Label: 현재페ì´ì§€ 마í¬/í•´ì œ", "GV*pageButton*even.Label: ì§ìˆ˜íŽ˜ì´ì§€ 마í¬/í•´ì œ", "GV*pageButton*odd.Label: 홀수페ì´ì§€ 마í¬/í•´ì œ", "GV*pageButton*unmark.Label: ì „ ë§ˆí¬ í•´ì œ", "GV*processButton.Label: \\ 진행중", "GV*mark.Label: 마í¬", "GV*prevPage.Label: <<", "GV*nextPage.Label: >>", "GV*unmark.Label: 표시 안함", "GV*automatic.Label: ìžë™", "GV*portrait.Label: Portrait", "GV*landscape.Label: Landscape", "GV*upsidedown.Label: ìƒí•˜ 반전", "GV*seascape.Label: Seascape", "GV*swap.Label: Landscape변환", "GV*toggleCurrent.label: 현재페ì´ì§€ 마í¬/í•´ì œ", "GV*toggleEven.label: ì§ìˆ˜íŽ˜ì´ì§€ 마í¬/í•´ì œ", "GV*toggleOdd.label: 홀수페ì´ì§€ 마í¬/í•´ì œ", "GV*unmarkAll.label: ëª¨ë‘ í‘œì‹œ 안함", "GV*printAll.label: ëª¨ë‘ ì¸ì‡„", "GV*printMarked.label: 마í¬ë¶€ë¶„ ì¸ì‡„", "GV*saveAll.label: ëª¨ë‘ ì €ìž¥", "GV*saveMarked.label: 표시 저장", "GV*openFile.label: 열기", "GV*redisplay.label: 화면 재시작", "GV*updateFile.label: 파ì¼ê²½ì‹ ", "GV*checkFile.label: íŒŒì¼ í™•ì¸", "GV*filters.label: í•„í„°", "GV*dirs.label: 디렉토리", "GV*button1.label: 취소", "GV*button2.label: íŒŒì¼ ì—´ê¸°", "GV*rescan.label: 디렉토리 검색", "GV*screenSizeLabel.label: 회면 사ì´ì¦ˆmm]", "GV*versionPopup*versionDone*label: 취소", "GV*dialogPopup*cancel.label: 취소", "GV*notePopup*done.label: 예", "GV*confirmPopup*cancel.label: 취소", "GV*confirmPopup*done.label: 종료", "GV*save.label: 저장", "GV*optiongvPopup*mediaLabel.label: \\ 용지 사ì´ì¦ˆ \\ ", "GV*optiongvPopup*fmediaLabel.label: 불íŒëª…ì‹œì˜ ìš©ì§€ 사ì´ì¦ˆ", "GV*optiongvPopup*orientLabel.label: \\ ì› ìƒíƒœ \\ ", "GV*optiongvPopup*forientLabel.label: 윈 ìƒíƒœë¡œ 복귀", "GV*optiongvPopup*magLabel.label: 확대축소", "GV*optiongvPopup*antialias.label: 다듬기", "GV*optiongvPopup*respectDSC.label: DSC를 유효", "GV*optiongvPopup*eof.label: EOF를 무시", "GV*optiongvPopup*autoResize.label: 가변 사ì´ì¦ˆ", "GV*optiongvPopup*swapLandscape.label: Landscape변환", "GV*optiongvPopup*scalesLabel.label: \\ ìŠ¤ì¼€ì¼ \\ ", "GV*miscmenuLabel.label: 기타 메뉴", "GV*magmenuLabel.label: 확대 메뉴 목ë¡", "GV*mediasLabel.label: 미디어 í¬ê¸°", "GV*confirmLabel.label: í™•ì¸ ì¢…ë£Œ", "GV*misc.label: 기타", "GV*scrolling.label: 스í¬ë¡¤ 반전", "GV*eyeGuide.label: 스í¬ë¡¤ ê°€ì´ë“œ", "GV*confirmPrint.label: ì¸ì‡„시 확ì¸", "GV*uncompressLabel.label: ì••ì¶• ì „ê°œ", "GV*autoCenter.label: ìžë™ì ìœ¼ë¡œ 중앙으로", "GV*printCommandLabel.label: ì¸ì‡„ 명령어", "GV*scratchDirLabel.label: 스í¬ë ˆì¹˜ 디렉토리", "GV*saveDirLabel.label: 디렉토리 저장", "GV*scalesLabel.label: 스케ì¼", "GV*scaleBaseLabel.label: 기본 스케ì¼", "GV*safer.label: 보다 안전하게", "GV*quiet.label: 종료", "GV*defaults.label: 시스템 표준값", "GV*scanLabel.label: PDF 검색", "GV*convLabel.label: PDF 변환", "GV*gsLabel.label: Postscriptì¸í„°ëŸ½íЏ", "GV*x11devLabel.label: 디바ì´ìФ", "GV*x11alphadevLabel.label: 디바ì´ìФ ì¡°ì •", "GV*argumentsLabel.label: ì¸ìˆ˜", "GV*filtersLabel.label: íŒŒì¼ ì„ íƒ í•„í„°", "GV*dirsLabel.label: íŒŒì¼ ì„ íƒ ë””ë ‰í† ë¦¬", "GV*filterLabel.label: 기본 í•„í„°", "GV*miscMenu.update.label: 파ì¼ê²½ì‹ ", "GV*miscMenu.redisplay.label: 화면 재조정", "GV*miscMenu.stop.label: ì¸í„°ëŸ½íЏ 중지", "GV*miscMenu.toggle_current.label: 현재페ì´ì§€ 마í¬/í•´ì œ", "GV*miscMenu.toggle_odd.label: 홀수페ì´ì§€ 마í¬/í•´ì œ", "GV*miscMenu.toggle_even.label: ì§ìˆ˜íŽ˜ì´ì§€ 마í¬/í•´ì œ", "GV*miscMenu.unmark.label: ëª¨ë‘ í‘œì‹œ 안함", "GV*miscMenu.print_all.label: ëª¨ë‘ ì¸ì‡„", "GV*miscMenu.print_marked.label: ë§ˆí¬ ë¶€ë¶„ ì¸ì‡„", "GV*miscMenu.save_all.label: ëª¨ë‘ ì €ìž¥", "GV*miscMenu.save_marked.label: 표시 저장", 0}; static String gv_nls_ja_JP_UTF_8_dat [] = { "GV*zoomPopup.title: GV - 拡大画é¢", "GV*infoPopup.title: GhostScriptメッセージ", "GV*dialogPopup.title: ダイアログ", "GV*notePopup.title: メッセージ", "GV*confirmPopup.title: 確èª", "GV*optionfsPopup.title: ãƒ•ã‚¡ã‚¤ãƒ«é¸æŠžã‚ªãƒ—ã‚·ãƒ§ãƒ³", "GV*optiongsPopup.title: Ghostscriptオプション", "GV*optiongvPopup.title: GVオプション", "GV*optionsetupPopup.title: セットアップオプション", "GV*fileSelPopup.title: ファイルを開ã", "GV*cancel.Label: キャンセル", "GV*dismiss.Label: é–‰ã˜ã‚‹", "GV*apply.label: é©ç”¨", "GV*copyright.Label: 著作権", "GV*quit.Label: 終了", "GV*fileButton.Label: ファイル", "GV*open.Label: é–‹ã ...", "GV*reopen.Label: å†ã‚ªãƒ¼ãƒ—ン", "GV*update.Label: æ›´æ–°", "GV*printAllPages.Label: 文章å°åˆ· ...", "GV*printMarkedPages.Label: マークã—ãŸãƒšãƒ¼ã‚¸ã®å°åˆ·...", "GV*saveAllPages.Label: 文章ä¿å­˜ ...", "GV*saveMarkedPages.Label: マークã—ãŸãƒšãƒ¼ã‚¸ã®ä¿å­˜...", "GV*stateButton.Label: 環境設定", "GV*stop.Label: 割り込ã¿åœæ­¢", "GV*dsc.Label: 文書構造ã«ã‚ˆã‚‹ã‚¹ãƒšã‚¯ãƒˆèª¿æ•´", "GV*eof.Label: EOFコメントを無視", "GV*antialias.Label: アンãƒã‚¨ã‚¤ãƒªã‚¢ã‚¹", "GV*watchFile.Label: 自動ファイル更新", "GV*showTitle.Label: タイトル表示", "GV*pixmap.Label: Backing Pixmap", "GV*size.Label: 自動サイズ変更", "GV*watch.Label: 自動ファイル更新", "GV*optionsgv.Label: GVオプション...", "GV*optionsfs.Label: ãƒ•ã‚¡ã‚¤ãƒ«é¸æŠžã‚ªãƒ—ã‚·ãƒ§ãƒ³...", "GV*optionsgs.Label: Ghostscriptオプション...", "GV*optionssetup.Label: セットアップオプション...", "GV*pageButton.Label: ページ", "GV*next.Label: 次ã¸", "GV*show.Label: å†è¡¨ç¤º", "GV*prev.Label: å‰ã¸", "GV*center.Label: 中央", "GV*pageButton*current.Label: ç¾åœ¨ã®ãƒšãƒ¼ã‚¸ã‚’マーク/解除", "GV*pageButton*even.Label: å¶æ•°ãƒšãƒ¼ã‚¸ã‚’マーク/解除", "GV*pageButton*odd.Label: 奇数ページをマーク/解除", "GV*pageButton*unmark.Label: 全マーク解除", "GV*processButton.Label: \\ 実行", "GV*mark.Label: マーク", "GV*prevPage.Label: <<", "GV*nextPage.Label: >>", "GV*unmark.Label: マーク解除", "GV*automatic.Label: 自動", "GV*portrait.Label: ãƒãƒ¼ãƒˆãƒ¬ãƒ¼ãƒˆ", "GV*landscape.Label: ランドスケープ", "GV*upsidedown.Label: 上下å転", "GV*seascape.Label: 逆ランドスケープ", "GV*swap.Label: ランドスケープ変æ›", "GV*toggleCurrent.label: ç¾åœ¨ã®ãƒšãƒ¼ã‚¸ãƒžãƒ¼ã‚¯/解除", "GV*toggleEven.label: å¶æ•°ãƒšãƒ¼ã‚¸ãƒžãƒ¼ã‚¯/解除", "GV*toggleOdd.label: 奇数ページマーク/解除", "GV*unmarkAll.label: 全マーク解除", "GV*printAll.label: å…¨å°åˆ·", "GV*printMarked.label: マーク部分å°åˆ·", "GV*saveAll.label: å…¨ä¿å­˜", "GV*saveMarked.label: マーク部分ä¿å­˜", "GV*openFile.label: é–‹ã", "GV*redisplay.label: å†è¡¨ç¤º", "GV*updateFile.label: ファイル更新", "GV*checkFile.label: ファイルãƒã‚§ãƒƒã‚¯", "GV*filters.label: フィルタ:", "GV*dirs.label: ディレクトリ", "GV*button1.label: キャンセル", "GV*button2.label: ファイルを開ã", "GV*rescan.label: ディレクトリå†èª­è¾¼", "GV*screenSizeLabel.label: ç”»é¢ã‚µã‚¤ã‚º[mm]", "GV*versionPopup*versionDone*label: é–‰ã˜ã‚‹", "GV*dialogPopup*cancel.label: キャンセル", "GV*notePopup*done.label: 了解", "GV*confirmPopup*cancel.label: キャンセル", "GV*confirmPopup*done.label: 終了", "GV*save.label: ä¿å­˜", "GV*optiongvPopup*mediaLabel.label: \\ 用紙サイズ \\ ", "GV*optiongvPopup*fmediaLabel.label: åˆ¤åˆ¥ä¸æ˜Žæ™‚ã®ç”¨ç´™ã‚µã‚¤ã‚º", "GV*optiongvPopup*orientLabel.label: \\ 用紙ã®å‘ã \\ ", "GV*optiongvPopup*forientLabel.label: åˆ¤åˆ¥ä¸æ˜Žæ™‚ã®ç”¨ç´™å‘ã", "GV*optiongvPopup*magLabel.label: 拡大縮å°", "GV*optiongvPopup*antialias.label: アンãƒã‚¨ã‚¤ãƒªã‚¢ã‚¹", "GV*optiongvPopup*respectDSC.label: DSCを有効", "GV*optiongvPopup*eof.label: EOFを無視", "GV*optiongvPopup*autoResize.label: å¯å¤‰ã‚µã‚¤ã‚º", "GV*optiongvPopup*swapLandscape.label: ランドスケープ変æ›", "GV*optiongvPopup*scalesLabel.label: \\ スケール \\ ", "GV*miscmenuLabel.label: ãã®ä»–メニューエントリ", "GV*magmenuLabel.label: 拡大メニューエントリ", "GV*mediasLabel.label: メディアã®å¤§ãã•", "GV*confirmLabel.label: 終了時ã®ç¢ºèª", "GV*misc.label: ãã®ä»–", "GV*scrolling.label: スクロールå転", "GV*eyeGuide.label: スクロールガイド", "GV*confirmPrint.label: å°åˆ·æ™‚ã®ç¢ºèª", "GV*uncompressLabel.label: 圧縮展開", "GV*autoCenter.label: 自動的ã«ä¸­å¤®ã¸", "GV*printCommandLabel.label: å°åˆ·ã‚³ãƒžãƒ³ãƒ‰", "GV*scratchDirLabel.label: スクラッãƒãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª", "GV*saveDirLabel.label: ä¿å­˜ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª", "GV*scalesLabel.label: スケール", "GV*scaleBaseLabel.label: スケールベース", "GV*safer.label: より安全ã«", "GV*quiet.label: 終了", "GV*defaults.label: システム標準値", "GV*scanLabel.label: PDF読ã¿è¾¼ã¿", "GV*convLabel.label: PDF変æ›", "GV*gsLabel.label: Postscriptエンジン", "GV*x11devLabel.label: デãƒã‚¤ã‚¹", "GV*x11alphadevLabel.label: アンãƒã‚¨ã‚¤ãƒªã‚¢ã‚¹ãƒ‡ãƒã‚¤ã‚¹", "GV*argumentsLabel.label: 引数", "GV*filtersLabel.label: ãƒ•ã‚¡ã‚¤ãƒ«é¸æŠžãƒ•ã‚£ãƒ«ã‚¿", "GV*dirsLabel.label: ãƒ•ã‚¡ã‚¤ãƒ«é¸æŠžãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª", "GV*filterLabel.label: 標準フィルタ", "GV*miscMenu.update.label: ファイル更新", "GV*miscMenu.redisplay.label: å†è¡¨ç¤º", "GV*miscMenu.stop.label: 割り込ã¿åœæ­¢", "GV*miscMenu.toggle_current.label: ç¾åœ¨ã®ãƒšãƒ¼ã‚¸ãƒžãƒ¼ã‚¯/解除", "GV*miscMenu.toggle_odd.label: 奇数ページマーク/解除", "GV*miscMenu.toggle_even.label: å¶æ•°ãƒšãƒ¼ã‚¸ãƒžãƒ¼ã‚¯/解除", "GV*miscMenu.unmark.label: 全マーク解除", "GV*miscMenu.print_all.label: å…¨å°åˆ·", "GV*miscMenu.print_marked.label: マーク部分å°åˆ·", "GV*miscMenu.save_all.label: å…¨ä¿å­˜", "GV*miscMenu.save_marked.label: マーク部分ä¿å­˜", 0}; static String gv_nls_it_UTF_8_dat [] = { "GV*copyright.Label: Copyright", "GV*miscmenuLabel.label: Altre voci del menu", "GV*optionsgv.Label: Opzioni di gv ...", "GV*mark.Label: Seleziona", "GV*dismiss.Label: Annulla", "GV*x11devLabel.label: Periferica", "GV*scratchDirLabel.label: Cartella base", "GV*quitstyle.always.Label: Sempre", "GV*misc.label: Varie", "GV*miscMenu.stop.label: Ferma interprete", "GV*strings.stillInProgress: Ancora in corso:", "GV*miscMenu.save_all.label: Salva tutto", "GV*center.Label: Centra", "GV*saveDirLabel.label: Salva cartella", "GV*printMarkedPages.Label: Stampa pagine selezionate ...", "GV*update.Label: Aggiorna", "GV*optionsgs.Label: Opzioni di Ghostscript ...", "GV*infoPopup.title: Messaggi di Ghostscript", "GV*safeDir.label: SafeDir", "GV*dirsLabel.label: Cartelle di selezione dei file", "GV*presentation.Label: Modalità presentazione", "GV*scanLabel.label: Scasiona PDF", "GV*optiongvPopup*magLabel.label: Scala", "GV*button2.label: Apri file", "GV*saveAllPages.Label: Salva documento ...", "GV*optionsetupPopup.title: Impostazioni", "GV*optiongvPopup*respectDSC.label: Rispetta DSC", "GV*miscMenu.save_marked.label: Salva selezionate", "GV*strings.putTexCommand: Inserisci un comando TeX nella posizione corrente", "GV*strings.execOfFailed: Esecuzione di %s fallita", "GV*scrolling.label: Scorrimento inverso", "GV*optiongvPopup*forientLabel.label: Orientamento sostitutivo", "GV*pageButton*unmark.Label: Deseleziona tutte", "GV*button1.label: Annulla", "GV*quitstyle.whenprocessing.Label: Durante l'analisi", "GV*filters.label: Filtri:", "GV*confirmLabel.label: Conferma uscita", "GV*title.filename.Label: Nome file", "GV*automatic.Label: Automatico", "GV*unmark.Label: Deseleziona", "GV*printMarked.label: Stampa selezionate", "GV*optiongvPopup*orientLabel.label: \\ Orientamento \\ ", "GV*optiongvPopup*fmediaLabel.label: Dimensione foglio ", "GV*confirmPopup*done.label: Esci", "GV*optiongvPopup*autoResize.label: Dimensione variabile", "GV*defaults.label: Predefiniti di sistema", "GV*uncompressLabel.label: Decomprimi", "GV*reopen.Label: Ricarica", "GV*miscMenu.unmark.label: Deseleziona tutto", "GV*safer.label: Safer", "GV*saveMarked.label: Salva selezionate", "GV*title.notitle.Label: Senza titolo", "GV*dsc.Label: Rispetta struttura del documento", "GV*optiongvPopup*swapLandscape.label: Passa a panorama", "GV*pixmap.Label: Backing Pixmap", "GV*miscMenu.update.label: Aggiorna file", "GV*strings.passwordPrompt: Password:", "GV*miscMenu.print_marked.label: Stampa selezionate", "GV*strings.openFile: Apri file", "GV*scalesLabel.label: Scale", "GV*savepos.Label: Salva posizione", "GV*pageButton.Label: Pagina", "GV*x11alphadevLabel.label: Periferica antialias", "GV*saveAll.label: Salva tutto", "GV*open.Label: Apri ...", "GV*miscMenu.toggle_current.label: Seleziona pagina corrente", "GV*fileButton.Label: File", "GV*miscMenu.toggle_odd.label: Seleziona pagine pari", "GV*miscMenu.toggle_even.label: Seleziona pagine dispari", "GV*printCommandLabel.label: Comando di stampa", "GV*antialias.Label: Antialias", "GV*updateFile.label: Aggiorna file", "GV*optiongsPopup.title: Opzioni Ghostscript", "GV*quiet.label: Silenzioso", "GV*confirmPopup.title: Conferma", "GV*mediasLabel.label: Dimensioni dei media", "GV*optionfsPopup.title: Opzioni di selezione del file", "GV*show.Label: Revisualizzare", "GV*optiongvPopup*mediaLabel.label: \\ Dimensione foglio \\ ", "GV*convLabel.label: Converti PDF", "GV*zoomPopup.title: Zoom", "GV*optiongvPopup.title: Opzioni di gv", "GV*stateButton.Label: Stato", "GV*strings.passwordRequired: Password richiesta", "GV*confirmPrint.label: Conferma stampa", "GV*pageButton*current.Label: Inverti la selezione corrente", "GV*optionssetup.Label: Impostazioni ...", "GV*ascaleLabel.Label: Scala arbitraria", "GV*next.Label: Successiva", "GV*filterLabel.label: Filtro predefinito", "GV*seascape.Label: Panorama inverso", "GV*cancel.Label: Annulla", "GV*watch.Label: Osserva file", "GV*titleLabel.Label: Mostra titolo", "GV*filtersLabel.label: Filtri di selezione file", "GV*checkFile.label: Analizza file", "GV*processButton.Label: \\ analisi in corso", "GV*toggleOdd.label:", "GV*strings.saveMarkedPages: Salva pagine selezionate", "GV*optiongvPopup*scalesLabel.label: \\ Scala \\ ", "GV*toggleCurrent.label:", "GV*stop.Label: Ferma interprete", "GV*dialogPopup*cancel.label: Annulla", "GV*fileSelPopup.title: Apri file", "GV*eyeGuide.label: Guida visuale di scorrimento", "GV*upsidedown.Label: Sottosopra", "GV*pageButton*even.Label: Inverti selezione pari", "GV*quit.Label: Esci", "GV*magmenuLabel.label: Voci del meni Mag", "GV*gs.errors.none.Label: Nessuno", "GV*nextPage.Label: >>", "GV*eof.Label: Ignora commenti EOF", "GV*rescan.label: Scansiona nuovamente cartella", "GV*miscMenu.print_all.label: Stampa", "GV*strings.copyrightTranslation: Marco Paolone ", "GV*landscape.Label: Panorama", "GV*printAllPages.Label: Stampa documento ...", "GV*gsLabel.label: Interprete", "GV*optiongvPopup*antialias.label: Antialias", "GV*strings.texCommand: Comando TeX", "GV*printAll.label: Stampa tutto", "GV*argumentsLabel.label: Argomenti", "GV*toggleEven.label:", "GV*infoVerboseLabel.Label: Messaggio di informazione", "GV*gs.errors.all.Label: Tutto", "GV*scaleBaseLabel.label: Scala di base", "GV*screenSizeLabel.label: Dimensione schermo (mm)", "GV*dialogPopup.title: Dialogo", "GV*unmarkAll.label:", "GV*strings.saveCurrentPage: Salva pagina corrente", "GV*strings.quitConfirm: Si desidera davvero uscire ?", "GV*autoCenter.label: Centra automaticamente", "GV*redisplay.label: Ricarica", "GV*size.Label: Ridimensionamento automatico", "GV*prevPage.Label: <<", "GV*prev.Label: Precedente", "GV*title.documenttitle.Label: Titolo documento", "GV*confirmPopup*cancel.label: Annulla", "GV*openFile.label: Apri", "GV*saveMarkedPages.Label: Salva pagine selezionate ...", "GV*strings.saveDocument: Salva documento", "GV*pageButton*odd.Label: Inverti selezione dispari", "GV*save.label: Salva", "GV*notePopup.title: Messaggio", "GV*optionsfs.Label: Opzioni di selezione file ...", "GV*swap.Label: Passa a panorama", "GV*portrait.Label: Ritratto", "GV*optiongvPopup*eof.label: Ignora EOF", "GV*strings.saveAsPDF: Salva come PDF", "GV*gs.errors.errors.Label: Errori", "GV*quitstyle.never.Label: Mai", "GV*apply.label: Applica", "GV*watchFile.Label: Osserva file", "GV*miscMenu.redisplay.label: Ricarica", "GV*dirs.label: Cartelle", "GV*notePopup*done.label: Ok", 0}; static String gv_nls_fr_UTF_8_dat [] = { "GV*copyright.Label: Copyright", "GV*miscmenuLabel.label: Menu d'entrée diverses", "GV*optionsgv.Label: Options de gv...", "GV*mark.Label: Sélectionner", "GV*dismiss.Label: Annuler", "GV*x11devLabel.label: Périphérique", "GV*scratchDirLabel.label: Répertoire tampon", "GV*quitstyle.always.Label: Toujours", "GV*misc.label: Divers", "GV*miscMenu.stop.label: Arrêter l'interpréteur", "GV*strings.stillInProgress: Encore en travail :", "GV*miscMenu.save_all.label: Sauvegarder tout", "GV*center.Label: Centrer", "GV*saveDirLabel.label: Répertoire de sauvegarde", "GV*printMarkedPages.Label: Imprimer pages marquées...", "GV*update.Label: Actualiser", "GV*optionsgs.Label: Options de Ghostscript...", "GV*infoPopup.title: Messages Ghostscript", "GV*safeDir.label: SafeDir", "GV*dirsLabel.label: Répertoire de sélections des fichiers", "GV*presentation.Label: Mode présentation", "GV*scanLabel.label: Analyse du PDF", "GV*optiongvPopup*magLabel.label: Échelle", "GV*button2.label: Ouvrir le fichier", "GV*saveAllPages.Label: Sauvegarder le document...", "GV*optionsetupPopup.title: Paramètres", "GV*optiongvPopup*respectDSC.label: Respecter les DSC", "GV*miscMenu.save_marked.label: Sauvegarder marquées", "GV*strings.putTexCommand: Insérer une commande TeX à la position actuelle", "GV*strings.execOfFailed: L'exécution de %s a échoué", "GV*scrolling.label: Défilement inversé", "GV*optiongvPopup*forientLabel.label: Orientation Fallback", "GV*pageButton*unmark.Label: Déselectionner tout", "GV*button1.label: Annuler", "GV*quitstyle.whenprocessing.Label: Lorsqu'en calcul", "GV*filters.label: Filtres :", "GV*confirmLabel.label: Confirmer la fermeture", "GV*title.filename.Label: Nom du fichier", "GV*automatic.Label: Automatique", "GV*unmark.Label: Déselectionner", "GV*printMarked.label: Imprimer marquées", "GV*optiongvPopup*orientLabel.label: \\ Orientation \\ ", "GV*optiongvPopup*fmediaLabel.label: Format papier Fallback", "GV*confirmPopup*done.label: Quitter", "GV*optiongvPopup*autoResize.label: Taille variable", "GV*defaults.label: Paramètres par défaut", "GV*uncompressLabel.label: Décompresser", "GV*reopen.Label: Recharger", "GV*miscMenu.unmark.label: Déselectionner tout", "GV*safer.label: Safer", "GV*saveMarked.label: Sauvegarder marquées", "GV*title.notitle.Label: Pas de titre", "GV*dsc.Label: Respecter la structure du document", "GV*optiongvPopup*swapLandscape.label: Passer en paysage", "GV*pixmap.Label: Sous-couche de pixels", "GV*miscMenu.update.label: Actualiser le fichier", "GV*strings.passwordPrompt: Mot de passe:", "GV*miscMenu.print_marked.label: Imprimer marquées", "GV*strings.openFile: Ouvrir un fichier", "GV*scalesLabel.label: Échelles", "GV*savepos.Label: Sauvegarde de la position", "GV*pageButton.Label: Page", "GV*x11alphadevLabel.label: Périphérique antialias", "GV*saveAll.label: Sauvegarder tout", "GV*open.Label: Ouvrir...", "GV*miscMenu.toggle_current.label: Marquer page courrante", "GV*fileButton.Label: Fichier", "GV*miscMenu.toggle_odd.label: Marquer impaires", "GV*miscMenu.toggle_even.label: Marquer paires", "GV*printCommandLabel.label: Commande d'affichage", "GV*antialias.Label: Antialias", "GV*updateFile.label: Actualiser le fichier", "GV*optiongsPopup.title: Options Ghostscript", "GV*quiet.label: Muet", "GV*confirmPopup.title: Confirmer", "GV*mediasLabel.label: Taille des media", "GV*optionfsPopup.title: Option de sélection de fichier", "GV*show.Label: Reafficher", "GV*optiongvPopup*mediaLabel.label: \\ Taille du papier \\ ", "GV*convLabel.label: Convertion du PDF", "GV*zoomPopup.title: Zoom", "GV*optiongvPopup.title: Options de gv", "GV*stateButton.Label: État", "GV*strings.passwordRequired: Mot de passe requis", "GV*confirmPrint.label: Confirmer l'impression", "GV*pageButton*current.Label: Inverser marquage courrant", "GV*optionssetup.Label: Paramètres...", "GV*ascaleLabel.Label: Taille arbitraire", "GV*next.Label: Suivant", "GV*filterLabel.label: Filtre par défaut", "GV*seascape.Label: Paysage renversé", "GV*cancel.Label: Annuler", "GV*watch.Label: Voir le fichier", "GV*titleLabel.Label: Montrer le titre", "GV*filtersLabel.label: Filtres de sélection de fichiers", "GV*checkFile.label: Vérifier le fichier", "GV*processButton.Label: \\ calcul", "GV*toggleOdd.label:", "GV*strings.saveMarkedPages: Sauvegarder pages marquées", "GV*optiongvPopup*scalesLabel.label: \\ Échelle \\ ", "GV*toggleCurrent.label:", "GV*stop.Label: Arrêter l'interprêteur", "GV*dialogPopup*cancel.label: Annuler", "GV*fileSelPopup.title: Ouvrir un fichier", "GV*eyeGuide.label: Guide de défilement visuel", "GV*upsidedown.Label: Portrait renversé", "GV*pageButton*even.Label: Inverser marquage paire", "GV*quit.Label: Quitter", "GV*magmenuLabel.label: Menu d'entrée Mag", "GV*gs.errors.none.Label: Aucun", "GV*nextPage.Label: >>", "GV*eof.Label: Ignorer les commentaires de fin de fichier", "GV*rescan.label: Actualiser le répertoire", "GV*miscMenu.print_all.label: Imprimer tout", "GV*strings.copyrightTranslation: Quentin Gibeaux ", "GV*landscape.Label: Paysage", "GV*printAllPages.Label: Impression ...", "GV*gsLabel.label: Interpréteur", "GV*optiongvPopup*antialias.label: Antialias", "GV*strings.texCommand: Commande TeX", "GV*printAll.label: Imprimer tout ", "GV*argumentsLabel.label: Arguments", "GV*toggleEven.label: ", "GV*infoVerboseLabel.Label: Message d'information", "GV*gs.errors.all.Label: Tout", "GV*scaleBaseLabel.label: Échelle de base", "GV*screenSizeLabel.label: Taille de l'écran (mm)", "GV*dialogPopup.title: Fenêtre de dialoge", "GV*unmarkAll.label:", "GV*strings.saveCurrentPage: Sauvegarder la page courrante", "GV*strings.quitConfirm: Voulez-vous réellement quitter ?", "GV*autoCenter.label: Centrer automatiquement", "GV*redisplay.label: Recharger", "GV*size.Label: Mise à l'échelle automatique", "GV*prevPage.Label: <<", "GV*prev.Label: Précédent", "GV*title.documenttitle.Label: Titre du document", "GV*confirmPopup*cancel.label: Annuler", "GV*openFile.label: Ouvrir", "GV*saveMarkedPages.Label: Sauvegarder pages marquées...", "GV*strings.saveDocument: Sauvegarder le document", "GV*pageButton*odd.Label: Inverser marquage impaire", "GV*save.label: Sauvegarder", "GV*notePopup.title: Message", "GV*optionsfs.Label: Options de sélection de fichier...", "GV*swap.Label: Passer en paysage", "GV*portrait.Label: Portrait", "GV*optiongvPopup*eof.label: Ignorer le marqueur EOF", "GV*strings.saveAsPDF: Sauvegarder en PDF", "GV*gs.errors.errors.Label: Erreurs", "GV*quitstyle.never.Label: Jamais", "GV*apply.label: Appliquer", "GV*watchFile.Label: Voir le fichier", "GV*miscMenu.redisplay.label: Recharger", "GV*dirs.label: Réportoires", "GV*notePopup*done.label: Ok", 0}; static String gv_nls_de_UTF_8_dat [] = { "GV*miscmenuLabel.label: Extras: Menüeinträge", "GV*x11devLabel.label: Gerät", "GV*scratchDirLabel.label: Scratch Directory", "GV*misc.label: Extras", "GV*miscMenu.stop.label: Interpreter beenden", "GV*miscMenu.save_all.label: Alles speichern", "GV*saveDirLabel.label: Ordner zum Speichern", "GV*infoPopup.title: Ghostscript-Meldungen", "GV*dirsLabel.label: Dateiauswahlordner", "GV*scanLabel.label: Scan PDF", "GV*optiongvPopup*magLabel.label: Größe", "GV*button2.label: Datei öffnen", "GV*optionsetupPopup.title: Allg. Einstellungen", "GV*optiongvPopup*respectDSC.label: DSC beachten", "GV*miscMenu.save_marked.label: Markiertes speichern", "GV*scrolling.label: Umgekehrtes Scrollen", "GV*optiongvPopup*forientLabel.label: Rückfall-Orientatierung", "GV*button1.label: Abbrechen", "GV*filters.label: Filter:", "GV*confirmLabel.label: Beenden bestätigen", "GV*printMarked.label: Markiertes drucken", "GV*optiongvPopup*orientLabel.label: \\ Orientatierung \\ ", "GV*optiongvPopup*fmediaLabel.label: Rückfall-Papiergröße", "GV*confirmPopup*done.label: Beenden", "GV*optiongvPopup*autoResize.label: Variable Größe", "GV*defaults.label: Standardeinstellungen", "GV*uncompressLabel.label: Dekomprimieren", "GV*miscMenu.unmark.label: Demarkieren", "GV*safer.label: Safer", "GV*saveMarked.label: Markiertes speichern", "GV*optiongvPopup*swapLandscape.label: Swap Qürformat", "GV*miscMenu.update.label: Datei neu laden", "GV*miscMenu.print_marked.label: Markiertes drucken", "GV*scalesLabel.label: Vergrößerung", "GV*x11alphadevLabel.label: Antialias", "GV*saveAll.label: Alles speichern", "GV*miscMenu.toggle_current.label: Aktülle umschaltewn", "GV*miscMenu.toggle_odd.label: Gerade umschalten", "GV*miscMenu.toggle_even.label: Ungerade umschalten", "GV*printCommandLabel.label: Druckkommando", "GV*updateFile.label: Neu laden", "GV*optiongsPopup.title: Ghostscript Einstellungen", "GV*quiet.label: Quiet", "GV*confirmPopup.title: Bestätigen", "GV*mediasLabel.label: Mediengrößen", "GV*optionfsPopup.title: Dateiauswahloptionen", "GV*optiongvPopup*mediaLabel.label: \\ Papiergröße \\ ", "GV*convLabel.label: Konvertiere PDF", "GV*zoomPopup.title: Lupe", "GV*optiongvPopup.title: gv Einstellungen", "GV*confirmPrint.label: Drucken bestätigen", "GV*filterLabel.label: Standard-Filter", "GV*filtersLabel.label: Dateiauswahlfilters", "GV*checkFile.label: Datei beobachten", "GV*toggleOdd.label:", "GV*optiongvPopup*scalesLabel.label: \\ Vergrösßrungen \\ ", "GV*toggleCurrent.label:", "GV*dialogPopup*cancel.label: Abbrechen", "GV*fileSelPopup.title: Datei öffnen", "GV*eyeGuide.label: ?Scrolling Eye Guide?", "GV*magmenuLabel.label: Mag Menu Entries", "GV*rescan.label: Ordner neu einlesen", "GV*miscMenu.print_all.label: Alles drucken", "GV*gsLabel.label: Interpreter", "GV*optiongvPopup*antialias.label: Antialias", "GV*printAll.label: Alles drucken ", "GV*argumentsLabel.label: Argumente", "GV*toggleEven.label:", "GV*scaleBaseLabel.label: Vergrößerungsbasis", "GV*screenSizeLabel.label: Bildschiemgröße (mm)", "GV*dialogPopup.title: Dialog", "GV*unmarkAll.label:", "GV*autoCenter.label: Automatisch zentrieren", "GV*redisplay.label: Neu laden", "GV*confirmPopup*cancel.label: Abbrechen", "GV*openFile.label: Öffnen", "GV*save.label: Speichern", "GV*notePopup.title: Nachricht", "GV*optiongvPopup*eof.label: EOF ignorieren", "GV*apply.label: Anwenden", "GV*miscMenu.redisplay.label: Neu laden", "GV*dirs.label: Ordner", "GV*notePopup*done.label: OK", "GV*copyright.Label: Copyright", "GV*optionsgv.Label: gv Einstellungen ...", "GV*mark.Label: Markieren", "GV*dismiss.Label: Abbrechen", "GV*center.Label: Zentrieren", "GV*printMarkedPages.Label: Drucke markierte ...", "GV*update.Label: Neu laden", "GV*optionsgs.Label: Ghostscript Einstellungen ...", "GV*presentation.Label: Presentationsmodus", "GV*saveAllPages.Label: Speichere Dokument ...", "GV*pageButton*unmark.Label: Alle demarkieren", "GV*automatic.Label: Automatik", "GV*unmark.Label: Demarkieren", "GV*reopen.Label: Neu laden", "GV*dsc.Label: Beachte Documentstruktur", "GV*pixmap.Label: ?Backing Pixmap?", "GV*savepos.Label: Savepos", "GV*pageButton.Label: Seite", "GV*open.Label: Öffnen...", "GV*fileButton.Label: Datei", "GV*antialias.Label: Antialias", "GV*show.Label: Neu anzeigen", "GV*stateButton.Label: Status", "GV*pageButton*current.Label: Aktülle Markierung wechselnn", "GV*optionssetup.Label: Allg. Einstellungen ...", "GV*ascaleLabel.Label: Beliebige Vergrößerung", "GV*next.Label: Nächste", "GV*seascape.Label: Alt. Qürformat", "GV*cancel.Label: Abbrechen", "GV*watch.Label: Datei beobachten", "GV*titleLabel.Label: Titel anzeigen", "GV*processButton.Label: \\ processing", "GV*stop.Label: Interpreter beenden", "GV*upsidedown.Label: Umgedreht", "GV*pageButton*even.Label: Gerade Markierungen wechseln", "GV*quit.Label: Beenden", "GV*nextPage.Label: >>", "GV*eof.Label: EOF Kommenatre ignorieren", "GV*landscape.Label: Qürformat", "GV*printAllPages.Label: Dokument drucken ...", "GV*infoVerboseLabel.Label: Info.Popup", "GV*size.Label: Automatische Größe", "GV*prevPage.Label: <<", "GV*prev.Label: Vorherige", "GV*saveMarkedPages.Label: Markierte Seiten speichern ...", "GV*pageButton*odd.Label: Ungerade Markierungen wechseln", "GV*optionsfs.Label: Dateiauswahloptionen ...", "GV*swap.Label: Qürformat umschalten", "GV*portrait.Label: Hochformat", "GV*watchFile.Label: Datei beobachten", "GV*gs.errors.none.Label: Keine", "GV*gs.errors.all.Label: Alle", "GV*gs.errors.errors.Label: Fehler", "GV.scales: Natürliche Größe, 1.000, screen \\n\ Pixelbasiert, 1.000, pixel \\n\ Beliebige Vergrößerung, -2 \\n\ Höhe anpassen, -3 \\n\ Breite anpassen, -1 \\n\ Beides anpassen, 0.000 \\n\ 0.100, 0.100 \\n\ 0.125, 0.125 \\n\ 0.250, 0.250 \\n\ 0.500, 0.500 \\n\ 0.707, 0.707 \\n\ 1.000, 1.000 \\n\ 1.414, 1.414 \\n\ 2.000, 2.000 \\n\ 4.000, 4.000 \\n\ 8.000, 8.000 \\n\ 10.00, 10.00", "GV*quitstyle.never.Label: Niemals", "GV*quitstyle.always.Label: Immer", "GV*quitstyle.whenprocessing.Label: Bei Verarbeitung", "GV*title.filename.Label: Dateiname", "GV*title.notitle.Label: Kein Titel", "GV*title.documenttitle.Label: Dokumenttitel", "GV*strings.saveMarkedPages: Markiere Seiten speichern", "GV*strings.saveCurrentPage: Aktülle Seite speichern", "GV*strings.saveDocument: Dokument speichern", "GV*strings.saveAsPDF: Als PDF speichern", "GV*strings.openFile: Datei öffnen", "GV*strings.passwordPrompt: Passwort:", "GV*strings.passwordRequired: Passwort erforderlich", "GV*strings.quitConfirm: Wollen Sie wirklich GNU gv beenden?", "GV*strings.putTexCommand: Schreibe eine TeX-Anweisung an die aktülle Position", "GV*strings.texCommand: TeX -Anweisung", "GV*strings.stillInProgress: Noch in Bearbeitung:", "GV*strings.execOfFailed: Ausführung von %s fehlgeschlagen", "GV*strings.copyrightTranslation: Markus Steinborn ", 0}; static String gv_nls_nl_UTF_8_dat [] = { "GV*copyright.Label: Copyright", "GV*miscmenuLabel.label: Overige Menu Items", "GV*optionsgv.Label: gv Opties ...", "GV*mark.Label: Markeer", "GV*dismiss.Label: Annuleer", "GV*x11devLabel.label: Apparaat", "GV*scratchDirLabel.label: Klad Directory", "GV*quitstyle.always.Label: Altijd", "GV*misc.label: Overig", "GV*miscMenu.stop.label: Stop Interpreter", "GV*strings.stillInProgress: Proces momenteel lopende:", "GV*miscMenu.save_all.label: Save All", "GV*center.Label: Center", "GV*saveDirLabel.label: Save Directory", "GV*printMarkedPages.Label: Print Gemarkeerde Pagina's ...", "GV*update.Label: Update", "GV*optionsgs.Label: Ghostscript Opties ...", "GV*infoPopup.title: Ghostscript Berichten", "GV*safeDir.label: VeiligeDir", "GV*dirsLabel.label: Standaard Directories", "GV*presentation.Label: Presentatie Modus", "GV*scanLabel.label: Scan PDF", "GV*optiongvPopup*magLabel.label: Schaal", "GV*button2.label: Open Bestand", "GV*saveAllPages.Label: Save Document ...", "GV*optionsetupPopup.title: Setup Opties", "GV*optiongvPopup*respectDSC.label: Respecteer DSC", "GV*miscMenu.save_marked.label: Save Gemarked", "GV*strings.putTexCommand: Voeg TeX commando toe aan huidige positie.", "GV*strings.execOfFailed: Uitvoer van %s Mislukt", "GV*scrolling.label: Tegengesteld Scrollen", "GV*optiongvPopup*forientLabel.label: Standaard Orientatie", "GV*pageButton*unmark.Label: Demarkeer Alles", "GV*button1.label: Annuleer", "GV*quitstyle.whenprocessing.Label: Tijdens Verwerking", "GV*filters.label: Filters:", "GV*confirmLabel.label: Bevestig Annulering", "GV*title.filename.Label: Bestandsnaam", "GV*automatic.Label: Automatisch", "GV*unmark.Label: Demarkeer", "GV*printMarked.label: Print Gemarked", "GV*optiongvPopup*orientLabel.label: \\ Orientatie \\ ", "GV*optiongvPopup*fmediaLabel.label: Standaard Papier Afmeting", "GV*confirmPopup*done.label: Annuleer", "GV*optiongvPopup*autoResize.label: Variabele Afmeting", "GV*defaults.label: Systeeminstellingen", "GV*uncompressLabel.label: Uitpakken", "GV*reopen.Label: Herladen", "GV*miscMenu.unmark.label: Demarkeer Alles", "GV*safer.label: Veiliger", "GV*saveMarked.label: Save Gemarkeerd", "GV*title.notitle.Label: Geen Titel", "GV*dsc.Label: Respecteer Document Structuur", "GV*optiongvPopup*swapLandscape.label: Verwissel Landschap", "GV*pixmap.Label: Backing Pixmap", "GV*miscMenu.update.label: Update Bestand", "GV*strings.passwordPrompt: Wachtwoord:", "GV*miscMenu.print_marked.label: Print Gemarkeerd", "GV*strings.openFile: Open Bestand", "GV*scalesLabel.label: Schaalverdelingen", "GV*savepos.Label: Savepositie", "GV*pageButton.Label: Pagina", "GV*x11alphadevLabel.label: Anti-alias Apparaat", "GV*saveAll.label: Save Alles", "GV*open.Label: Open ...", "GV*miscMenu.toggle_current.label: Toggle Huidig", "GV*fileButton.Label: Bestand", "GV*miscMenu.toggle_odd.label: Toggle Oneven", "GV*miscMenu.toggle_even.label: Toggle Even", "GV*printCommandLabel.label: Print Commando", "GV*antialias.Label: Anti-alias", "GV*updateFile.label: Update Bestand", "GV*optiongsPopup.title: Ghostscript Opties", "GV*quiet.label: Stil", "GV*confirmPopup.title: Bevestig", "GV*mediasLabel.label: Media Afmetingen", "GV*optionfsPopup.title: Bestand Selectie Opties", "GV*show.Label: Herlaad", "GV*optiongvPopup*mediaLabel.label: \\ Papier Afmeting \\ ", "GV*convLabel.label: Converteer PDF", "GV*zoomPopup.title: Zoem", "GV*optiongvPopup.title: gv Opties", "GV*stateButton.Label: Status", "GV*strings.passwordRequired: Wachtwoord Vereist", "GV*confirmPrint.label: Bevesting Afdrukken", "GV*pageButton*current.Label: Toggle huidige markering", "GV*optionssetup.Label: Configuratie Opties ...", "GV*ascaleLabel.Label: Arbitraire Schaal", "GV*next.Label: Volgende", "GV*filterLabel.label: Standaard Filter", "GV*seascape.Label: Zeegezicht", "GV*cancel.Label: Annuleer", "GV*watch.Label: Bestand Monitoren", "GV*titleLabel.Label: Beeld Titel Af", "GV*filtersLabel.label: Bestand Selectie Filters", "GV*checkFile.label: Controleer Bestand", "GV*processButton.Label: \\ verwerken", "GV*toggleOdd.label:", "GV*strings.saveMarkedPages: Save Gemarkeerde Pagina's", "GV*optiongvPopup*scalesLabel.label: \\ Schaal \\ ", "GV*toggleCurrent.label:", "GV*stop.Label: Stop Interpreter", "GV*dialogPopup*cancel.label: Annuleer", "GV*fileSelPopup.title: Open Bestand", "GV*eyeGuide.label: Scroll Gids", "GV*upsidedown.Label: Ondersteboven", "GV*pageButton*even.Label: Toggle Even Markeringen", "GV*quit.Label: Afsluiten", "GV*magmenuLabel.label: Mag Menu Items", "GV*gs.errors.none.Label: Geen", "GV*nextPage.Label: >>", "GV*eof.Label: Negeer EOF commentaar", "GV*rescan.label: Herlaad Directory", "GV*miscMenu.print_all.label: Print Alles", "GV*strings.copyrightTranslation: Gajus Dirkzwager ", "GV*landscape.Label: Landschap", "GV*printAllPages.Label: Print Document ...", "GV*gsLabel.label: Interpreter", "GV*optiongvPopup*antialias.label: Anti-alias", "GV*strings.texCommand: TeX commando", "GV*printAll.label: Print Alles ", "GV*argumentsLabel.label: Argumenten", "GV*toggleEven.label:", "GV*infoVerboseLabel.Label: info Popup", "GV*gs.errors.all.Label: Alles", "GV*scaleBaseLabel.label: Schaal Methode", "GV*screenSizeLabel.label: Scherm Afmeting (mm)", "GV*dialogPopup.title: Dialoog", "GV*unmarkAll.label:", "GV*strings.saveCurrentPage: Save Huidige Pagina", "GV*strings.quitConfirm: Weet u zeker dat u het programma wilt afsluiten?", "GV*autoCenter.label: Auto Centreer", "GV*redisplay.label: Herladen", "GV*size.Label: Automatisch Herschalen", "GV*prevPage.Label: <<", "GV*prev.Label: Vorige", "GV*title.documenttitle.Label: Document Titel", "GV*confirmPopup*cancel.label: Annuleren", "GV*openFile.label: Openen", "GV*saveMarkedPages.Label: Save Gemarkeerde Pagina's ...", "GV*strings.saveDocument: Save Document", "GV*pageButton*odd.Label: Toggle Oneven Markeringen", "GV*save.label: Save", "GV*notePopup.title: Bericht", "GV*optionsfs.Label: Bestand Selectie Opties ...", "GV*swap.Label: Verwissel Landschap", "GV*portrait.Label: Portret", "GV*optiongvPopup*eof.label: Negeer EOF", "GV*strings.saveAsPDF: Save als PDF", "GV*gs.errors.errors.Label: Foutmeldingen", "GV*quitstyle.never.Label: Nooit", "GV*apply.label: Toepassen", "GV*watchFile.Label: Bestand Volgen", "GV*miscMenu.redisplay.label: Herladen", "GV*dirs.label: Directories", "GV*notePopup*done.label: Ok", 0}; static String gv_nls_es_utf8_dat [] = { "GV*copyright.Label: Copyright", "GV*miscmenuLabel.label: Entradas de menú variadas", "GV*optionsgv.Label: Opciones de gv ...", "GV*mark.Label: Marcar", "GV*dismiss.Label: Descartar", "GV*x11devLabel.label: Device", "GV*scratchDirLabel.label: Directorio de inicio", "GV*quitstyle.always.Label: Siempre", "GV*misc.label: Varios", "GV*miscMenu.stop.label: Parar intérprete", "GV*strings.stillInProgress: Todavía en curso:", "GV*miscMenu.save_all.label: Guardar todo", "GV*center.Label: Centrar", "GV*saveDirLabel.label: Guardar directorio", "GV*printMarkedPages.Label: Imprimir páginas marcadas ...", "GV*update.Label: Actualizar", "GV*optionsgs.Label: Opciones de Ghostscript ...", "GV*infoPopup.title: Mensajes de Ghostscript", "GV*safeDir.label: SafeDir", "GV*dirsLabel.label: Directorios de selección de archivos", "GV*presentation.Label: Modo de presentación", "GV*scanLabel.label: Buscar en el PDF", "GV*optiongvPopup*magLabel.label: Escala", "GV*button2.label: Abrir archivo", "GV*saveAllPages.Label: Guardar documento ...", "GV*optionsetupPopup.title: Opciones de configuración", "GV*optiongvPopup*respectDSC.label: Respetar DSC", "GV*miscMenu.save_marked.label: Guardar marcadas", "GV*strings.putTexCommand: Insertar comando de TeX en la posición actual", "GV*strings.execOfFailed: Ejecución de %s falló", "GV*scrolling.label: Desplazamiento inverso", "GV*optiongvPopup*forientLabel.label: Orientación alternativa", "GV*pageButton*unmark.Label: Desmarcar todas", "GV*button1.label: Cancelar", "GV*quitstyle.whenprocessing.Label: Mientras procesa", "GV*filters.label: Filtros:", "GV*confirmLabel.label: Confirme finalizar", "GV*title.filename.Label: Nombre de archivo", "GV*automatic.Label: Automático", "GV*unmark.Label: Desmarcar", "GV*printMarked.label: Imprimir marcadas", "GV*optiongvPopup*orientLabel.label: \\ Orientación \\ ", "GV*optiongvPopup*fmediaLabel.label: Tamaño de papel alternativo", "GV*confirmPopup*done.label: Finalizar", "GV*optiongvPopup*autoResize.label: Tamaño variable", "GV*defaults.label: Predeterminados del sistema", "GV*uncompressLabel.label: Descomprimir", "GV*reopen.Label: Recargar", "GV*miscMenu.unmark.label: Desmarcar todo", "GV*safer.label: Safer", "GV*saveMarked.label: Guardar marcadas", "GV*title.notitle.Label: Sin título", "GV*dsc.Label: Respetar la estructura del documento", "GV*optiongvPopup*swapLandscape.label: Cambiar apaisado", "GV*pixmap.Label: Backing Pixmap", "GV*miscMenu.update.label: Actualizar archivo", "GV*strings.passwordPrompt: Contraseña:", "GV*miscMenu.print_marked.label: Imprimir marcadas", "GV*strings.openFile: Abrir archivo", "GV*scalesLabel.label: Escalas", "GV*savepos.Label: Guardar posición", "GV*pageButton.Label: Página", "GV*x11alphadevLabel.label: Dispositivo de suavizado", "GV*saveAll.label: Guardar todo", "GV*open.Label: Abrir ...", "GV*miscMenu.toggle_current.label: Marcar actual", "GV*fileButton.Label: Archivo", "GV*miscMenu.toggle_odd.label: Marcar impares", "GV*miscMenu.toggle_even.label: Marcar pares", "GV*printCommandLabel.label: Print Command", "GV*antialias.Label: Suavizado de bordes", "GV*updateFile.label: Actualizar archivo", "GV*optiongsPopup.title: Opciones de Ghostscript", "GV*quiet.label: Discreto", "GV*confirmPopup.title: Confirmar", "GV*mediasLabel.label: Tamaño del medio", "GV*optionfsPopup.title: Opciones de selección de archivos", "GV*show.Label: Refrescar imagen", "GV*optiongvPopup*mediaLabel.label: \\ Tamaño del papel \\ ", "GV*convLabel.label: Convert PDF", "GV*zoomPopup.title: Zoom", "GV*optiongvPopup.title: Opciones de gv", "GV*stateButton.Label: Estado", "GV*strings.passwordRequired: Se requiere contraseña", "GV*confirmPrint.label: Confirme imprimir", "GV*pageButton*current.Label: Marcar página actual", "GV*optionssetup.Label: Opciones de configuración ...", "GV*ascaleLabel.Label: Escala arbitraria", "GV*next.Label: Siguiente", "GV*filterLabel.label: Filtro por defecto", "GV*seascape.Label: Apaisado antihorario", "GV*cancel.Label: Cancelar", "GV*watch.Label: Ver archivo", "GV*titleLabel.Label: Mostrar título", "GV*filtersLabel.label: Filtros de selección de archivos", "GV*checkFile.label: Comprobar archivo", "GV*processButton.Label: \\ procesando", "GV*toggleOdd.label:", "GV*strings.saveMarkedPages: Guardar páginas marcadas", "GV*optiongvPopup*scalesLabel.label: \\ Escala \\ ", "GV*toggleCurrent.label:", "GV*stop.Label: Parar intérprete", "GV*dialogPopup*cancel.label: Cancelar", "GV*fileSelPopup.title: Abrir archivo", "GV*eyeGuide.label: Scrolling Eye Guide", "GV*upsidedown.Label: Invertido", "GV*pageButton*even.Label: Marcar páginas pares", "GV*quit.Label: Finalizar", "GV*magmenuLabel.label: Mag Menu Entries", "GV*gs.errors.none.Label: Ninguno", "GV*nextPage.Label: >>", "GV*eof.Label: Ignorar comentarios de fin de fichero", "GV*rescan.label: Volver a buscar en directorio", "GV*miscMenu.print_all.label: Imprimir todo", "GV*strings.copyrightTranslation: César Gil ", "GV*landscape.Label: Apaisado", "GV*printAllPages.Label: Imprimir documento ...", "GV*gsLabel.label: Interpreter", "GV*optiongvPopup*antialias.label: Suavizado de bordes", "GV*strings.texCommand: Comando de TeX", "GV*printAll.label: Imprimir todo", "GV*argumentsLabel.label: Argumentos", "GV*toggleEven.label:", "GV*infoVerboseLabel.Label: info Popup", "GV*gs.errors.all.Label: Todo", "GV*scaleBaseLabel.label: Base de la escala", "GV*screenSizeLabel.label: Tamaño de pantalla (mm)", "GV*dialogPopup.title: Diálogo", "GV*unmarkAll.label:", "GV*strings.saveCurrentPage: Guardar página actual", "GV*strings.quitConfirm: ¿Realmente quiere finalizar?", "GV*autoCenter.label: Centrado automático", "GV*redisplay.label: Recargar", "GV*size.Label: Redimensionado variable", "GV*prevPage.Label: <<", "GV*prev.Label: Anterior", "GV*title.documenttitle.Label: Título del documento", "GV*confirmPopup*cancel.label: Cancelar", "GV*openFile.label: Abrir", "GV*saveMarkedPages.Label: Guardar páginas marcadas ...", "GV*strings.saveDocument: Guardar documento", "GV*pageButton*odd.Label: Marcar páginas impares", "GV*save.label: Guardar", "GV*notePopup.title: Mensaje", "GV*optionsfs.Label: Opciones de selección de archivos ...", "GV*swap.Label: Cambiar apaisado", "GV*portrait.Label: Vertical", "GV*optiongvPopup*eof.label: Ignorar fin de fichero", "GV*strings.saveAsPDF: Guardar como PDF", "GV*gs.errors.errors.Label: Errores", "GV*quitstyle.never.Label: Nunca", "GV*apply.label: Aplicar", "GV*watchFile.Label: Ver archivo", "GV*miscMenu.redisplay.label: Recargar", "GV*dirs.label: Directories", "GV*notePopup*done.label: ¡Hecho!", 0}; static String* getI18N(char* locale) { if (!strcmp(locale, "noint:de")) return gv_nls_noint_de_dat; if (!strcmp(locale, "ko_KR.UTF-8")) return gv_nls_ko_KR_UTF_8_dat; if (!strcmp(locale, "ja_JP.UTF-8")) return gv_nls_ja_JP_UTF_8_dat; if (!strcmp(locale, "it.UTF-8")) return gv_nls_it_UTF_8_dat; if (!strcmp(locale, "fr.UTF-8")) return gv_nls_fr_UTF_8_dat; if (!strcmp(locale, "de.UTF-8")) return gv_nls_de_UTF_8_dat; if (!strcmp(locale, "nl.UTF-8")) return gv_nls_nl_UTF_8_dat; if (!strcmp(locale, "es.utf8")) return gv_nls_es_utf8_dat; if (!strcmp(locale, "es.UTF-8")) return gv_nls_es_utf8_dat; return 0; } gv-3.7.4/src/gv_misc_res.dat0000664000076400007640000005656411736064614012705 00000000000000 !########## gv_misc_res.dat !##### General GV*highlightThickness: 1 GV*ShapeStyle: Rectangle GV*beNiceToColormap: False GV*input: True GV*initialResourcesPersistent: False !##### Version (do not modify this resource) GV.version: gv 3.6.7.90 !##### Background, Foreground GV*background: gray71 GV*foreground: black GV*Text*background: #D3B5B5 GV*SimpleMenu*background: AntiqueWhite3 GV*locator*background: gray65 GV*panner*foreground: gray78 GV*Label.background: AntiqueWhite3 GV*fileSel*Frame*background: gray78 GV*fileSel*Frame*Text*background: #D3B5B5 GV*optiongvPopup*Toggle*foreground: gray65 GV*optiongsPopup*Toggle*foreground: gray65 GV*optionsetupPopup*Toggle*foreground: gray65 GV*infoPopup*Scrollbar.background: gray71 GV*notePopup*message.background: #D3B5B5 GV*confirmPopup*message3.background: #D3B5B5 GV*confirmPopup*message1.background: gray71 GV*Button.background: AntiqueWhite3 GV*Button.highlightedBackground: AntiqueWhite2 GV*Button.setBackground: AntiqueWhite4 GV*Switch.background: AntiqueWhite3 GV*Switch.highlightedBackground: AntiqueWhite4 GV*Switch.setBackground: AntiqueWhite2 GV.?.Button.highlightedBackground: AntiqueWhite2 GV.?.Button.background: AntiqueWhite3 GV.?.Button.setBackground: AntiqueWhite4 GV*MButton*setBackground: AntiqueWhite2 GV*MButton*background: AntiqueWhite3 GV*Scrollbar.background: gray78 GV*Scrollbar.pointerColor: black GV*Scrollbar.pointerColorBackground: White GV*Scrollbar.scrollbarBackground: gray71 GV*Scrollbar.foreground: gray78 GV*optionsetupPopup*Text*Scrollbar.background:gray71 GV*optionfsPopup*Text*Scrollbar.background:gray71 GV*optionfsPopup*Label.background: gray71 GV*optiongsPopup*Label.background: gray71 GV*optiongvPopup*Label.background: gray71 GV*optionsetupPopup*Label.background: gray71 GV*newtocFrame*background: gray78 GV*newtocScroll.background: gray78 GV*Vlist.markBackground: red GV*Vlist.selectedBackground: #D3B5B5 GV*Vlist.highlightedBackground: gray65 !##### Shadows GV*shadowWidth: 2 GV*Label.shadowWidth: 1 GV*Label*topShadowContrast: -40 GV*Label*bottomShadowContrast: -20 GV*Scrollbar.TopShadowPixel: gray90 GV*Scrollbar.BottomShadowPixel: gray40 GV*newtoc.shadowWidth: 0 GV*newtocScroll.bottomShadowPixel: gray40 GV*optionfsPopup*Label.shadowWidth: 0 GV*optiongsPopup*Label.shadowWidth: 0 GV*optiongvPopup*Label.shadowWidth: 0 GV*optionsetupPopup*Label.shadowWidth: 0 GV*confirmPopup*message1.shadowWidth: 0 !##### Frames GV*Frame.frameType: sunken GV*Frame.topShadowPixel: gray85 GV*Frame.bottomShadowPixel: gray40 GV*Frame.hSpace: 0 GV*Frame.vSpace: 0 GV*MButton*unsetFrameStyle: chiseled GV.?.Button.unsetFrameStyle: chiseled GV.?.Button.highlightedFrameStyle: chiseled GV*rescan.unsetFrameStyle: chiseled GV*filter.unsetFrameStyle: chiseled !##### Border GV*borderWidth: 0 GV*processButton.borderWidth: 0 GV*page.borderWidth: 1 GV*SimpleMenu.borderWidth: 1 GV*infoPopup*Text.borderWidth: 1 !##### View Area GV*viewFrame.topShadowPixel: gray78 GV*viewFrame.hSpace: 1 GV*viewFrame.vSpace: 1 GV*page.borderColor: gray65 GV*viewClip.borderWidth: 1 GV*viewClip.borderColor: gray71 !##### Scrollbar widget GV*Scrollbar.thickness: 17 GV*Scrollbar.thumb: None !##### Menus GV*magMenu*VertSpace: 15 GV*magMenu*leftMargin: 30 GV*magMenu*rightMargin: 30 GV*magMenu*justify: center !##### File Selection widget GV*fileSel.filterframe.background: #D3B5B5 GV*fileSel.filterframe.hSpace: 4 GV*fileSel.filterframe*Text*Margin: 4 GV*fileSel.pathframe.background: #D3B5B5 GV*fileSel.pathframe.hSpace: 4 GV*fileSel.pathframe*Text*Margin: 6 GV*fileSel*Vlist.selectedBackground: gray58 GV*fileSel*Vlist.selectedGeometry: 3 0 -3 1 GV*fileSel*Vlist.highlightedGeometry: 3 0 -3 1 GV*fileSel*topframe.forcedWidth: 100 GV*fileSel*subframe.forcedWidth: 100 GV*fileSel*Scrollbar.showArrows: False GV*fileSel*Scrollbar.thumbTopIndent: 0 GV*fileSel*Scrollbar.width: 12 GV*fileSel*Scrollbar.shadowWidth: 1 GV*fileSel*Scrollbar.background: gray78 GV*fileSel*Scrollbar.foreground: gray71 GV*fileSel.minimumWidth: 400 GV*fileSel.height: 350 GV*fileSelPopup.minWidth: 350 GV*fileSelPopup.minHeight: 200 GV*fileSel.highlightPixel: #D3B5B5 !##### Zoom Popup GV*zoomPopup.title: Zoom GV*zoomControl.maximumWidth: 600 GV*zoomControl.maximumHeight: 600 !##### Version Popup GV*versionPopup*Label.internalHeight: 6 GV*versionPopup*Label.internalWidth: 8 !##### Info Popup GV*infoPopup.title: Ghostscript Messages GV*infoPopup.geometry: +50+50 !##### Dialog Popup GV*dialogPopup.title: Dialog GV*dialogPopup*message.internalHeight: 2 GV*dialogPopup*message.internalWidth: 8 GV*dialogPopup*defaultDistance: 2 !##### Note Popup GV*notePopup.title: Message GV*notePopup*message.internalHeight: 6 GV*notePopup*message.internalWidth: 8 !##### Confirm Popup GV*confirmPopup.title: Confirm GV*confirmPopup*Label.internalHeight: 6 GV*confirmPopup*Label.internalWidth: 8 !##### OptionsSetup Popup GV*optionfsPopup.title: File Selection Options GV*optionfsPopup*defaultDistance: 2 GV*optionfsPopup*Text*leftMargin: 8 GV*optionfsPopup*filters.Margin: 8 GV*optionfsPopup*dirs.Margin: 8 GV*optionfsPopup*filters.height: 120 GV*optionfsPopup*dirs.height: 120 !##### OptionsGS Popup GV*optiongsPopup.title: Ghostscript Options GV*optiongsPopup*defaultDistance: 2 GV*optiongsPopup*Text*Margin: 5 !##### OptionsGV Popup GV*optiongvPopup.title: gv Options !##### OptionsSetup Popup GV*optionsetupPopup.title: Setup Options GV*optionsetupPopup*defaultDistance: 2 GV*optionsetupPopup*Text*leftMargin: 8 GV*optionsetupPopup*scales.Margin: 8 GV*optionsetupPopup*scalesFrame.forcedWidth: 230 GV*optionsetupPopup*mediasFrame.forcedWidth: 240 GV*optionsetupPopup*mediasFrame.forcedHeight: 400 !##### FileSet Popup GV*fileSelPopup.title: Open File !##### Panner GV*pannerFrame.frameType: sunken GV*pannerFrame.hSpace: 0 GV*pannerFrame.vSpace: 0 GV*panner.background: gray65 GV*pannerFrame.shadowWidth: 1 GV*pannerFrame.topShadowPixel: gray90 GV*pannerFrame.bottomShadowPixel: gray40 GV*panner.width: 50 GV*panner.height: 50 GV*slider.background: gray78 GV*slider.shadowWidth: 1 GV*slider.topShadowPixel: gray90 GV*slider.bottomShadowPixel: gray40 !##### Miscellaneous GV*stateButton*menu*leftMargin: 20 GV*orientationButton*menu*leftMargin: 20 GV*pagemediaButton*menu*leftMargin: 20 GV*scaleButton*menu*leftMargin: 20 GV.control.prevPage*internalHeight: 4 GV.control.nextPage*internalHeight: 4 GV*locator*internalHeight: 3 GV.control.Button*internalWidth: 0 !################################################ !##### Labels !################################################ GV*presentation.Label: Presentation Mode GV*savepos.Label: Savepos GV*cancel.Label: Cancel GV*dismiss.Label: Dismiss GV*apply.label: Apply GV*copyright.Label: Copyright GV*quit.Label: Quit GV*fileButton.Label: File GV*open.Label: Open ... GV*reopen.Label: Reload GV*update.Label: Update GV*printAllPages.Label: Print document ... GV*printMarkedPages.Label: Print marked pages ... GV*saveAllPages.Label: Save document ... GV*saveMarkedPages.Label: Save marked pages ... GV*stateButton.Label: State GV*stop.Label: Stop interpreter GV*dsc.Label: Respect document structure GV*eof.Label: Ignore EOF comments GV*antialias.Label: Antialias GV*watchFile.Label: Watch file GV*titleLabel.Label: Show Title GV*pixmap.Label: Backing Pixmap GV*size.Label: Automatic resizing GV*watch.Label: Watch File GV*infoVerboseLabel.Label: info Popup GV*ascaleLabel.Label: Arbitraty scale GV*optionsgv.Label: gv Options ... GV*optionsfs.Label: File Selection Options ... GV*optionsgs.Label: Ghostscript Options ... GV*optionssetup.Label: Setup Options ... GV*pageButton.Label: Page GV*next.Label: Next GV*show.Label: Redisplay GV*prev.Label: Previous GV*center.Label: Center GV*pageButton*current.Label: Toggle current mark GV*pageButton*even.Label: Toggle even marks GV*pageButton*odd.Label: Toggle odd marks GV*pageButton*unmark.Label: Unmark all GV*processButton.Label: \ processing GV*mark.Label: Mark GV*prevPage.Label: << GV*nextPage.Label: >> GV*unmark.Label: Unmark GV*automatic.Label: Automatic GV*portrait.Label: Portrait GV*landscape.Label: Landscape GV*upsidedown.Label: Upside-Down GV*seascape.Label: Seascape GV*swap.Label: Swap Landscape GV*toggleCurrent.label: GV*toggleEven.label: GV*toggleOdd.label: GV*unmarkAll.label: GV*printAll.label: Print All GV*printMarked.label: Print Marked GV*saveAll.label: Save All GV*saveMarked.label: Save Marked GV*openFile.label: Open GV*redisplay.label: Reload GV*updateFile.label: Update File GV*checkFile.label: Check File GV*filters.label: Filters: GV*dirs.label: Directories GV*button1.label: Cancel GV*button2.label: Open File GV*rescan.label: Rescan Directory GV*screenSizeLabel.label: Screen Size (mm) GV*versionPopup*versionDone*label: Dismiss GV*dialogPopup*cancel.label: Cancel GV*notePopup*done.label: Okay GV*confirmPopup*cancel.label: Cancel GV*confirmPopup*done.label: Quit GV*save.label: Save GV*optiongvPopup*mediaLabel.label: \ Paper Size \ GV*optiongvPopup*fmediaLabel.label: Fallback Paper Size GV*optiongvPopup*orientLabel.label: \ Orientation \ GV*optiongvPopup*forientLabel.label: Fallback Orientation GV*optiongvPopup*magLabel.label: Scale GV*optiongvPopup*antialias.label: Antialias GV*optiongvPopup*respectDSC.label: Respect DSC GV*optiongvPopup*eof.label: Ignore EOF GV*optiongvPopup*autoResize.label: Variable Size GV*optiongvPopup*swapLandscape.label: Swap Landscape GV*optiongvPopup*scalesLabel.label: \ Scale \ GV*miscmenuLabel.label: Misc Menu Entries GV*magmenuLabel.label: Mag Menu Entries GV*mediasLabel.label: Media Sizes GV*confirmLabel.label: Confirm Quit GV*misc.label: Miscellaneous GV*scrolling.label: Reverse Scrolling GV*eyeGuide.label: Scrolling Eye Guide GV*confirmPrint.label: Confirm Printing GV*uncompressLabel.label: Uncompress GV*autoCenter.label: Auto Center GV*printCommandLabel.label: Print Command GV*scratchDirLabel.label: Scratch Directory GV*saveDirLabel.label: Save Directory GV*scalesLabel.label: Scales GV*scaleBaseLabel.label: Scale Base GV*safeDir.label: SafeDir GV*safer.label: Safer GV*quiet.label: Quiet GV*defaults.label: System Defaults GV*scanLabel.label: Scan PDF GV*convLabel.label: Convert PDF GV*gsLabel.label: Interpreter GV*x11devLabel.label: Device GV*x11alphadevLabel.label: Antialias Device GV*argumentsLabel.label: Arguments GV*filtersLabel.label: File Selection Filters GV*dirsLabel.label: File Selection Directories GV*filterLabel.label: Default Filter GV*miscMenu.update.label: Update File GV*miscMenu.redisplay.label: Reload GV*miscMenu.stop.label: Stop Interpreter GV*miscMenu.toggle_current.label: Toggle Current GV*miscMenu.toggle_odd.label: Toggle Odd GV*miscMenu.toggle_even.label: Toggle Even GV*miscMenu.unmark.label: Unmark All GV*miscMenu.print_all.label: Print All GV*miscMenu.print_marked.label: Print Marked GV*miscMenu.save_all.label: Save All GV*miscMenu.save_marked.label: Save Marked !################################################## !##### Translations !################################################## !##### Main Window GV.control.baseTranslations:#replace \n\ A: GV_Antialias() \n\ O: GV_Open() \n\ Q: GV_Quit() \n\ R: GV_Resizing() \n\ I: GV_HandleDSC() \n\ W: GV_WatchFile() \n\ ~s ~c s: GV_Save(marked) \n\ s: GV_Save(all) \n\ ~s ~c p: GV_Print(marked) \n\ ~s c p: GV_Print(all) \n\ ~c ~s period: GV_Page(redisplay) \n\ period: GV_Reopen() \n\ Z: GV_SavePos() \n\ U: GV_PrintPos(marked) \n\ s p: GV_Presentation() \n\ c L: GV_Page(redisplay) \n\ M: GV_SetPageMark(current,mark)\n\ N: GV_SetPageMark(current,unmark)\n\ \ 7: GV_SetOrientation(portrait)\n\ 8: GV_SetOrientation(landscape)\n\ 9: GV_SetOrientation(upside-down)\n\ 0: GV_SetOrientation(seascape)\n\ \ ~c ~s 1: GV_SetScale(1) \n\ ~c ~s 2: GV_SetScale(2) \n\ ~c ~s 3: GV_SetScale(3) \n\ ~c ~s 4: GV_SetScale(4) \n\ ~c ~s 5: GV_SetScale(5) \n\ ~c ~s 6: GV_SetScale(6) \n\ 6: GV_SetScale(-6) \n\ 5: GV_SetScale(-5) \n\ 4: GV_SetScale(-4) \n\ 3: GV_SetScale(-3) \n\ 2: GV_SetScale(-2) \n\ 1: GV_SetScale(-1) \n\ grave: GV_SetScale(0) \n\ asciicircum: GV_SetScale(0) \n\ -: GV_SetScale(-) \n\ =: GV_SetScale(+) \n\ +: GV_SetScale(+) \n\ \ ~c ~s Up: GV_Page(up) \n\ ~c ~s Right: GV_Page(right) \n\ ~c ~s Down: GV_Page(down) \n\ ~c ~s Left: GV_Page(left) \n\ ~c s Up: GV_Page(up,left-bottom,!page-1,bottom-rightedge)\n\ ~c s Down: GV_Page(down,right-top,!page+1,top-leftedge)\n\ ~c s Left: GV_Page(left,up-rightedge,!page-1,bottom-rightedge)\n\ ~c s Right: GV_Page(right,down-leftedge,!page+1,top-leftedge)\n\ c ~s Up: GV_Page(!page-1,top-leftedge)\n\ c ~s Down: GV_Page(!page+1,top-leftedge)\n\ c ~s Left: GV_Page(!page-5,top-leftedge)\n\ c ~s Right: GV_Page(!page+5,top-leftedge)\n\ \ ~c ~s d: GV_Page(up) \n\ ~c ~s x: GV_Page(down) \n\ ~c ~s z: GV_Page(left) \n\ ~c ~s y: GV_Page(left) \n\ ~c ~s c: GV_Page(right) \n\ ~c s d: GV_Page(up,left-bottom,!page-1,bottom-rightedge)\n\ ~c s x: GV_Page(down,right-top,!page+1,top-leftedge)\n\ ~c s z: GV_Page(left,up-rightedge,!page-1,bottom-rightedge)\n\ ~c s y: GV_Page(left,up-rightedge,!page-1,bottom-rightedge)\n\ ~c s c: GV_Page(right,down-leftedge,!page+1,top-leftedge)\n\ c ~s d: GV_Page(!page-1,top-leftedge)\n\ c ~s x: GV_Page(!page+1,top-leftedge)\n\ c ~s z: GV_Page(!page-5,top-leftedge)\n\ c ~s y: GV_Page(!page-5,top-leftedge)\n\ c ~s c: GV_Page(!page+5,top-leftedge)\n\ V: GV_Page(center) \n\ ~c ~sspace: GV_Page(down,right-top,!page+1,top-leftedge)\n\ space: GV_Page(up,left-bottom,!page-1,bottom-rightedge)\n\ \ BackSpace: GV_Page(up,left-bottom,!page-1,bottom-rightedge)\n\ Insert: GV_Page(page-5) \n\ Delete: GV_Page(page+5) \n\ Home: GV_Page(page=0) \n\ End: GV_Page(page=99999) \n\ Prior: GV_Page(page-1) \n\ Next: GV_Page(page+1) \n\ \ KP_0: GV_Page(highlight=0) \n\ KP_1: GV_Page(highlight=1) \n\ KP_2: GV_Page(highlight=2) \n\ KP_3: GV_Page(highlight=3) \n\ KP_4: GV_Page(highlight=4) \n\ KP_5: GV_Page(highlight=5) \n\ KP_6: GV_Page(highlight=6) \n\ KP_7: GV_Page(highlight=7) \n\ KP_8: GV_Page(highlight=8) \n\ KP_9: GV_Page(highlight=9) \n\ KP_Subtract: GV_Page(highlight-1) \n\ KP_Add: GV_Page(highlight+1) \n\ KP_Enter: GV_Page(page=highlighted)\n\ KP_Insert: GV_Page(page-5) \n\ KP_Delete: GV_Page(page+5) \n\ KP_Home: GV_Page(page=0) \n\ KP_End: GV_Page(page=99999) \n\ KP_Prior: GV_Page(page-1) \n\ KP_Next: GV_Page(page+1) \n\ \ ~c ~s Return: GV_Page(down,!page+1,top) \n\ Return: GV_Page(top,!page-1,down) \n\ B: GV_Page(page-1) \n\ F: GV_Page(page+1) !##### Zoom Popup GV.zoomPopup.Aaa.baseTranslations:#replace \n\ Q: GV_DismissPopup() \n\ \ ~c ~s Up: GV_Page(up) \n\ ~c ~s Right: GV_Page(right) \n\ ~c ~s Down: GV_Page(down) \n\ ~c ~s Left: GV_Page(left) \n\ ~c s Up: GV_Page(up,left-bottom)\n\ ~c s Down: GV_Page(down,right-top)\n\ ~c s Left: GV_Page(left,up-rightedge)\n\ ~c s Right: GV_Page(right,down-leftedge)\n\ \ ~c ~s d: GV_Page(up) \n\ ~c ~s x: GV_Page(down) \n\ ~c ~s z: GV_Page(left) \n\ ~c ~s y: GV_Page(left) \n\ ~c ~s c: GV_Page(right) \n\ ~c s d: GV_Page(up,left-bottom)\n\ ~c s x: GV_Page(down,right-top)\n\ ~c s z: GV_Page(left,up-rightedge)\n\ ~c s y: GV_Page(left,up-rightedge)\n\ ~c s c: GV_Page(right,down-leftedge)\n\ V: GV_Page(center) \n\ ~c ~sspace: GV_Page(down,right-top)\n\ space: GV_Page(up,left-bottom)\n\ \ BackSpace: GV_Page(up,left-bottom) !##### Table of contents GV*newtoc.baseTranslations: #replace \n\ : GV_Toc(highlight) \n\ : GV_Toc(unhighlight) \n\ : GV_Toc(scrollon) \n\ : GV_Toc(scroll) \n\ : GV_Toc(highlight) \ GV_Toc(scrolloff) \ GV_Toc(select) \n\ : GV_Toc(toggleon) \n\ : GV_Toc(toggleextend) \ GV_Toc(highlight) \n\ : GV_Toc(toggleoff) \n\ : GV_Toc(toggleon) \n\ : GV_Toc(toggleextend) \ GV_Toc(highlight) \n\ : GV_Toc(toggleoff) \n\ : GV_Toc(highlight) !##### Menus GV*SimpleMenu.baseTranslations:#replace\n\ : highlight()\n\ : unhighlight()\n\ : highlight()\n\ : MenuPopdown()\ GV_MenuPopdown()\ notify()\ unhighlight() !##### Ghostview widget GV*Ghostview.baseTranslations: #replace \n\ ~Button1 ~Button3 : cursor(scroll) \ GV_MovePage(start) \ GV_EraseLocator() \n\ ~Button1 ~Button3 : GV_MovePage(move,1.0,0) \n\ : cursor(normal) \ GV_MovePage(stop) \ GV_OtherPage() \ notify() \n\ ~Button2 ~Button3 s : cursor(scroll) \ GV_MovePage(start) \ GV_EraseLocator() \ GV_MiscMenu(init) \n\ ~Button2 ~Button3 s : GV_MovePage(move,0,1.0) \n\ s : cursor(normal) \ GV_MiscMenu(popup) \ notify() \n\ ~Button1 ~Button2 s : GV_MagMenu(begin) \n\ ~Button1 ~Button2 s : GV_MagMenu(extend) \n\ ~Button1 ~Button2 s : GV_MagMenu(choose) \n\ ~Button2 ~Button3 : GV_MagMenu(begin) \n\ Button1 : GV_MagMenu(reset) \n\ Button1 : GV_MagMenu(reset) \n\ ~Button2 ~Button3 : GV_MagMenu(extend) \n\ ~Button2 ~Button3 : GV_MagMenu(choose) \n\ ~Button1 ~Button2 : cursor(scroll) \ GV_MovePage(start) \ GV_EraseLocator() \ GV_MiscMenu(init) \n\ Button3 : GV_MiscMenu(reset) \n\ Button3 : GV_MiscMenu(reset) \n\ ~Button1 ~Button2 : GV_MovePage(move,0,1.0) \n\ : cursor(normal) \ GV_MiscMenu(popup) \ notify() \n\ Button2 ~Button3 : GV_Page(redisplay) \n\ Button2 ~Button1 : GV_Page(redisplay) \n\ : message() \n\ : notify() \n\ : GV_EraseLocator() \n\ : notify() !##### Application GV.baseTranslations: #replace \n\ : GV_CheckFile(date) \n\ : GV_ConfigureNotify() \n\ WM_PROTOCOLS: GV_DeleteWindow() !##### Title and Date Button GV.control.titleButton.baseTranslations:#replace\n\ : PopupMenu(1) GV.control.dateButton.baseTranslations:#replace \n\ : PopupMenu(1) !##### next/previous page Buttons Widget in the main window GV.control.prevPage.baseTranslations: #replace\n\ : highlight() \n\ : reset() \n\ : set() \n\ : notify() unset() GV_Page(page-1)\n\ : notify() unset() GV_Page(page-5)\n\ : notify() unset() GV_Page(page-10) GV.control.nextPage.baseTranslations: #replace\n\ : highlight() \n\ : reset() \n\ : set() \n\ : notify() unset() GV_Page(page+1)\n\ : notify() unset() GV_Page(page+5)\n\ : notify() unset() GV_Page(page+10) !##### Buttons in Option Popups GV*TransientShell*optionControl*Button.baseTranslations: #replace\n\ : highlight() \n\ : reset() \n\ : set() \n\ : notify() unset() !##### Options gv Popup GV*optiongvPopup*Toggle.baseTranslations: #replace\n\ : \n\ : \n\ ,: toggle() notify() !##### Options gs Popup GV*optiongsPopup*Toggle.baseTranslations: #replace\n\ : \n\ : \n\ ,: toggle() notify() !##### Panner GV*panner.baseTranslations: #replace \n\ : GV_Panner(on) \n\ : GV_Panner(move) \n\ : GV_Panner(off) \n\ s : GV_Page(page+1) \n\ s : GV_Page(page-1) \n\ : GV_Page(page-1) \n\ : GV_Page(page+1) !##### Popup Shells GV.TransientShell.baseTranslations:#replace\n\ WM_PROTOCOLS: GV_DeleteWindow() GV.TopLevelShell.baseTranslations:#replace\n\ WM_PROTOCOLS: GV_DeleteWindow() GV.TransientShell.Aaa.baseTranslations:#replace\n\ Q: GV_DismissPopup() GV.TopLevelShell.Aaa.baseTranslations:#replace\n\ Q: GV_DismissPopup() !##### Button Widget in Zoom Popups GV.TopLevelShell*Button.accelerators:#override\n\ Return: set() notify() unset() GV.TopLevelShell*dismiss.accelerators:#override\n\ Escape: set() notify() unset()\n\ Return: set() notify() unset() GV.TopLevelShell*Button.baseTranslations: #replace\n\ Return: set() notify() unset()\n\ : unset() \n\ : set() \n\ : notify() unset() !##### Button Widget in Transient Popups GV*TransientShell*Button.accelerators:#override\n\ Return: set() notify() unset() GV*TransientShell*cancel.accelerators:#override\n\ Escape: set() notify() unset()\n\ Return: set() notify() unset() GV*TransientShell*button1.accelerators:#override\n\ Escape: set() notify() unset()\n\ Return: set() notify() unset() GV*TransientShell*dismiss.accelerators:#override\n\ Escape: set() notify() unset()\n\ Return: set() notify() unset() GV*TransientShell*Button.baseTranslations: #replace\n\ Return: set() notify() unset()\n\ : unset() \n\ : set() \n\ : notify() unset() !##### MagMenu GV*magMenu.baseTranslations: #replace \n\ : highlight() \n\ : unhighlight() \ GV_MagMenu(reset)\n\ : GV_MagMenu(check)\n\ : highlight() \n\ : highlight() \n\ : GV_MagMenu(show)\ MenuPopdown(magMenu) !##### MiscMenu GV*miscMenu.baseTranslations: #replace \n\ : highlight() \n\ : unhighlight() \ GV_MiscMenu(reset)\n\ : GV_MiscMenu(check)\n\ : highlight() \n\ : highlight() \n\ : MenuPopdown(miscMenu)\ notify()\ unhighlight()\ GV_MiscMenu(reset) GV*gs.errors.none.Label: None GV*gs.errors.errors.Label: Errors GV*gs.errors.all.Label: All GV*quitstyle.never.Label: Never GV*quitstyle.whenprocessing.Label: When processing GV*quitstyle.always.Label: Always GV*title.notitle.Label: No Title GV*title.documenttitle.Label: Document Title GV*title.filename.Label: Filename GV*strings.saveCurrentPage: Save Current Page GV*strings.saveMarkedPages: Save Marked Pages GV*strings.saveDocument: Save Document GV*strings.saveAsPDF: Save as PDF GV*strings.openFile: Open File GV*strings.passwordPrompt: Password: GV*strings.passwordRequired: Password required GV*strings.quitConfirm: Do you really want to quit ? GV*strings.texCommand: TeX command GV*strings.putTexCommand: Put a TeX command at the current position GV*strings.stillInProgress: Still in progress: GV*strings.execOfFailed: Exec of %s failed GV*strings.copyrightTranslation: N/A gv-3.7.4/src/scale.c0000664000076400007640000001727611736064614011143 00000000000000/* ** ** scale.c ** ** Copyright (C) 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" /* #define MESSAGES */ #include "message.h" #include #include #include #include "paths.h" #include INC_X11(Intrinsic.h) #include INC_XMU(SysUtil.h) #include "types.h" #include "config.h" #include "types.h" #include "options.h" #include "resource.h" #include "scale.h" #include /*################################################## scale_freeScales ##################################################*/ void scale_freeScales(scales) Scale *scales; { int i=0; BEGINMESSAGE(scale_freeScales) while (scales[i]) { XtFree(scales[i]->name); XtFree((XtPointer)scales[i]); i++; } XtFree((XtPointer)scales); ENDMESSAGE(scale_freeScales) } /*################################################## scale_parseScales ##################################################*/ static Scale scale_mallocScale(void) { Scale scale; scale = (Scale) XtMalloc(sizeof(ScaleStruct)); memset((void*)scale ,0,sizeof(ScaleStruct)); return scale; } Scale *scale_parseScales(s) char *s; { char *c,*nl; Scale *scales,*mscales; Scale scale; int i,n,have_base=0,have_center=0; char name[50],kind[50]; float f; BEGINMESSAGE(scale_parseScales) if (!s) s = ""; s =options_squeezeMultiline(s); for (n=1,c=s; (c = strchr(c,'\n')); n++, c++); INFIMESSAGE(number of scales,n) mscales = scales = (Scale*) XtMalloc((n+3)*sizeof(Scale)); c=s; if (*s) while (n>0) { nl = strchr(c,'\n'); if (nl) *nl='\0'; name[0]=kind[0]='\0'; f=-10.0; if (*c=='#' || *c=='!') i=0; else i=sscanf(c," %[^,] , %f , %[^,] ",name,&f,kind); if (i>=2 && f>=-3.1) { scale = scale_mallocScale(); scale->name = XtNewString(name); if (f>0) scale->scale = sqrt(f); else scale->scale = f; if (i==3) { if (!strcasecmp(kind,"screen")) { scale->is_base = SCALE_IS_REAL_BASED; have_base=1;} else if (!strcasecmp(kind,"pixel")) { scale->is_base = SCALE_IS_PIXEL_BASED; have_base=1;} } if (!scale->is_base && f==1.0) { scale->is_center=1; have_center=1; } INFSMESSAGE(found scale,scale->name); FMESSAGE(scale->scale) IMESSAGE(scale->is_base) *scales++ = scale; } n--; if (!nl) break; c=++nl; } if (!have_center) { scale = scale_mallocScale(); scale->name = XtNewString("1.000"); scale->scale = 1.0; scale->is_center=1; *scales++ = scale; } if (!have_base) { scale = scale_mallocScale(); scale->name = XtNewString("Natural size"); scale->scale = 1.0; scale->is_base=SCALE_IS_REAL_BASED; *scales++ = scale; } *scales = (Scale) NULL; /* sort the scales: first the scale bases, then the relative ones. */ /* Also sort relative scales according to their scale value. */ scales=mscales; n=0; while (scales[n]) { if (n>0 && ((scales[n]->is_base && !(scales[n-1]->is_base)) || (!(scales[n]->is_base) && !(scales[n-1]->is_base) && scales[n-1]->scale > scales[n]->scale))) { scale=scales[n]; scales[n]=scales[n-1]; scales[n-1]=scale; n=0; } else n++; } XtFree(s); ENDMESSAGE(scale_parseScales) return(mscales); } /*##################################################################*/ /* scale_numOfScale */ /*##################################################################*/ int scale_checkScaleNum(scales,s) Scale *scales; int s; { int j,n=-1; int m; m = s & (~SCALE_VAL); s = s & SCALE_VAL; if (m&SCALE_MIN) s = -s; BEGINMESSAGE(scale_checkScaleNum) if (m&SCALE_REL) { for (j=0; scales[j] && !scales[j]->is_center; j++); if (scales[j]) { n = j; j += s; if (j<0) j = 0; while (n>j) if (scales[n-1]->is_base) break; else n--; while (n=0) { if (m&SCALE_BAS) { if (!(scales[n]->is_base)) n=-1; } else if (scales[n]->is_base) n = -1; } if (n>=0) { if (m&SCALE_BAS) n = n|SCALE_BAS; else n = n|SCALE_ABS; } ENDMESSAGE(scale_checkScaleNum) return n; } /*##################################################################*/ /* scale_getScreenSize */ /*##################################################################*/ void scale_getScreenSize(display,screen,db,app_class,app_name,widthP,heightP) Display *display; Screen *screen; XrmDatabase db; char *app_class; char *app_name; int *widthP; int *heightP; { int hmm=0,wmm=0; char v[255]; char *s; XrmDatabase sdb=NULL; BEGINMESSAGE(scale_getScreenSize) s=XScreenResourceString(screen); if (s) { sdb=XrmGetStringDatabase(s); s=resource_getResource(sdb,app_class,app_name,"screenSize",NULL); INFSMESSAGE(found in SCREEN_RESOURCES,s) } if (!s) { scale_getScreenResourceName(display,v); s=resource_getResource(db,app_class,app_name,v,NULL); INFSMESSAGE(found in screen specific resource,s) } if (!s) { s=resource_getResource(db,app_class,app_name,"screenSize",NULL); INFSMESSAGE(found,s) } if (s) strcpy(v,s); else v[0]='\0'; if (v[0]) sscanf(v," %d x %d ",&wmm,&hmm); if (hmm > 0 && wmm > 0) { *widthP=wmm; *heightP=hmm; } else { *widthP=WidthMMOfScreen(screen); *heightP=HeightMMOfScreen(screen); } if (sdb) XrmDestroyDatabase(sdb); IIMESSAGE(*widthP,*heightP) ENDMESSAGE(scale_getScreenSize) } /*################################################## scale_getScreenResourceName ##################################################*/ void scale_getScreenResourceName(display,name) Display *display; char *name; { char server[255],*s; int disp=0,scr=0; BEGINMESSAGE(scale_getScreenResourceName) server[0]='\0'; s=XDisplayName(XDisplayString(display)); if (s) { strcpy(server,s); s=strrchr(server,':'); if (s) { *s++ = '\0'; if (*s == ':') s++; if (*s=='.') sscanf(++s, "%d", &scr); else sscanf(s, "%d.%d", &disp,&scr); } } if (!*server || !strcmp(server, "unix") || !strcmp(server, "localhost")) { char* ssh; ssh = getenv("SSH_CLIENT"); if (ssh) { strcpy(server, ssh); s=strrchr(server,' '); if (s) *s='\0'; s = server; while (*s) { if (*s == '.') *s = '-'; s++; } } } if (!*server || !strcmp(server, "unix") || !strcmp(server, "localhost") || !strcmp(server, "127-0-0-1")) XmuGetHostname(server, 255); s=strrchr(server,'.'); if (s) *s='\0'; SMESSAGE(server) if (server[0]) sprintf(name, "screenSize_%s_%d_%d",server,disp,scr); else *name='\0'; SMESSAGE(name) ENDMESSAGE(scale_getScreenResourceName) } gv-3.7.4/src/Vlist.c0000664000076400007640000007055111736064614011150 00000000000000/* ** ** Vlist.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** modified 2008 by Bernhard R. Link ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" #include #include #include /* #define MESSAGES */ #include "message.h" #include "paths.h" #include INC_X11(IntrinsicP.h) #include INC_X11(StringDefs.h) #include INC_XMU(Misc.h) #include INC_XAW(XawInit.h) #include "VlistP.h" #include "Frame.h" #include INC_XMU(Converters.h) #define VLIST_MARK_LEFT_INDENT 4 #define VLIST_MARK_LABEL_INTERNAL_WIDTH 11 #define VLIST_MARK_LABEL_INDENT 4 #define VLIST_MARK_VERTICAL_INDENT 3 #define VLIST_MARK_WIDTH 5 /**************************************************************** * * Full class record constant * ****************************************************************/ /* Private Data */ static char defaultTranslations[] = ""; #define offset(field) XtOffsetOf(VlistRec, field) static XtResource resources[] = { {XtNreportCallback, XtCReportCallback, XtRCallback, sizeof(XtPointer), offset(vlist.report_callbacks), XtRCallback, (XtPointer) NULL }, {XtNselectedShadowWidth, XtCShadowWidth, XtRDimension, sizeof(Dimension), offset(vlist.selected_shadow_width), XtRImmediate, (XtPointer) 1}, {XtNmarkShadowWidth, XtCShadowWidth, XtRDimension, sizeof(Dimension), offset(vlist.mark_shadow_width), XtRImmediate, (XtPointer) 1}, {XtNhighlightedShadowWidth, XtCShadowWidth, XtRDimension, sizeof(Dimension), offset(vlist.highlighted_shadow_width), XtRImmediate, (XtPointer) 1}, {XtNhighlightedGeometry, XtCHighlightedGeometry, XtRString, sizeof(String), offset(vlist.highlighted_geometry), XtRImmediate, (XtPointer)"2 0 -2 1"}, {XtNselectedGeometry, XtCSelectedGeometry, XtRString, sizeof(String), offset(vlist.selected_geometry), XtRImmediate, (XtPointer)"12 0 -2 1"}, {XtNvlist, XtCVlist, XtRString, sizeof(String), offset(vlist.vlist), XtRString, NULL}, {XtNmarkBackground, XtCMarkBackground, XtRPixel, sizeof(Pixel), offset(vlist.mark_background), XtRString, XtDefaultBackground}, {XtNselectedBackground, XtCSelectedBackground, XtRPixel, sizeof(Pixel), offset(vlist.selected_background), XtRString, XtDefaultBackground}, {XtNhighlightedBackground, XtCHighlightedBackground, XtRPixel, sizeof(Pixel), offset(vlist.highlighted_background), XtRString, XtDefaultBackground}, {XtNshadowWidth, XtCShadowWidth, XtRDimension, sizeof(Dimension), offset(threeD.shadow_width), XtRImmediate, (XtPointer) 2}, {XtNallowMarks, XtCAllowMarks, XtRBoolean, sizeof(Boolean), offset(vlist.allow_marks), XtRImmediate, (XtPointer)True}, {XtNinternalWidth, XtCWidth, XtRDimension, sizeof(Dimension), offset(label.internal_width), XtRImmediate, (XtPointer)VLIST_MARK_LABEL_INTERNAL_WIDTH}, {XtNborderWidth, XtCBorderWidth, XtRDimension, sizeof(Dimension), XtOffsetOf(RectObjRec,rectangle.border_width), XtRImmediate, (XtPointer)0} }; #undef offset static Boolean SetValues(Widget,Widget,Widget,ArgList,Cardinal*); static void Initialize(Widget,Widget,ArgList,Cardinal*); static void Redisplay(Widget,XEvent*,Region); static void Destroy(Widget); static void PaintVlistWidget(Widget,XEvent*,Region); static void ClassInitialize(void); static void Resize(Widget); static void PaintMarkOfEntry(Widget,Region,int,int,Boolean); static void PaintMarkMarkOfEntry(Widget,Region,int,Boolean); #define SuperClass ((LabelWidgetClass)&labelClassRec) VlistClassRec vlistClassRec = { { (WidgetClass) SuperClass, /* superclass */ "Vlist", /* class_name */ sizeof(VlistRec), /* size */ ClassInitialize, /* class_initialize */ NULL, /* class_part_initialize */ FALSE, /* class_inited */ Initialize, /* initialize */ NULL, /* initialize_hook */ XtInheritRealize, /* realize */ NULL, /* actions */ 0, /* num_actions */ resources, /* resources */ XtNumber(resources), /* resource_count */ NULLQUARK, /* xrm_class */ TRUE, /* compress_motion */ TRUE, /* compress_exposure */ TRUE, /* compress_enterleave */ FALSE, /* visible_interest */ Destroy, /* destroy */ Resize, /* resize */ Redisplay, /* expose */ SetValues, /* set_values */ NULL, /* set_values_hook */ XtInheritSetValuesAlmost, /* set_values_almost */ NULL, /* get_values_hook */ NULL, /* accept_focus */ XtVersion, /* version */ NULL, /* callback_private */ defaultTranslations, /* tm_table */ XtInheritQueryGeometry, /* query_geometry */ XtInheritDisplayAccelerator, /* display_accelerator */ NULL /* extension */ }, /* CoreClass fields initialization */ { XtInheritChangeSensitive /* change_sensitive */ }, /* SimpleClass fields initialization */ { XtInheritXaw3dShadowDraw, /* shadowdraw */ }, /* ThreeD Class fields initialization */ { 0, /* field not used */ }, /* LabelClass fields initialization */ { 0, /* field not used */ }, /* VlistClass fields initialization */ }; /* for public consumption */ WidgetClass vlistWidgetClass = (WidgetClass) &vlistClassRec; /*---------------------------------------------------*/ /* ClassInitialize */ /*---------------------------------------------------*/ static void ClassInitialize(void) { BEGINMESSAGE(ClassInitialize) XawInitializeWidgetSet(); ENDMESSAGE(ClassInitialize) } /*---------------------------------------------------*/ /* Initialize */ /*---------------------------------------------------*/ static void Initialize(Widget request _GL_UNUSED, Widget new, ArgList args _GL_UNUSED, Cardinal *num_args _GL_UNUSED) { VlistWidget vw = (VlistWidget) new; String s=""; char *c; XGCValues values; BEGINMESSAGE(Initialize) if (vw->vlist.vlist) s = vw->vlist.vlist; vw->vlist.vlist = XtNewString(s); c = vw->vlist.vlist; vw->vlist.firstVisible = 0; vw->vlist.selected = -1; vw->vlist.highlighted = -1; vw->vlist.entries = (int)strlen(vw->vlist.vlist); sscanf(vw->vlist.highlighted_geometry,"%d %d %d %d", &(vw->vlist.hulx),&(vw->vlist.huly),&(vw->vlist.hlrx),&(vw->vlist.hlry)); sscanf(vw->vlist.selected_geometry,"%d %d %d %d", &(vw->vlist.sulx),&(vw->vlist.suly),&(vw->vlist.slrx),&(vw->vlist.slry)); /* mark background GC */ values.foreground = vw->vlist.mark_background; vw->vlist.mark_background_GC = XtGetGC((Widget)vw,(unsigned) GCForeground,&values); /* selected background GC */ values.foreground = vw->vlist.selected_background; vw->vlist.selected_background_GC = XtGetGC((Widget)vw,(unsigned) GCForeground,&values); /* highlighted background GC */ values.foreground = vw->vlist.highlighted_background; vw->vlist.highlighted_background_GC = XtGetGC((Widget)vw,(unsigned) GCForeground,&values); /* background GC */ values.foreground = vw->core.background_pixel; values.graphics_exposures = False; vw->vlist.background_GC = XtGetGC((Widget)vw,(unsigned) GCForeground | GCGraphicsExposures,&values); /* TODO: check if this works here in international mode, or if it has * to be moved to Realize... */ #ifdef HAVE_XAW3D_INTERNATIONAL if( vw->simple.international == True ) { XFontSetExtents *ext = XExtentsOfFontSet(vw->label.fontset); vw->vlist.yofs = (ext->max_ink_extent.y<0)?-ext->max_ink_extent.y:ext->max_ink_extent.y; vw->vlist.ydelta = ext->max_ink_extent.height; } else { #endif vw->vlist.yofs = vw->label.font->max_bounds.ascent; vw->vlist.ydelta = vw->label.font->max_bounds.ascent + vw->label.font->max_bounds.descent; #ifdef HAVE_XAW3D_INTERNATIONAL } #endif ENDMESSAGE(Initialize) } /*---------------------------------------------------*/ /* Redisplay */ /*---------------------------------------------------*/ static void Redisplay(Widget w, XEvent *event, Region region) { BEGINMESSAGE(Redisplay) PaintVlistWidget(w, event, region); ENDMESSAGE(Redisplay) } /*---------------------------------------------------*/ /* Resize */ /*---------------------------------------------------*/ static void shiftLabel(VlistWidget vw) { BEGINMESSAGE(shiftLabel) if (vw->vlist.allow_marks) { vw->label.label_x = vw->label.internal_width + vw->threeD.shadow_width + VLIST_MARK_LABEL_INDENT; } ENDMESSAGE(shiftLabel) } static void Resize(Widget w) { VlistWidget vw = (VlistWidget) w; BEGINMESSAGE(Resize) (*vlistWidgetClass->core_class.superclass->core_class.resize)(w); shiftLabel(vw); ENDMESSAGE(Resize) } /*---------------------------------------------------*/ /* SetValues */ /*---------------------------------------------------*/ static Boolean SetValues (Widget current, Widget request _GL_UNUSED, Widget new, ArgList args _GL_UNUSED, Cardinal *num_args _GL_UNUSED) { VlistWidget cvw = (VlistWidget) current; VlistWidget nvw = (VlistWidget) new; Boolean changed = False; BEGINMESSAGE(SetValues) if (nvw->vlist.vlist == NULL) nvw->vlist.vlist = ""; if (cvw->vlist.vlist != nvw->vlist.vlist) { XtFree((char *)cvw->vlist.vlist); nvw->vlist.vlist = XtNewString(nvw->vlist.vlist); nvw->vlist.entries = (int)strlen(nvw->vlist.vlist); if (!nvw->vlist.entries) nvw->vlist.entries =- 1; SMESSAGE(nvw->vlist.vlist) IMESSAGE(nvw->vlist.entries) changed = True; } ENDMESSAGE(SetValues) return (changed); } /*---------------------------------------------------*/ /* Destroy */ /*---------------------------------------------------*/ static void Destroy(Widget w) { VlistWidget vw = (VlistWidget)w; BEGINMESSAGE(Destroy) XtFree(vw->vlist.vlist); XtReleaseGC(w,vw->vlist.background_GC); XtReleaseGC(w,vw->vlist.mark_background_GC); XtReleaseGC(w,vw->vlist.selected_background_GC); XtReleaseGC(w,vw->vlist.highlighted_background_GC); ENDMESSAGE(Destroy) } /*---------------------------------------------------*/ /* PaintEntryString */ /*---------------------------------------------------*/ static void PaintEntryString(Widget w, int entry) { VlistWidget vw = (VlistWidget)w; char * s; int i; int yofs = vw->vlist.yofs, ydelta = vw->vlist.ydelta; yofs -= ydelta * vw->vlist.firstVisible; BEGINMESSAGE1(PaintEntryString) s = vw->label.label; i = entry; if (s) while (i > 0 && (s = strchr(s,'\n'))) { s++; i--; } if (s) { char *nl = strchr(s,'\n'); int len; if (nl) len = nl - s; else len = strlen(s); #ifdef HAVE_XAW3D_INTERNATIONAL if( vw->simple.international == True ) XmbDrawString(XtDisplay(w), XtWindow(w), vw->label.fontset, vw->label.normal_GC, vw->label.label_x, vw->label.label_y + yofs + entry*ydelta, s, len); else #endif XDrawString(XtDisplay(w), XtWindow(w), vw->label.normal_GC, vw->label.label_x, vw->label.label_y + yofs + entry*ydelta, s, len); } ENDMESSAGE1(PaintEntryString) } /*---------------------------------------------------*/ /* PaintMarkOfEntry */ /*---------------------------------------------------*/ static int PaintMark(Widget w, Region region, int entry, int style, Boolean erase) { VlistWidget vw = (VlistWidget)w; int ss,ulx,uly,lrx,lry,ret=0; Position x,y; Dimension width,height; Dimension sw; GC gc; BEGINMESSAGE(PaintMark) IIMESSAGE(entry,erase) if (entry < 0 || entry >= vw->vlist.entries) { INFMESSAGE(invalid entry) ENDMESSAGE(PaintMark) return(ret); } if (entry < vw->vlist.firstVisible) { ENDMESSAGE(PaintMark) return 0; } if (style<0) { /* highlighted */ INFMESSAGE(highlighted entry) ulx = vw->vlist.hulx; uly = vw->vlist.huly; lrx = vw->vlist.hlrx; lry = vw->vlist.hlry; sw = vw->vlist.highlighted_shadow_width; gc = vw->vlist.highlighted_background_GC; } else { /* selected */ INFMESSAGE(selected entry) ulx = vw->vlist.sulx; uly = vw->vlist.suly; lrx = vw->vlist.slrx; lry = vw->vlist.slry; sw = vw->vlist.selected_shadow_width; gc = vw->vlist.selected_background_GC; } x = (Position) ulx; y = (Position) (((int) vw->label.label_y) + ((entry - vw->vlist.firstVisible)*vw->vlist.ydelta) + uly); width = (Dimension)((int) vw->core.width - ulx + lrx); height= (Dimension)(vw->vlist.ydelta - uly + lry + .5); ss = XawSUNKEN; if (region == NULL || XRectInRegion(region,x,y,width,height) != RectangleOut) { if (erase) { INFMESSAGE(clearing entry) XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w),vw->vlist.background_GC,x,y,width,height); } else { INFMESSAGE(drawing entry) XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w),gc,x,y,width,height); FrameDrawFrame(w,x,y,width,height,ss,sw, vw->threeD.top_shadow_GC, vw->threeD.bot_shadow_GC); } ret=1; } ENDMESSAGE(PaintMark) return ret; } static void PaintMarkOfEntry(Widget w, Region region, int entry, int style, Boolean erase) { VlistWidget vw = (VlistWidget)w; int pstyle,dstyle,d,p; int drawn=0,pdrawn=0; int order=0; BEGINMESSAGE(PaintMarkOfEntry) if (entry < 0 || entry >= vw->vlist.entries) { INFMESSAGE(invalid entry) ENDMESSAGE(PaintMarkOfEntry) return; } d = entry; dstyle=style; if (style<0) { p=vw->vlist.selected; pstyle=1; } else { p=vw->vlist.highlighted; pstyle=-1; } if (d+1 == p) order = 10; else if (d-1 == p) { if (erase) order=10; else order=01; } else if (d==p) { if (dstyle<0) order=10; else order=01; } else order = 999; IIMESSAGE(d,p) IMESSAGE(order) if (order==10 || order == 999) { drawn = PaintMark(w, region, d, dstyle,erase); if (order==10) pdrawn = PaintMark(w, region, p, pstyle,False); } else if (order==01) { pdrawn = PaintMark(w, region, p, pstyle,False); drawn = PaintMark(w, region, d, dstyle,erase); } if (pdrawn) { PaintEntryString(w,p); PaintMarkMarkOfEntry(w,region,p,False); } if (drawn && p!=d) { PaintEntryString(w,d); PaintMarkMarkOfEntry(w,region,d,False); } ENDMESSAGE(PaintMarkOfEntry) } /*---------------------------------------------------*/ /* PaintMarkMarkOfEntry */ /*---------------------------------------------------*/ static void PaintMarkMarkOfEntry(Widget w, Region region, int entry, Boolean erase) { VlistWidget vw = (VlistWidget)w; BEGINMESSAGE1(PaintMarkMarkOfEntry) if (vw->vlist.allow_marks) { int ss; Position x,y; Dimension width,height; char *vlist = vw->vlist.vlist; Boolean paint=False; if (entry < vw->vlist.firstVisible) return; if (vlist[entry] == '*') paint = True; if (paint || erase) { x = (Position) (VLIST_MARK_LEFT_INDENT); y = (Position) (((int) vw->label.label_y) + VLIST_MARK_VERTICAL_INDENT + ((entry-vw->vlist.firstVisible)*vw->vlist.ydelta)); width = (Dimension) (VLIST_MARK_WIDTH); height= (Dimension)(vw->vlist.ydelta + 0.5 - 2*VLIST_MARK_VERTICAL_INDENT); ss = XawSUNKEN; if (region == NULL || XRectInRegion(region,x,y,width,height) != RectangleOut) { if (paint) { INFMESSAGE(drawing mark) XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w),vw->vlist.mark_background_GC,x,y,width,height); FrameDrawFrame(w,x,y,width,height,ss,vw->vlist.mark_shadow_width, vw->threeD.top_shadow_GC, vw->threeD.bot_shadow_GC); } else { INFMESSAGE(clearing mark) XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w), (entry == vw->vlist.highlighted) ? vw->vlist.highlighted_background_GC : vw->vlist.background_GC, x,y,width,height); } } } } ENDMESSAGE1(PaintMarkMarkOfEntry) } /*---------------------------------------------------*/ /* PaintMarksOfEntries */ /*---------------------------------------------------*/ static void PaintMarksOfEntries(Widget w, XEvent *event _GL_UNUSED, Region region) { VlistWidget vw = (VlistWidget)w; BEGINMESSAGE(PaintMarksOfEntries) PaintMarkOfEntry(w, region, vw->vlist.highlighted,-1, False); if (vw->vlist.allow_marks) { int i= vw->vlist.firstVisible; while (i < vw->vlist.entries) { if (i != vw->vlist.highlighted) PaintMarkMarkOfEntry(w, region, i, False); i++; } } if (vw->vlist.selected != vw->vlist.highlighted && vw->vlist.entries >= 0) PaintMarkOfEntry(w, region, vw->vlist.selected,1, False); ENDMESSAGE(PaintMarksOfEntries) } /*---------------------------------------------------*/ /* PaintVlistWidget */ /*---------------------------------------------------*/ static void PaintVlistWidget(Widget w, XEvent *event, Region region) { Dimension width; char *s, *o; int i, y; VlistWidget vw = (VlistWidget)w; XRectangle rectangle; BEGINMESSAGE(PaintVlistWidget) /* better not allow the widget to grow that large, but that needs fixing * of the Clip widget */ shiftLabel(vw); PaintMarksOfEntries(w, event, region); width = vw->threeD.shadow_width; o = vw->label.label; s = vw->label.label; i = vw->vlist.firstVisible; if (s) while (i > 0 && (s = strchr(s,'\n'))) { s++; i--; } /* This still fails when the list is too long and does not print anything. * Though that is perhaps best fixed by making Clip to enforce a real window * height... vw->label.label = s; vw->threeD.shadow_width = 0; (*SuperClass->core_class.expose) (w, event, region); vw->threeD.shadow_width = width; vw->label.label = o; until Clip is extended, just manually draw each line: */ if (region) XClipBox(region, &rectangle); else { rectangle.x = 0; rectangle.y = 0; rectangle.width = vw->core.width; rectangle.height = vw->core.height; if( rectangle.height >= 0x4000 ) rectangle.height = 0x3fff; } y = vw->label.label_y + vw->vlist.yofs; i = 0; while (s != NULL) { char *nl = strchr(s, '\n'); int len; if (nl) len = nl - s; else len = strlen(s); if (y - vw->vlist.yofs > rectangle.y + rectangle.height) break; if (y + (vw->vlist.ydelta - vw->vlist.yofs) >= rectangle.y) { #ifdef HAVE_XAW3D_INTERNATIONAL if( vw->simple.international == True ) XmbDrawString(XtDisplay(w), XtWindow(w), vw->label.fontset, vw->label.normal_GC, vw->label.label_x, y, s, len); else #endif XDrawString(XtDisplay(w), XtWindow(w), vw->label.normal_GC, vw->label.label_x, y, s, len); } if (nl) s = nl + 1; else s = NULL; y += vw->vlist.ydelta; } ENDMESSAGE(PaintVlistWidget) } /*####################################################################*/ /*####################################################################*/ /* Public Routines */ /*####################################################################*/ /*####################################################################*/ /*###################################################*/ /* VlistSelected */ /*###################################################*/ int VlistSelected(Widget w) { VlistWidget vw = (VlistWidget)w; BEGINMESSAGE(VlistSelected) ENDMESSAGE(VlistSelected) return(vw->vlist.selected); } /*###################################################*/ /* VlistHighlighted */ /*###################################################*/ int VlistHighlighted(Widget w) { VlistWidget vw = (VlistWidget)w; BEGINMESSAGE(VlistHighlighted) ENDMESSAGE(VlistHighlighted) return(vw->vlist.highlighted); } /*###################################################*/ /* VlistEntries */ /*###################################################*/ int VlistEntries(Widget w) { VlistWidget vw = (VlistWidget)w; BEGINMESSAGE(VlistEntries) ENDMESSAGE(VlistEntries) return(vw->vlist.entries); } /*###################################################*/ /* VlistVlist */ /*###################################################*/ char* VlistVlist(Widget w) { VlistWidget vw = (VlistWidget)w; BEGINMESSAGE(VlistVlist) ENDMESSAGE(VlistVlist) return(vw->vlist.vlist); } /*###################################################*/ /* VlistEntryOfPosition */ /*###################################################*/ int VlistEntryOfPosition(Widget w, int y) { VlistWidget vw = (VlistWidget)w; int entry = -1; BEGINMESSAGE(VlistEntryOfPosition) y = y - (int) vw->label.label_y; if (vw->vlist.ydelta > 0) { if (y < 0) entry = -1; else entry = y/vw->vlist.ydelta; } if (entry >= vw->vlist.entries) entry = vw->vlist.entries-1; if (entry >= 0) entry += vw->vlist.firstVisible; IMESSAGE(entry) ENDMESSAGE(VlistEntryOfPosition) return(entry); } /*###################################################*/ /* VlistPositionOfEntry */ /*###################################################*/ void VlistPositionOfEntry(Widget w, int e, int *yuP, int *ylP) { VlistWidget vw = (VlistWidget)w; float h; BEGINMESSAGE(VlistPositionOfEntry) *yuP = *ylP = (int) vw->label.label_y; if (e >= vw->vlist.firstVisible && vw->vlist.entries > 0) { e -= vw->vlist.firstVisible; h = vw->vlist.ydelta; *yuP += (int)((float)e*h); *ylP += (int)((float)(e+1)*h); } ENDMESSAGE(VlistPositionOfEntry) } /*###################################################*/ /* VlistChangeMark */ /*###################################################*/ void VlistChangeMark(Widget w, int entry,int change) { VlistWidget vw = (VlistWidget)w; char *vlist=vw->vlist.vlist; Boolean paint; int lb,ub,st; BEGINMESSAGE(VlistChangeMark) switch (entry) { case XawVlistAll: lb=0; ub=vw->vlist.entries-1; st=1; break; case XawVlistEven: lb=1; ub=vw->vlist.entries-1; st=2; break; case XawVlistOdd: lb=0; ub=vw->vlist.entries-1; st=2; break; case XawVlistCurrent: lb=vw->vlist.selected; ub=vw->vlist.selected; st=1; break; default: lb=entry; ub=entry; st=1; break; } if (ub < 0 || ub >= vw->vlist.entries) { INFMESSAGE(invalid setup) ENDMESSAGE(VlistChangeMark) return; } entry=lb; while (entry <= ub) { paint=False; switch (change) { case XawVlistToggle: switch (vlist[entry]) { case '*': vlist[entry]=' '; paint=True; break; default: vlist[entry]='*'; paint=True; break; } break; case XawVlistSet: vlist[entry]='*'; paint=True; break; case XawVlistUnset: vlist[entry]=' '; paint=True; break; default: INFMESSAGE(invalid action) break; } if (paint) PaintMarkMarkOfEntry(w,NULL,entry,True); entry += st; } ENDMESSAGE(VlistChangeMark) } /*---------------------------------------------------*/ /* vlist_change_mark */ /*---------------------------------------------------*/ static void vlist_change_mark(Widget w, int e, int change, int kind) { VlistWidget vw = (VlistWidget)w; int *eP; BEGINMESSAGE(vlist_change_mark) if (kind < 0) eP = &(vw->vlist.highlighted); else eP = &(vw->vlist.selected); switch (change) { case XawVlistSet: if (*eP >= 0 && *eP < vw->vlist.entries) PaintMarkOfEntry(w,NULL,*eP,kind,True); *eP = -1; if (e >= 0 && e < vw->vlist.entries) { PaintMarkOfEntry(w,NULL,e,kind,False); *eP = e; } break; case XawVlistUnset: if (*eP >= 0 && *eP < vw->vlist.entries) PaintMarkOfEntry(w,NULL,*eP,kind,True); *eP = -1; break; default: INFMESSAGE(invalid action) break; } ENDMESSAGE(vlist_change_mark) } /*###################################################*/ /* VlistChangeSelected */ /*###################################################*/ void VlistChangeSelected(Widget w, int entry, int change) { BEGINMESSAGE(VlistChangeSelected) vlist_change_mark(w,entry,change,1); ENDMESSAGE(VlistChangeSelected) } /*###################################################*/ /* VlistChangeHighlighted */ /*###################################################*/ void VlistChangeHighlighted(Widget w, int entry, int change) { BEGINMESSAGE(VlistChangeHighlighted) vlist_change_mark(w,entry,change,-1); ENDMESSAGE(VlistChangeHighlighted) } /*###################################################*/ /* VlistGetFirstVisible */ /*###################################################*/ int VlistGetFirstVisible(Widget w) { VlistWidget vw = (VlistWidget)w; return vw->vlist.firstVisible; } /*###################################################*/ /* VlistSetFirstVisible */ /*###################################################*/ void VlistSetFirstVisible(Widget w, int newf) { VlistWidget vw = (VlistWidget)w; unsigned int height; BEGINMESSAGE(VlistSetFirstVisible) IIMESSAGE(newf,vw->vlist.entries) if (newf < 0) newf = 0; else if (newf >= vw->vlist.entries) newf = vw->vlist.entries - 1; if (newf == -1) { ENDMESSAGE(VlistSetFirstVisible) return; } IIMESSAGE(newf,vw->vlist.firstVisible) if (newf != vw->vlist.firstVisible) { vw->vlist.firstVisible = newf; /* better not allow the widget to grow that large, but that needs fixing * of the Clip widget */ height = vw->core.height; if( height >= 0x8000 ) height = 0x3fff; IIMESSAGE(vw->core.height,height) XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w), vw->vlist.background_GC, vw->core.x, vw->core.y, vw->core.width, height); Redisplay(w, NULL, NULL); if (vw->vlist.report_callbacks) XtCallCallbackList (w, vw->vlist.report_callbacks, (XtPointer)0); } ENDMESSAGE(VlistSetFirstVisible) } /*###################################################*/ /* VlistMoveFirstVisible */ /*###################################################*/ extern int debug_p; void VlistMoveFirstVisible(Widget w, int start, int ydiff) { VlistWidget vw = (VlistWidget)w; int ly; int newf; BEGINMESSAGE(VlistMoveFirstVisible) IIMESSAGE(start,ydiff) ly = vw->vlist.ydelta; if (debug_p) fprintf(stderr, "move: start=%d ydiff=%d ly=%d\n", start, ydiff, ly); if (ydiff > 0 && ly > ydiff) ydiff=ly; if (ydiff < 0 && ly > -ydiff) ydiff=-ly; if (ydiff >= 0) ydiff += ly/2; else ydiff -= ly/2; newf = start + ydiff/ly; VlistSetFirstVisible(w, newf); ENDMESSAGE(VlistMoveFirstVisible) } /*###################################################*/ /* VlistScrollPosition */ /*###################################################*/ float VlistScrollPosition(Widget w) { VlistWidget vw = (VlistWidget)w; float position; #if 0 printf("Scroll position %d/%d=%f\n", vw->vlist.firstVisible,(int)(vw->vlist.entries), vw->vlist.firstVisible/(float)(vw->vlist.entries)); #endif position = vw->vlist.firstVisible/(float)vw->vlist.entries; INFMESSAGE(VlistScrollPosition) IIMESSAGE(vw->vlist.firstVisible,vw->vlist.entries) FMESSAGE(position) return position; } float VlistVisibleLength(Widget w, unsigned int height) { VlistWidget vw = (VlistWidget)w; float percent; int entriesvisible = -1; if (vw->vlist.ydelta > 0) { entriesvisible = height/vw->vlist.ydelta; } #if 0 printf("fitting %d entries of height %d in %d", entriesvisible, (int)vw->vlist.ydelta, (int)height); #endif if (entriesvisible >= vw->vlist.entries) entriesvisible = vw->vlist.entries; #if 0 printf(", visible percents %d/%d=%f\n", entriesvisible,(int)(vw->vlist.entries), entriesvisible/(float)(vw->vlist.entries)); #endif percent = entriesvisible/(float)(vw->vlist.entries); INFMESSAGE(VlistVisibleLength) IIMESSAGE(entriesvisible,vw->vlist.entries) FMESSAGE(percent) return percent; } int VlistMaxEntriesVisible(Widget w, int height) { VlistWidget vw = (VlistWidget)w; int entriesvisible = -1; if (vw->vlist.ydelta > 0) { entriesvisible = (height - vw->label.label_y)/vw->vlist.ydelta; } INFIMESSAGE(VlistMaxEntriesVisible,entriesvisible) return entriesvisible; } gv-3.7.4/src/paths.h0000664000076400007640000000277111736064614011172 00000000000000/* ** ** paths.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _PATHS_H_ #define _PATHS_H_ #include "config.h" #if HAVE_GCC_VERSION(2,95) #define INC_X11(aaa) #define INC_XMU(aaa) #define INC_XAW(aaa) #define INC_EXT(aaa) #else #define INC_X11(aaa) #define INC_XMU(aaa) #define INC_XAW(aaa) #define INC_EXT(aaa) #endif #endif /* _PATHS_H_ */ gv-3.7.4/src/Frame.c0000664000076400007640000005045211735103745011075 00000000000000/* ** ** Frame.c -- File composition widget ** ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" #include #include "paths.h" #include INC_X11(IntrinsicP.h) #include INC_X11(StringDefs.h) #include INC_XMU(Converters.h) #include INC_XMU(CharSet.h) #include INC_XAW(XawInit.h) #include "FrameP.h" /* #define MESSAGES #define MESSAGES1 */ #include "message.h" /**************************************************************** * * Frame Resources * ****************************************************************/ #define offset(name) XtOffsetOf(FrameRec, frame.name) static XtResource resources[] = { {XtNhSpace, XtCHSpace, XtRDimension, sizeof(Dimension), offset(h_space_nat), XtRImmediate, (XtPointer)4 }, {XtNvSpace, XtCVSpace, XtRDimension, sizeof(Dimension), offset(v_space_nat), XtRImmediate, (XtPointer)4 }, {XtNframeType, XtCFrameType, XtRFrameType, sizeof(XawFrameType), offset(frame_type), XtRImmediate, (XtPointer) XawCHISELED }, {XtNshadowWidth, XtCShadowWidth, XtRDimension, sizeof(Dimension), offset(shadow_width_nat), XtRImmediate, (XtPointer) 2}, {XtNtopShadowPixel, XtCTopShadowPixel, XtRPixel, sizeof(Pixel), offset(top_shadow_pixel), XtRString, XtDefaultForeground}, {XtNbottomShadowPixel, XtCBottomShadowPixel, XtRPixel, sizeof(Pixel), offset(bot_shadow_pixel), XtRString, XtDefaultForeground}, {XtNresize, XtCBoolean, XtRBoolean, sizeof(Boolean), offset(resize), XtRImmediate, (XtPointer) True}, }; #undef offset #define FW_FRAME fw->frame #define FW_CORE fw->core #define FW_COMPOSITE fw->composite #define FW_HSPACE FW_FRAME.h_space #define FW_VSPACE FW_FRAME.v_space #define FW_SHADOW FW_FRAME.shadow_width #define FW_RESIZE FW_FRAME.resize #define FW_NAT_HSPACE FW_FRAME.h_space_nat #define FW_NAT_VSPACE FW_FRAME.v_space_nat #define FW_NAT_SHADOW FW_FRAME.shadow_width_nat #define FW_CHILD_NAT_WIDTH FW_FRAME.child_width_nat #define FW_CHILD_NAT_HEIGHT FW_FRAME.child_height_nat #define FW_CHILD_NAT_BORDER FW_FRAME.child_border_nat #define FW_CHILD_P FW_COMPOSITE.children #define FW_CHILD (*(FW_CHILD_P)) /*************************************************************************** * * Frame class record * ***************************************************************************/ static void ClassInitialize(void); static void Resize(Widget); static void Redisplay(Widget,XEvent *,Region); static void Initialize(Widget,Widget,ArgList,Cardinal*); static void InsertChild(Widget); static void ChangeManaged(Widget); static XtGeometryResult GeometryManager(Widget,XtWidgetGeometry*,XtWidgetGeometry*); static XtGeometryResult QueryGeometry(Widget,XtWidgetGeometry*,XtWidgetGeometry*); static XtGeometryResult LayoutFrame(FrameWidget); static void Destroy(Widget); static void GetDesiredSizeOfChild(Widget); static void GetNaturalSize(FrameWidget,Dimension*,Dimension*); #define SuperClass ((CompositeWidgetClass)&compositeClassRec) FrameClassRec frameClassRec = { { /* superclass */ (WidgetClass)SuperClass, /* class_name */ "Frame", /* size */ sizeof(FrameRec), /* class_initialize */ ClassInitialize, /* class_part_init */ NULL, /* class inited */ FALSE, /* initialize */ Initialize, /* initialize_hook */ NULL, /* realize */ XtInheritRealize, /* actions */ NULL, /* num_actions */ 0, /* resources */ resources, /* resource_count */ XtNumber(resources), /* xrm_class */ NULLQUARK, /* compress_motion */ FALSE, /* compress_exposure */ XtExposeCompressMultiple, /* compress_enterleave*/ FALSE, /* visible_interest */ FALSE, /* destroy */ Destroy, /* resize */ Resize, /* expose */ Redisplay, /* set_values */ NULL, /* set_values_hook */ NULL, /* set_values_almost */ XtInheritSetValuesAlmost, /* get_values_hook */ NULL, /* accept_focus */ NULL, /* intrinsics version */ XtVersion, /* callback offsets */ NULL, /* tm_table */ NULL, /* query_geometry */ QueryGeometry, /* display_accelerator*/ XtInheritDisplayAccelerator, /* extension */ NULL }, { /* composite_class fields */ /* geometry_manager */ GeometryManager, /* change_managed */ ChangeManaged, /* insert_child */ InsertChild, /* delete_child */ XtInheritDeleteChild, /* extension */ NULL }, { /* frame_class fields */ /* dummy */ NULL } }; WidgetClass frameWidgetClass = (WidgetClass) (&frameClassRec); /**************************************************************** * Private Routines ****************************************************************/ /*---------------------------------------------------*/ /* FrameConvertStringToFrameType */ /*---------------------------------------------------*/ #define done(type, value) { \ if (to->addr != NULL) { \ if (to->size < sizeof(type)) { \ to->size = sizeof(type); \ return False; \ } \ *(type*)(to->addr) = (value); \ } else { \ static type static_val; \ static_val = (value); \ to->addr = (XtPointer)&static_val; \ } \ to->size = sizeof(type); \ ENDMESSAGE1(FrameConvertStringToFrameType) \ return True; \ } Boolean FrameConvertStringToFrameType(Display *display, XrmValue *args _GL_UNUSED, Cardinal *num_args _GL_UNUSED, XrmValuePtr from, XrmValuePtr to, XtPointer *converter_data _GL_UNUSED) { String s = (String) from->addr; BEGINMESSAGE1(FrameConvertStringToFrameType) if (XmuCompareISOLatin1(s, "raised") == 0) done(XawFrameType, XawRAISED); if (XmuCompareISOLatin1(s, "sunken") == 0) done(XawFrameType, XawSUNKEN); if (XmuCompareISOLatin1(s, "chiseled") == 0) done(XawFrameType, XawCHISELED); if (XmuCompareISOLatin1(s, "ledged") == 0) done(XawFrameType, XawLEDGED); if (XmuCompareISOLatin1(s, "massiveRaised") == 0) done(XawFrameType,XawFrameMassiveRaised); XtDisplayStringConversionWarning(display, s, XtRFrameType); done(XawFrameType, XawRAISED); } /*---------------------------------------------------*/ /* ClassInitialize */ /*---------------------------------------------------*/ static void ClassInitialize(void) { BEGINMESSAGE(ClassInitialize) XawInitializeWidgetSet(); XtSetTypeConverter(XtRString, XtRFrameType, FrameConvertStringToFrameType, (XtConvertArgList)NULL, 0, XtCacheNone, NULL); ENDMESSAGE(ClassInitialize) } /*---------------------------------------------------*/ /* Initialize */ /*---------------------------------------------------*/ static GC shadow_getGC (Widget w, Pixel pixel) { Screen *scn = XtScreen (w); XtGCMask valuemask; XGCValues myXGCV; GC gc; BEGINMESSAGE(shadow_getGC) if (DefaultDepthOfScreen(scn) > 1) { valuemask = GCForeground; myXGCV.foreground = pixel; gc = XtGetGC(w, valuemask, &myXGCV); } else gc = (GC) NULL; ENDMESSAGE(shadow_getGC) return gc; } static void Initialize(Widget request _GL_UNUSED, Widget new, ArgList args _GL_UNUSED, Cardinal *num_args _GL_UNUSED) { FrameWidget fw = (FrameWidget) new; BEGINMESSAGE(Initialize) FW_FRAME.top_shadow_GC = shadow_getGC(new,FW_FRAME.top_shadow_pixel); FW_FRAME.bot_shadow_GC = shadow_getGC(new,FW_FRAME.bot_shadow_pixel); if (!FW_FRAME.top_shadow_GC || !FW_FRAME.bot_shadow_GC) { INFMESSAGE(disallowing shadows) FW_FRAME.shadow_width_nat = 0; } if (FW_CORE.width == 0) FW_CORE.width = 1; if (FW_CORE.height == 0) FW_CORE.height = 1; FW_SHADOW = FW_HSPACE = FW_VSPACE = 0; FW_CHILD_NAT_WIDTH = FW_CHILD_NAT_HEIGHT = FW_CHILD_NAT_BORDER = 0; ENDMESSAGE(Initialize) } /*---------------------------------------------------*/ /* Destroy */ /*---------------------------------------------------*/ static void Destroy (Widget w) { FrameWidget fw = (FrameWidget) w; BEGINMESSAGE(Destroy) XtReleaseGC(w,FW_FRAME.top_shadow_GC); XtReleaseGC(w,FW_FRAME.bot_shadow_GC); ENDMESSAGE(Destroy) } /*---------------------------------------------------*/ /* Resize */ /*---------------------------------------------------*/ #define MIN_CHILD 4 static void Resize(Widget w) { int x,y,cw,ch,hs,vs,bw,sw; FrameWidget fw = (FrameWidget) w; BEGINMESSAGE(Resize) hs = (int)(FW_NAT_HSPACE); vs = (int)(FW_NAT_VSPACE); sw = (int)(FW_NAT_SHADOW); bw = (int)(FW_CHILD_NAT_BORDER); ch = (int)(FW_CORE.height) - 2*vs -2*sw; cw = (int)(FW_CORE.width) - 2*hs -2*sw; if ((ch0||vs>0||sw>0)) { INFMESSAGE(adjusting size of decorations) while (ch0) { ch +=2; --vs; } while (cw0) { cw +=2; --hs; } while ((cw0) { ch+=2; cw +=2; --sw; } } if (cw <= 0 || ch <= 0) { INFMESSAGE(child too small; will place it off screen) cw = ch = 1; sw = hs = vs = 0; x = -1 - 2*bw; y = -1 - 2*bw; } else { x = hs+sw-bw; y = vs+sw-bw; } IIMESSAGE(hs,vs) IIMESSAGE(cw,ch) IIMESSAGE(bw,sw) FW_HSPACE= (Dimension) hs; FW_VSPACE= (Dimension) vs; FW_SHADOW= (Dimension) sw; XtConfigureWidget(FW_CHILD,x,y,((Dimension)cw),((Dimension)ch),((Dimension)bw)); ENDMESSAGE(Resize) } /*---------------------------------------------------*/ /* Redisplay */ /*---------------------------------------------------*/ #define topPolygon(i,xx,yy) \ top_polygon[i].x = (short) (xx); \ top_polygon[i].y = (short) (yy) #define bottomPolygon(i,xx,yy) \ bottom_polygon[i].x = (short) (xx); \ bottom_polygon[i].y = (short) (yy) void FrameDrawFrame (Widget gw, int x, int y, int w, int h, XawFrameType frame_type, int fw, GC lightgc, GC darkgc) { XPoint top_polygon[6]; XPoint bottom_polygon[6]; BEGINMESSAGE1(FrameDrawFrame) if (lightgc == (GC)NULL ){ XtWarning("FrameDrawFrame: lightgc is NULL."); ENDMESSAGE1(FrameDrawFrame) return; } if (darkgc == (GC)NULL ){ XtWarning("FrameDrawFrame: darkgc is NULL."); ENDMESSAGE1(FrameDrawFrame) return; } if (!XtIsRealized(gw)) { XtWarning("FrameDrawFrame: widget is not realized."); ENDMESSAGE1(FrameDrawFrame) return; } if (frame_type == XawRAISED || frame_type == XawSUNKEN ) { topPolygon (0,x ,y ); bottomPolygon (0,x+w ,y+h ); topPolygon (1,x+w ,y ); bottomPolygon (1,x ,y+h ); topPolygon (2,x+w-fw,y+fw); bottomPolygon (2,x+fw ,y+h-fw); topPolygon (3,x+fw,y+fw ); bottomPolygon (3,x+w-fw,y+h-fw); topPolygon (4,x+fw,y+h-fw); bottomPolygon (4,x+w-fw,y+fw ); topPolygon (5,x ,y+h ); bottomPolygon (5,x+w ,y ); if (frame_type == XawSUNKEN) { XFillPolygon(XtDisplayOfObject(gw), XtWindowOfObject(gw), darkgc, top_polygon, 6, Nonconvex, CoordModeOrigin); XFillPolygon(XtDisplayOfObject(gw), XtWindowOfObject(gw), lightgc, bottom_polygon, 6, Nonconvex, CoordModeOrigin); } else { XFillPolygon(XtDisplayOfObject(gw), XtWindowOfObject(gw), lightgc, top_polygon, 6, Nonconvex, CoordModeOrigin); XFillPolygon(XtDisplayOfObject(gw), XtWindowOfObject(gw), darkgc, bottom_polygon, 6, Nonconvex, CoordModeOrigin); } } else if (frame_type == XawFrameMassiveRaised) { if (fw>=3) { int it,mt,ot; ot = 1; it = 1; mt = fw-ot-it; FrameDrawFrame(gw, x, y, w, h, XawRAISED, ot, lightgc, darkgc); FrameDrawFrame(gw,x+mt+ot,y+mt+ot,w-2*mt-2*ot,h-2*mt-2*ot, XawSUNKEN, it, lightgc, darkgc); } } else if ( frame_type == XawLEDGED ) { int it,ot; it = ot = fw/2; if (fw&1) it += 1; FrameDrawFrame(gw, x, y, w, h, XawRAISED, ot, lightgc, darkgc); FrameDrawFrame(gw,x+ot, y+ot,w-2*ot, h-2*ot, XawSUNKEN, it, lightgc, darkgc); } else if ( frame_type == XawCHISELED ) { int it,ot; it = ot = fw/2; if (fw&1) it += 1; FrameDrawFrame(gw, x, y, w, h, XawSUNKEN, ot, lightgc, darkgc); FrameDrawFrame(gw,x+ot,y+ot,w-2*ot, h-2*ot, XawRAISED, it, lightgc, darkgc); } ENDMESSAGE1(FrameDrawFrame) } #undef topPolygon #undef bottomPolygon static void Redisplay(Widget w, XEvent *event _GL_UNUSED, Region region _GL_UNUSED) { FrameWidget fw = (FrameWidget) w; int wh,ww,sw,bw; BEGINMESSAGE1(Redisplay) bw = (int)FW_CORE.border_width; ww = (int)FW_CORE.width; wh = (int)FW_CORE.height; sw = (int)FW_SHADOW; if (sw == 0 || 2*sw>ww || 2*sw>wh) { INFMESSAGE(not enough space to display anything) ENDMESSAGE1(Redisplay) return; } FrameDrawFrame(w,0,0,ww,wh,FW_FRAME.frame_type,sw, FW_FRAME.top_shadow_GC, FW_FRAME.bot_shadow_GC); ENDMESSAGE1(Redisplay) } /*---------------------------------------------------*/ /* GetDesiredSizeOfChild */ /*---------------------------------------------------*/ static void GetDesiredSizeOfChild(Widget child) { FrameWidget fw; BEGINMESSAGE(GetDesiredSizeOfChild) fw = (FrameWidget) XtParent(child); if (XtIsManaged(child)) { XtWidgetGeometry desired; INFSMESSAGE(is managed,XtName(child)) XtQueryGeometry (child, (XtWidgetGeometry *)NULL, &desired); FW_CHILD_NAT_BORDER = desired.border_width; FW_CHILD_NAT_WIDTH = desired.width; FW_CHILD_NAT_HEIGHT = desired.height; } else { INFSMESSAGE(not managed,XtName(child)) FW_CHILD_NAT_BORDER = 0; FW_CHILD_NAT_WIDTH = 0; FW_CHILD_NAT_HEIGHT = 0; } IIMESSAGE(FW_CHILD_NAT_WIDTH,FW_CHILD_NAT_HEIGHT) IMESSAGE(FW_CHILD_NAT_BORDER) ENDMESSAGE(GetDesiredSizeOfChild) } /*---------------------------------------------------*/ /* InsertChild */ /*---------------------------------------------------*/ static void InsertChild(Widget child) { BEGINMESSAGE(InsertChild) (*SuperClass->composite_class.insert_child) (child); GetDesiredSizeOfChild(child); ENDMESSAGE(InsertChild) } /*---------------------------------------------------*/ /* GetNaturalSize */ /*---------------------------------------------------*/ static void GetNaturalSize(FrameWidget fw, Dimension *wP, Dimension *hP) { BEGINMESSAGE(GetNaturalSize) *wP = FW_CHILD_NAT_WIDTH + 2*FW_NAT_SHADOW +2*FW_NAT_HSPACE; *hP = FW_CHILD_NAT_HEIGHT + 2*FW_NAT_SHADOW +2*FW_NAT_VSPACE; ENDMESSAGE(GetNaturalSize) } /*---------------------------------------------------*/ /* ChangeManaged */ /*---------------------------------------------------*/ static void ChangeManaged(Widget w) { FrameWidget fw = (FrameWidget) w; BEGINMESSAGE(ChangeManaged) GetDesiredSizeOfChild(FW_CHILD); LayoutFrame(fw); ENDMESSAGE(ChangeManaged) } /*---------------------------------------------------*/ /* GeometryManager */ /*---------------------------------------------------*/ #define IS_REQUEST(fff) (request->request_mode & fff) static XtGeometryResult GeometryManager(Widget child, XtWidgetGeometry *request, XtWidgetGeometry *geometry_return _GL_UNUSED) { FrameWidget fw; XtGeometryResult answer; int changed; BEGINMESSAGE(GeometryManager) INFSMESSAGE(received request from child, XtName(child)) if (!(request->request_mode & (CWWidth | CWHeight | CWBorderWidth))) { INFMESSAGE(request not of interest) ENDMESSAGE(GeometryManager) return XtGeometryYes; } if (request->request_mode & XtCWQueryOnly) { /* query requests are not properly implemented ... ###jp### */ INFMESSAGE(request is query only and will be denied) ENDMESSAGE(GeometryManager) return XtGeometryNo; } INFIIMESSAGE(current size of child:,child->core.width,child->core.height) fw = (FrameWidget) XtParent(child); changed = 0; if (IS_REQUEST(CWBorderWidth)) { IIMESSAGE(request->border_width,child->core.border_width) FW_CHILD_NAT_BORDER = request->border_width; if (FW_CHILD_NAT_BORDER != child->core.border_width) changed = 1; } if (IS_REQUEST(CWWidth)) { IIMESSAGE(request->width,child->core.width) FW_CHILD_NAT_WIDTH = request->width; if (FW_CHILD_NAT_WIDTH != child->core.width) changed = 1; } if (IS_REQUEST(CWHeight)) { IIMESSAGE(request->height,child->core.height) FW_CHILD_NAT_HEIGHT = request->height; if (FW_CHILD_NAT_HEIGHT != child->core.height) changed = 1; } if (changed) { answer = LayoutFrame(fw); INFIIMESSAGE(new size of child:,child->core.width,child->core.height) INFIMESSAGE(new border width of child:,child->core.border_width) ENDMESSAGE(GeometryManager) return answer; } else { ENDMESSAGE(GeometryManager) return XtGeometryYes; } } /*---------------------------------------------------*/ /* QueryGeometry */ /*---------------------------------------------------*/ static XtGeometryResult QueryGeometry(Widget w, XtWidgetGeometry *request, XtWidgetGeometry *preferred_return) { FrameWidget fw = (FrameWidget)w; Dimension nw,nh; BEGINMESSAGE(QueryGeometry) if (fw->composite.children && fw->composite.children[0]) GetDesiredSizeOfChild(fw->composite.children[0]); GetNaturalSize(fw,&nw,&nh); preferred_return->request_mode = (CWWidth|CWHeight); preferred_return->width = nw; preferred_return->height = nh; if ( !(request->request_mode & CWWidth) || !(request->request_mode & CWHeight) || ((request->request_mode & CWWidth) && nw != request->width) || ((request->request_mode & CWHeight) && nh != request->height) ) { INFMESSAGE(XtGeometryAlmost) ENDMESSAGE(QueryGeometry) return XtGeometryAlmost; } if ((nw == w->core.width) && (nh == w->core.height)) { INFMESSAGE(XtGeometryNo) ENDMESSAGE(QueryGeometry) return XtGeometryNo; } INFMESSAGE(XtGeometryYes) ENDMESSAGE(QueryGeometry) return XtGeometryYes; } /*---------------------------------------------------*/ /* LayoutFrame */ /*---------------------------------------------------*/ static XtGeometryResult LayoutFrame(FrameWidget fw) { XtWidgetGeometry request; XtGeometryResult answer; BEGINMESSAGE(LayoutFrame) GetNaturalSize(fw,&request.width,&request.height); if (FW_RESIZE && (request.width != fw->core.width || request.height != fw->core.height)) { request.request_mode = (CWWidth | CWHeight); INFMESSAGE(will request new geometry from parent) answer = XtMakeGeometryRequest((Widget) fw, &request, &request); switch (answer) { case XtGeometryYes: INFMESSAGE(XtGeometryYes) INFMESSAGE(parent reconfigured window) break; case XtGeometryAlmost: INFIIMESSAGE(XtGeometryAlmost:,request.width,request.height) INFMESSAGE(requesting approval of these values) answer = XtMakeGeometryRequest((Widget) fw, &request, &request); if (answer!=XtGeometryYes) { INFIIMESSAGE(parent proposes,request.width,request.height) fprintf(stderr,"FrameWidget: Warning, parent didn't accept the size he proposed."); INFMESSAGE(giving up) answer = XtGeometryNo; } else { INFMESSAGE(XtGeometryYes) INFMESSAGE(parent reconfigured window) } break; case XtGeometryNo: INFMESSAGE(XtGeometryNo) answer = XtGeometryNo; break; case XtGeometryDone: INFMESSAGE(XtGeometryDone) /* never reached */ break; } if (answer == XtGeometryYes) { Resize((Widget)fw); answer = XtGeometryDone; } } else { INFMESSAGE(XtGeometryDone) Resize((Widget)fw); answer = XtGeometryDone; } ENDMESSAGE(LayoutFrame) return answer; } gv-3.7.4/src/ScrollbarP.h0000664000076400007640000000700311735103745012105 00000000000000/* ** ** ScrollbarP.h ** ** Copyright (C) 1994, 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _ScrollbarP_h #define _ScrollbarP_h #include "paths.h" #include INC_XAW(ThreeDP.h) #include "Scrollbar.h" typedef struct { /* public */ Pixel foreground; /* thumb foreground color */ XtOrientation orientation; /* horizontal or vertical */ XtCallbackList scrollProc; /* proportional scroll */ XtCallbackList thumbProc; /* jump (to position) scroll */ XtCallbackList jumpProc; /* same as thumbProc but pass data by ref */ Pixmap thumb; /* thumb color */ float top; /* relative position of top of thumb */ float shown; /* What percent is shown in the win */ Dimension length; /* either height or width */ Dimension thickness; /* either width or height */ Dimension min_thumb; /* minium size for the thumb. */ Dimension thumb_top_indent; Dimension thumb_side_indent; Boolean show_arrows; /* if the arrows are shown */ Dimension arrow_top_indent; /* arrow indentation top <-> border */ Dimension arrow_side_indent; /* arrow indentation side <-> border */ int interval; /* time base for autoscroll (milliseconds) */ int delay; /* time base for autoscroll (milliseconds) */ Boolean use_dynamic; /* if the dynamic arrow scrolling is used */ /* private */ Dimension dynamic; /* dynamic autoscroll time interval */ XtIntervalId timer_id; /* autorepeat timer; remove on destruction */ char scroll_mode; /* 0:none 1:up/back 2:track 3:down/forward */ GC gc; /* a (shared) gc */ Dimension topLoc; /* position of top of thumb */ Dimension shownLength; /* shown length of thumb */ Dimension shadow_base; /* the shadow width used to derive arrow_shadow, etc. */ int arrow_width; int arrow_height; int arrow_top_to_border; int arrow_to_border; int arrow_shadow; int thumb_shadow; int thumb_to_arrow; int thumb_to_border; } ScrollbarPart; typedef struct _ScrollbarRec { CorePart core; SimplePart simple; ThreeDPart threeD; ScrollbarPart scrollbar; } ScrollbarRec; typedef struct {int empty;} ScrollbarClassPart; typedef struct _ScrollbarClassRec { CoreClassPart core_class; SimpleClassPart simple_class; ThreeDClassPart threeD_class; ScrollbarClassPart scrollbar_class; } ScrollbarClassRec; #define _EXTERN_ extern _EXTERN_ ScrollbarClassRec scrollbarClassRec; #undef _EXTERN_ #endif /* _ScrollbarP_h */ gv-3.7.4/src/resource.c0000664000076400007640000006235111735103746011674 00000000000000/* ** ** resource.c ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #include "ac_config.h" #define _GV_RESOURCE_C_ /* #define MESSAGES */ #include "message.h" #include #include "config.h" #include #include #include "paths.h" #include INC_X11(Intrinsic.h) #include "types.h" #include "config.h" #include "file.h" #include "main_resources.h" #include "main_globals.h" #include "resource.h" # include # include # include # ifndef USER_DEFAULTS # define USER_DEFAULTS "~/.gv" # endif extern char versionCompatibility[]; static String class_resources[] = { # include "gv_class.h" NULL }; #include "gv-i18n.h" String intern_resources[] = { # include INTERN_RESOURCES_H NULL }; #ifdef USE_FALLBACK_STYLES # ifdef FALLBACK_STYLE_1_H static String fallback_style_1[] = { # include FALLBACK_STYLE_1_H NULL }; # endif # ifdef FALLBACK_STYLE_2_H static String fallback_style_2[] = { # include FALLBACK_STYLE_2_H NULL }; # endif # ifdef FALLBACK_STYLE_3_H static String fallback_style_3[] = { # include FALLBACK_STYLE_3_H NULL }; # endif #endif static String resource_system_file = NULL; static String resource_user_file = NULL; static String resource_user_file_symb = NULL; static int haveXUSERFILESEARCHPATH; static String resource_style_file = NULL; static String resource_ad_file = NULL; static char* resource_mergeFileIntoDatabase(XrmDatabase*,char*); extern int debug_p; /*####################################################### resource_freeData #######################################################*/ void resource_freeData() { BEGINMESSAGE(resource_freeData) XtFree(resource_system_file); XtFree(resource_user_file); XtFree(resource_style_file); XtFree(resource_ad_file); ENDMESSAGE(resource_freeData) } /*####################################################### resource_buildDatabase #######################################################*/ XrmDatabase resource_buildDatabase ( Display *display, char *app_class, char *app_name, int *argcP _GL_UNUSED, char **argv _GL_UNUSED) { XrmDatabase gvdb = XtDatabase(display); XrmDatabase db = NULL; String *sP; String s,t, rpath; String tildeGv; char* locale; int i18n; char tmp[GV_MAX_FILENAME_LENGTH]; char locale1[100], locale2[100], locale3[100]; char loc_lang[100], loc_terr[100], loc_cs[100], loc_mod[100]; BEGINMESSAGE(resource_buildDatabase) /* ### class resources ################# */ INFMESSAGE(merging class resources into database) sP = class_resources; while (*sP) XrmPutLineResource(&db,*sP++); /* ### system resources ################# */ INFMESSAGE(checking for system resources) rpath = XtMalloc (strlen (GV_LIBDIR) + strlen ("/gv_system.ad") + 1); rpath[0] = '\0'; strcat (rpath, GV_LIBDIR); strcat (rpath, "/gv_system.ad"); if (rpath) { INFSMESSAGE(merging system resource file into database,rpath) XrmCombineFileDatabase(rpath,&db,True); resource_system_file = rpath; } XrmCombineDatabase (gvdb, &db, True); /* CombineDatabase destroyed gvdb==XtDatabase(display), which * XtResolvePathname will access soon, so repair it: */ XrmSetDatabase (display, db); /* ### user resources ################# */ INFMESSAGE(checking for user resources) strcpy(tmp,USER_DEFAULTS); file_translateTildeInPath(tmp, sizeof(tmp)); if (!file_fileIsNotUseful(tmp)) { s = XtNewString(tmp); tildeGv = USER_DEFAULTS; haveXUSERFILESEARCHPATH = 0; } else { s = getenv("XUSERFILESEARCHPATH"); if (s) s = XtResolvePathname(display,NULL,NULL,NULL,s,NULL,0,NULL); tildeGv = s; haveXUSERFILESEARCHPATH = 1; } if (s) { INFSMESSAGE(merging user resource file into database,s) XrmPutLineResource(&db,"GV.version: gv 0.0.0"); XrmCombineFileDatabase(s,&db,True); resource_user_file = s; resource_user_file_symb = tildeGv; } else { resource_user_file = XtNewString(tmp); } /* ### Loading localisation ### */ i18n = 0; locale = 0; locale = getenv("LC_ALL"); if ( !locale || !*locale ) locale = getenv("LC_MESSAGES"); if ( !locale || !*locale ) locale = getenv("LANG"); if ( !locale || !*locale ) locale = "C"; { char* cL, * cP; cP = loc_lang; cL = locale; *loc_terr = 0; *loc_cs = 0; *loc_mod = 0; while (*cL) { if ( *cL == '_' ) { *cP = 0; cP = loc_terr; } if ( *cL == '.' ) { *cP = 0; cP = loc_cs; } if ( *cL == '@' ) { *cP = 0; cP = loc_mod; } *cP++ = *cL++; } *cP = 0; } s = resource_getResource(db,app_class,app_name, "international",0); if (s == NULL || !strcasecmp(s, "False")) { sprintf(locale1, "noint:%s%s", loc_lang, loc_terr); sprintf(locale2, "noint:%s", loc_lang); strcpy(locale3, "C"); } else { strcpy(locale1, locale); sprintf(locale2, "%s%s%s", loc_lang, loc_terr, loc_cs); sprintf(locale3, "%s%s", loc_lang, loc_cs); } if (debug_p) { printf("Locale1=%s\n", locale1); printf("Locale2=%s\n", locale2); printf("Locale3=%s\n", locale3); } if (!i18n) { struct stat buf; strcpy(tmp,USER_DEFAULTS "-"); strcat(tmp, locale1); file_translateTildeInPath(tmp, sizeof(tmp)); if (!stat(tmp, &buf)) { i18n = 1; XrmCombineFileDatabase(tmp,&db,True); } } if (!i18n) { struct stat buf; strcpy(tmp,GV_LIBDIR "/nls/"); strcat(tmp, locale1); strcat(tmp, ".dat"); if (!stat(tmp, &buf)) { i18n = 1; XrmCombineFileDatabase(tmp,&db,True); } } if (!i18n) { sP = getI18N(locale1); if (sP) { i18n = 1; while (*sP) XrmPutLineResource(&db,*sP++); } } if (!i18n) { struct stat buf; strcpy(tmp,USER_DEFAULTS "-"); strcat(tmp, locale2); file_translateTildeInPath(tmp, sizeof(tmp)); if (!stat(tmp, &buf)) { i18n = 1; XrmCombineFileDatabase(tmp,&db,True); } } if (!i18n) { struct stat buf; strcpy(tmp,GV_LIBDIR "/nls/"); strcat(tmp, locale2); strcat(tmp, ".dat"); if (!stat(tmp, &buf)) { i18n = 1; XrmCombineFileDatabase(tmp,&db,True); } } if (!i18n) { sP = getI18N(locale2); if (sP) { i18n = 1; while (*sP) XrmPutLineResource(&db,*sP++); } } if (!i18n) { struct stat buf; strcpy(tmp,USER_DEFAULTS "-"); strcat(tmp, locale3); file_translateTildeInPath(tmp, sizeof(tmp)); if (!stat(tmp, &buf)) { i18n = 1; XrmCombineFileDatabase(tmp,&db,True); } } if (!i18n) { struct stat buf; strcpy(tmp,GV_LIBDIR "/nls/"); strcat(tmp, locale3); strcat(tmp, ".dat"); if (!stat(tmp, &buf)) { i18n = 1; XrmCombineFileDatabase(tmp,&db,True); } } if (!i18n) { sP = getI18N(locale3); if (sP) { i18n = 1; while (*sP) XrmPutLineResource(&db,*sP++); } } orientations[0] = resource_getResource(db,app_class,app_name, "portrait.Label",0); orientations[1] = resource_getResource(db,app_class,app_name, "landscape.Label",0); orientations[2] = resource_getResource(db,app_class,app_name, "upsidedown.Label",0); orientations[3] = resource_getResource(db,app_class,app_name, "seascape.Label",0); popupVerb[0] = resource_getResource(db,app_class,app_name, "gs.errors.none.Label",0); popupVerb[1] = resource_getResource(db,app_class,app_name, "gs.errors.errors.Label",0); popupVerb[2] = resource_getResource(db,app_class,app_name, "gs.errors.all.Label",0); confirm_quit_styles[0] = resource_getResource(db,app_class,app_name, "quitstyle.never.Label",0); confirm_quit_styles[1] = resource_getResource(db,app_class,app_name, "quitstyle.whenprocessing.Label",0); confirm_quit_styles[2] = resource_getResource(db,app_class,app_name, "quitstyle.always.Label",0); title_styles[0] = resource_getResource(db,app_class,app_name, "title.notitle.Label",0); title_styles[1] = resource_getResource(db,app_class,app_name, "title.documenttitle.Label",0); title_styles[2] = resource_getResource(db,app_class,app_name, "title.filename.Label",0); automaticLabel = resource_getResource(db,app_class,app_name, "automatic.Label",0); saveCurrentPageLabel = resource_getResource(db,app_class,app_name, "strings.saveCurrentPage",0); saveMarkedPagesLabel = resource_getResource(db,app_class,app_name, "strings.saveMarkedPages",0); saveDocumentLabel = resource_getResource(db,app_class,app_name, "strings.saveDocument",0); saveAsPDFLabel = resource_getResource(db,app_class,app_name, "strings.saveAsPDF",0); openFileLabel = resource_getResource(db,app_class,app_name, "strings.openFile",0); passwordPromptLabel = resource_getResource(db,app_class,app_name, "strings.passwordPrompt",0); passwordRequiredLabel = resource_getResource(db,app_class,app_name, "strings.passwordRequired",0); quitConfirmLabel = resource_getResource(db,app_class,app_name, "strings.quitConfirm",0); putTexCommandLabel = resource_getResource(db,app_class,app_name, "strings.putTexCommand",0); texCommandLabel = resource_getResource(db,app_class,app_name, "strings.texCommand",0); stillInProgressLabel = resource_getResource(db,app_class,app_name, "strings.stillInProgress",0); execOfFailedLabel = resource_getResource(db,app_class,app_name, "strings.execOfFailed",0); copyrightTranslationLabel = resource_getResource(db,app_class,app_name, "strings.copyrightTranslation",0); /* ### command line resources ################# */ /* * When managing --[no]feature options, please put the * --nofeature management _after_ the --feature one. * * -jemarch */ if (antialias_p) { resource_putResource (&db, app_name, ".antialias", "True"); } if (noantialias_p) { resource_putResource (&db, app_name, ".antialias", "False"); } if (safer_p) { resource_putResource (&db, app_name, ".gsSafer", "True"); } if (nosafer_p) { resource_putResource (&db, app_name, ".gsSafer", "False"); } if (safedir_p) { resource_putResource (&db, app_name, ".gsSafeDir", "True"); } if (nosafedir_p) { resource_putResource (&db, app_name, ".gsSafeDir", "False"); } if (pixmap_p) { resource_putResource (&db, app_name, ".useBackingPixmap", "True"); } if (nopixmap_p) { resource_putResource (&db, app_name, ".useBackingPixmap", "False"); } if (color_p) { resource_putResource (&db, app_name, "*Ghostview.palette", "Color"); } if (grayscale_p) { resource_putResource (&db, app_name, "*Ghostview.palette", "Grayscale"); } if (spartan_p) { char *spartan_filename = (char *) XtMalloc (strlen(GV_LIBDIR) + strlen ("/gv_spartan.dat") + 1); spartan_filename[0] = '\0'; strcat(spartan_filename, GV_LIBDIR); strcat(spartan_filename, "/gv_spartan.dat"); resource_putResource (&db, app_name, ".style", spartan_filename); XtFree (spartan_filename); } if (widgetless_p) { char *widgetless_filename = (char *) XtMalloc (strlen(GV_LIBDIR) + strlen ("/gv_widgetless.dat") + 1); widgetless_filename[0] = '\0'; strcat(widgetless_filename, GV_LIBDIR); strcat(widgetless_filename, "/gv_widgetless.dat"); resource_putResource (&db, app_name, ".style", widgetless_filename); XtFree (widgetless_filename); } if (quiet_p) { resource_putResource (&db, app_name, ".gsQuiet", "True"); } if (infoverbose_p != -1) { if (infoverbose_p == 0) resource_putResource (&db, app_name, ".infoVerbose", "Silent"); if (infoverbose_p == 1) resource_putResource (&db, app_name, ".infoVerbose", "Errors"); if (infoverbose_p == 2) resource_putResource (&db, app_name, ".infoVerbose", "All"); } if (monochrome_p) { resource_putResource (&db, app_name, "*Ghostview.palette", "Monochrome"); } if (noquiet_p) { resource_putResource (&db, app_name, ".gsQuiet", "False"); } if (media_p) { resource_putResource (&db, app_name, ".pageMedia", media_value); } if (orientation_p) { resource_putResource (&db, app_name, ".orientation", orientation_value); } if (page_p) { resource_putResource (&db, app_name, ".page", page_value); } if (center_p) { resource_putResource (&db, app_name, ".autoCenter", "True"); } if (nocenter_p) { resource_putResource (&db, app_name, ".autoCenter", "False"); } if (scale_p) { resource_putResource (&db, app_name, ".scale", scale_value); } if (magstep_p) { resource_putResource (&db, app_name, ".scale", magstep_value); } if (scalebase_p) { resource_putResource (&db, app_name, ".scaleBase", scalebase_value); } if (resize_p) { resource_putResource (&db, app_name, ".autoResize", "True"); } if (noresize_p) { resource_putResource (&db, app_name, ".autoResize", "False"); } if (swap_p) { resource_putResource (&db, app_name, ".swapLandscape", "True"); } if (noswap_p) { resource_putResource (&db, app_name, ".swapLandscape", "False"); } if (dsc_p) { resource_putResource (&db, app_name, ".respectDSC", "True"); } if (nodsc_p) { resource_putResource (&db, app_name, ".respectDSC", "False"); } if (eof_p) { resource_putResource (&db, app_name, ".ignoreEOF", "True"); } if (noeof_p) { resource_putResource (&db, app_name, ".ignoreEOF", "False"); } if (watch_p) { resource_putResource (&db, app_name, ".watchFile", "True"); } if (nowatch_p) { resource_putResource (&db, app_name, ".watchFile", "False"); } if (ad_p) { resource_putResource (&db, app_name, ".ad", ad_value); } if (style_p) { resource_putResource (&db, app_name, ".style", style_value); } if (arguments_p) { resource_putResource (&db, app_name, ".arguments", arguments_value); } /* ### style resources ######################## */ INFMESSAGE(checking for style resources) s = resource_getResource(db,app_class,app_name,"style","Style"); if (s) { t=NULL; # ifdef USE_FALLBACK_STYLES sP = NULL; # ifdef FALLBACK_STYLE_1_DAT if (!strcmp(GV_LIBDIR "/" FALLBACK_STYLE_1_DAT,s)) sP = fallback_style_1; if (!strcmp(FALLBACK_STYLE_1_DAT,s)) sP = fallback_style_1; # endif # ifdef FALLBACK_STYLE_2_DAT if (!strcmp(GV_LIBDIR "/" FALLBACK_STYLE_2_DAT,s)) sP = fallback_style_2; if (!strcmp(FALLBACK_STYLE_2_DAT,s)) sP = fallback_style_2; # endif # ifdef FALLBACK_STYLE_3_DAT if (!strcmp(GV_LIBDIR "/" FALLBACK_STYLE_3_DAT,s)) sP = fallback_style_3; if (!strcmp(FALLBACK_STYLE_3_DAT,s)) sP = fallback_style_3; # endif if (sP) { INFMESSAGE(merging fallback style resources into database) while (*sP) XrmPutLineResource(&db,*sP++); s = NULL; } else { INFSMESSAGE(merging style resource file into database,s) t = resource_mergeFileIntoDatabase(&db,s); if (!t) { fprintf(stderr,"%s: Style file '%s' not found - ignored\n",app_name,s); s=NULL; } else s = t; } # else /* * Do not use fallback styles * */ INFSMESSAGE(merging style resource file into database,s) t = resource_mergeFileIntoDatabase(&db,s); if (!t) { fprintf(stderr,"%s: Style file '%s' not found - ignored\n",app_name,s); s=NULL; } else s = t; # endif if (s) { s = XtNewString(s); resource_style_file = s; } XtFree(t); } /* ### ad resources ######################## */ INFMESSAGE(checking for ad resources) s = resource_getResource(db,app_class,app_name,"ad","Ad"); if (s) { INFSMESSAGE(merging ad resource file into database,s) t = resource_mergeFileIntoDatabase(&db,s); if (!t) { fprintf(stderr,"%s: ad file '%s' not found - ignored\n",app_name,s); s=NULL; } else s = t; if (s) { s = XtNewString(s); resource_ad_file = s; } XtFree(t); } ENDMESSAGE(resource_buildDatabase) return (db); } /*####################################################### resource_putResource #######################################################*/ void resource_putResource (XrmDatabase *db, char *app_name, char *resource_class, char *resource_value) { char resource_name[GV_MAX_FILENAME_LENGTH]; sprintf(resource_name, "%s%s", app_name, resource_class); XrmPutStringResource (db, resource_name, resource_value); } /*####################################################### resource_getResource #######################################################*/ char *resource_getResource(db,app_class,app_name,name_val,class_val) XrmDatabase db; char *app_class; char *app_name; char *name_val; char *class_val; { char *result=NULL; XrmValue rm_value; String str_type; char str_name[GV_MAX_FILENAME_LENGTH],str_class[GV_MAX_FILENAME_LENGTH]; Bool success=False; BEGINMESSAGE(resource_getResource) if (!class_val) class_val=name_val; sprintf(str_name, "%s.%s",app_name,name_val); sprintf(str_class,"%s.%s",app_class,class_val); INFSMESSAGE(looking for,str_class) success = XrmGetResource(db,str_name,str_class,&str_type,&rm_value); if (success && rm_value.size>1) { result = (char*) rm_value.addr; INFSMESSAGE(found entry,result) } else { result = NULL; INFMESSAGE(no entry found) } ENDMESSAGE(resource_getResource) return(result); } /*####################################################### resource_checkGeometryResource #######################################################*/ #ifdef max # undef max #endif #define max(a,b) ((a)>(b)?(a):(b)) int resource_checkGeometryResource(dbP,app_class,app_name) XrmDatabase *dbP; char *app_class; char *app_name; { char tmp[GV_MAX_FILENAME_LENGTH]; char *pos; int gx=0,gy=0; int flag; int dim_forced=0; char g[20]; unsigned int gwidth=0,gheight=0; BEGINMESSAGE(resource_checkGeometryResource) pos = resource_getResource(*dbP,app_class,app_name,"geometry","Geometry"); if (!pos) { ENDMESSAGE(resource_checkGeometryResource) return(dim_forced); } INFSMESSAGE(found geometry resource,pos) flag=XParseGeometry(pos,&gx,&gy,&gwidth,&gheight); IIMESSAGE(gx,gy) IIMESSAGE(gwidth,gheight) if (gwidth) gwidth = max(gwidth,GV_MINIMUM_SIZE); if (gheight) gheight = max(gheight,GV_MINIMUM_SIZE); tmp[0]='\0'; if (flag&WidthValue) { sprintf(g,"%d",(Dimension)gwidth); strcat(tmp,g); dim_forced=1; } if (flag&HeightValue) { sprintf(g,"x%d",(Dimension)gheight); strcat(tmp,g); dim_forced=1; } if (flag&XValue) { sprintf(g,"%s%d",((flag&XNegative) ? (gx ? "":"-") : "+"),gx); strcat(tmp,g); } if (flag&YValue) { sprintf(g,"%s%d",((flag&YNegative) ? (gy ? "":"-") : "+"),gy); strcat(tmp,g); } if (tmp[0]) { char s[50]; INFSMESSAGE(corrected geometry,tmp) sprintf(s,"%s.geometry",app_name); SMESSAGE(s) SMESSAGE(tmp) XrmPutStringResource(dbP,s,tmp); # ifdef MESSAGES pos = resource_getResource(*dbP,app_class,app_name,"geometry","Geometry"); if (pos) { INFSMESSAGE(check:,pos) } # endif } ENDMESSAGE(resource_checkGeometryResource) return(dim_forced); } /*####################################################### resource_checkResources #######################################################*/ int resource_checkResources(app_name,v,vc) char *app_name; char *v; char *vc; { int n,nc,v1,v2,v3,v4,v1c,v2c,v3c,v4c,r=1; BEGINMESSAGE(resource_checkResources) v1 = v2 = v3 = v4 = v1c = v2c = v3c = v4c = 0; n = sscanf(v,"%*s %d.%d.%d.%d",&v1,&v2,&v3,&v4); nc = sscanf(vc,"%*s %d.%d.%d.%d",&v1c,&v2c,&v3c,&v4c); if ((n < 2) || (nc < 2) || (v1 < v1c) || (v1 == v1c && v2 < v2c) || (v1 == v1c && v2 == v2c && v3 < v3c) || (v1 == v1c && v2 == v2c && v3 == v3c && v4 < v4c)) { fprintf(stderr,"%s Error: incompatible resources.\n",app_name); fprintf(stderr,"One of the files\n"); if (resource_system_file) fprintf(stderr," %s\n",resource_system_file); if (resource_user_file) fprintf(stderr," %s\n",resource_user_file); if (resource_style_file) fprintf(stderr," %s\n",resource_style_file); if (resource_ad_file) fprintf(stderr," %s\n",resource_ad_file); fprintf(stderr,"belongs to an older version of gv and cannot be used.\n"); if (resource_user_file) fprintf(stderr,"Quite probably your %s is too old.\n", resource_user_file_symb); if (resource_user_file) { if (haveXUSERFILESEARCHPATH) { if (access(resource_user_file, W_OK)) { fprintf(stderr, "For a correct installation the following restrictions must be met:\n\n"); fprintf(stderr, "* Every directory contained in XUSERFILESEARCHPATH where the system also\nsearches for app-defaults does not contain a file 'GV'.\n\n"); fprintf(stderr, "* GV is contained just in direectories of XUSERFILESEARCHPATH where the system\ndoes not search for app-defaults, and the GV.version resource is contained in\nthis GV file (this file is used instead of ~/.gv if ~/.gv is not present).\n\n"); fprintf(stderr, "* The systems app-defaults directories which are not comntained in\nXUSERFILESEARCHPATH may contain a GV file.If so, it SHOULD not contain a\n'GV.version' resource.\n\n"); fprintf(stderr, "If necessary, ask your system administrator for assistence.\n\n"); fprintf(stderr,"A workaround to make GNU gv working is\nto provide ~/.gv by running 'touch ~/.gv && gv-update-userconfig'.\n"); } else { fprintf(stderr,"Please remove or update the outdated file.\n"); fprintf(stderr,"Running gv-update-userconfig %s should help\nby removing all incompatible resources.\n", resource_user_file); fprintf(stderr,"Another option that non-admins can do to make GNU gv working is\nto provide ~/.gv by running 'touch ~/.gv && gv-update-userconfig'.\n"); } } else { fprintf(stderr,"Please remove or update the outdated file.\n"); fprintf(stderr,"Running gv-update-userconfig should help\nby removing all incompatible resources.\n"); } } r=0; } ENDMESSAGE(resource_checkResources) return(r); } /*####################################################### resource_userResourceFile() #######################################################*/ char *resource_userDefaultsFile() { char *s; BEGINMESSAGE(resource_userResourceFile) if (resource_ad_file) s = resource_ad_file; else if (resource_user_file) s = resource_user_file; else s = USER_DEFAULTS; s = XtNewString(s); return(s); ENDMESSAGE(resource_userResourceFile) } /*--------------------------------------------------------------- resource_mergeFileIntoDatabase ---------------------------------------------------------------*/ static char* resource_mergeFileIntoDatabase(dbP,name) XrmDatabase *dbP; char *name; { char tmp[GV_MAX_FILENAME_LENGTH]; BEGINMESSAGE(resource_mergeFileIntoDatabase) if (!name) { ENDMESSAGE(resource_mergeFileIntoDatabase) return(name); } strcpy(tmp,name); file_translateTildeInPath(tmp, sizeof(tmp)); if (tmp[0] != '/') { fprintf(stderr, "Ignoring resource file '%s'='%s' as no absolute path!\n", name, tmp); name = NULL; } else if (file_fileIsNotUseful(tmp)) { INFSMESSAGE(not useful,tmp) name = NULL; } else { INFSMESSAGE(merging,tmp) XrmCombineFileDatabase(tmp,dbP,True); name = XtNewString(tmp); } ENDMESSAGE(resource_mergeFileIntoDatabase) return(name); } String automaticLabel; String saveCurrentPageLabel; String saveMarkedPagesLabel; String saveDocumentLabel; String saveAsPDFLabel; String openFileLabel; String passwordPromptLabel; String passwordRequiredLabel; String quitConfirmLabel; String putTexCommandLabel, texCommandLabel; String stillInProgressLabel; String execOfFailedLabel; String copyrightTranslationLabel; gv-3.7.4/src/gv_odd.xbm0000664000076400007640000000055611437764362011660 00000000000000#define odd_width 13 #define odd_height 23 static unsigned char odd_bits[] = { 0xff, 0x1f, 0x73, 0x10, 0x61, 0x17, 0x73, 0x10, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0x7f, 0x10, 0x7f, 0x17, 0x7f, 0x10, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0x73, 0x10, 0x61, 0x17, 0x73, 0x10, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0x7f, 0x10, 0x7f, 0x17, 0x7f, 0x10, 0xff, 0x1f, }; gv-3.7.4/src/message.h0000664000076400007640000001757311736064614011505 00000000000000/* ** ** message.h ** Version 2.6 ** Mai 1996 ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _MESSAGE_LOADED_ #if defined(MESSAGES) || defined(MESSAGES1) #ifdef MESSAGE_NO_ESC # define MESSAGE_B_ESC "" # define MESSAGE_E_ESC "" #else # define MESSAGE_B_ESC "\033[1m" # define MESSAGE_E_ESC "\033[m" #endif #include #include #if defined(__STDC__) || defined(__ALPHA) # define _MESSAGE_USE_STDC_ #endif #ifdef _MESSAGE_USE_STDC_ # define MESSAGE_STRING(x) #x #else # define MESSAGE_STRING(x) "x" #endif #define MESSAGE_FILE (__FILE__) #define MESSAGE_SAVEINDENT(indent) { \ gnu_gv_setenv("MESSAGE_INDENT",indent,1); \ } #define MESSAGE_GETINDENT(indent,len) { \ char *__result=getenv("MESSAGE_INDENT"); \ if (__result) { len=strlen(__result); strcpy(indent,__result); }\ else { len=0; indent[0]='\0'; } \ } #define MESSAGE_PRINTF(format,value) { \ char __indent[100]; unsigned short __len;\ MESSAGE_GETINDENT(__indent,__len); \ fprintf(stderr,__indent); \ fprintf(stderr,format,value); \ } #define MESSAGE2_PRINTF(format,value1,value2) { \ char __indent[100]; unsigned short __len; \ MESSAGE_GETINDENT(__indent,__len); \ fprintf(stderr,__indent); \ fprintf(stderr,format,value1,value2); \ } #define BEGIN_MESSAGE(txt) { \ char __indent[100]; unsigned short __len; \ MESSAGE_GETINDENT(__indent,__len) \ fprintf(stderr,"%s\273\273\273 %s%s%s <%s>\n", \ __indent, \ MESSAGE_B_ESC,MESSAGE_STRING(txt),MESSAGE_E_ESC,\ MESSAGE_FILE \ ); \ if (__len <= 56) strcat(__indent," "); \ MESSAGE_SAVEINDENT(__indent) \ } #define END_MESSAGE(txt) { \ char __indent[100]; unsigned short __len; \ MESSAGE_GETINDENT(__indent,__len) \ if (__len>= 4) __indent[__len-4] = '\0'; \ fprintf(stderr,"%s\253\253\253 %s%s%s <%s>\n", \ __indent, \ MESSAGE_B_ESC,MESSAGE_STRING(txt),MESSAGE_E_ESC,\ MESSAGE_FILE \ ); \ MESSAGE_SAVEINDENT(__indent) \ } #define MAIN_BEGIN_MESSAGE(txt) { \ char *__indent = ""; \ MESSAGE_SAVEINDENT(__indent) \ BEGINMESSAGE(txt) \ } #define MAIN_END_MESSAGE(txt) { \ char *__indent = ""; \ MESSAGE_SAVEINDENT(__indent) \ ENDMESSAGE(txt) \ } #endif /* MESSAGES || MESSAGES1 */ #ifdef MESSAGES #define MESSAGE_NULL_PTR "" #ifdef _MESSAGE_USE_STDC_ # define MAINBEGINMESSAGE(txt) MAIN_BEGIN_MESSAGE(txt) # define MAINENDMESSAGE(txt) MAIN_END_MESSAGE(txt) # define BEGINMESSAGE(txt) BEGIN_MESSAGE(txt) # define ENDMESSAGE(txt) END_MESSAGE(txt) # define INFMESSAGE(txt) MESSAGE_PRINTF(#txt "%s\n","") # define CMESSAGE(cr) MESSAGE_PRINTF(#cr "=%c\n",cr) # define INFCMESSAGE(txt,cr) MESSAGE_PRINTF(#txt " " #cr "=%c\n",cr) # define IMESSAGE(it) MESSAGE_PRINTF(#it "=%d\n",it) # define INFIMESSAGE(txt,it) MESSAGE_PRINTF(#txt " " #it "=%d\n",it) # define IIMESSAGE(it1,it2) MESSAGE2_PRINTF(#it1 "=%d, " #it2 "=%d\n",it1,it2) # define INFIIMESSAGE(txt,it1,it2) MESSAGE2_PRINTF(#txt " " #it1 "=%d, " #it2 "=%d\n",it1,it2) # define FMESSAGE(ft) MESSAGE_PRINTF(#ft "=%f\n",ft) # define INFFMESSAGE(txt,ft) MESSAGE_PRINTF(#txt " " #ft "=%f\n",ft) # define SMESSAGE(st) MESSAGE_PRINTF(#st "=%s\n",st ? st : MESSAGE_NULL_PTR) # define INFSMESSAGE(txt,st) MESSAGE_PRINTF(#txt " " #st "=%s\n",st ? st : MESSAGE_NULL_PTR) #else # define MAINBEGINMESSAGE(txt) MAIN_BEGIN_MESSAGE(txt) # define MAINENDMESSAGE(txt) MAIN_END_MESSAGE(txt) # define BEGINMESSAGE(txt) BEGIN_MESSAGE(txt) # define ENDMESSAGE(txt) END_MESSAGE(txt) # define INFMESSAGE(txt) MESSAGE_PRINTF("txt %s\n","") # define CMESSAGE(cr) MESSAGE_PRINTF("cr=%c\n",cr) # define INFCMESSAGE(txt,cr) MESSAGE_PRINTF("txt cr=%c\n",cr) # define IMESSAGE(it) MESSAGE_PRINTF("it=%d\n",it) # define INFIMESSAGE(txt,it) MESSAGE_PRINTF("txt it=%d\n",it) # define IIMESSAGE(it1,it2) MESSAGE2_PRINTF("it1=%d, it2=%d\n",it1,it2) # define INFIIMESSAGE(txt,it1,it2) MESSAGE2_PRINTF("txt it1=%d, it2=%d\n",it1,it2) # define FMESSAGE(ft) MESSAGE_PRINTF("ft=%f\n",ft) # define INFFMESSAGE(txt,ft) MESSAGE_PRINTF("txt ft=%f\n",ft) # define SMESSAGE(st) MESSAGE_PRINTF("st=%s\n",st ? st : MESSAGE_NULL_PTR) # define INFSMESSAGE(txt,st) MESSAGE_PRINTF("txt st=%s\n",st ? st : MESSAGE_NULL_PTR) #endif #else /* MESSAGES */ # define MAINBEGINMESSAGE(txt) # define MAINENDMESSAGE(txt) # define BEGINMESSAGE(txt) # define ENDMESSAGE(txt) # define INFMESSAGE(txt) # define CMESSAGE(cr) # define INFCMESSAGE(txt,cr) # define IMESSAGE(it) # define INFIMESSAGE(txt,it) # define IIMESSAGE(it1,it2) # define INFIIMESSAGE(txt,it1,it2) # define FMESSAGE(ft) # define INFFMESSAGE(txt,ft) # define SMESSAGE(st) # define INFSMESSAGE(txt,st) #endif /* MESSAGES */ #ifdef MESSAGES1 #ifdef _MESSAGE_USE_STDC_ # define BEGINMESSAGE1(txt) BEGIN_MESSAGE(txt) # define ENDMESSAGE1(txt) END_MESSAGE(txt) # define INFMESSAGE1(txt) MESSAGE_PRINTF(#txt "%s\n","") # define IMESSAGE1(it) MESSAGE_PRINTF(#it "=%d\n",it) # define INFIMESSAGE1(txt,it) MESSAGE_PRINTF(#txt " " #it "=%d\n",it) # define FMESSAGE1(ft) MESSAGE_PRINTF(#ft "=%f\n",ft) # define INFFMESSAGE1(txt,ft) MESSAGE_PRINTF(#txt " " #ft "=%f\n",ft) # define SMESSAGE1(st) MESSAGE_PRINTF(#st "=%s\n",st ? st : MESSAGE_NULL_PTR) # define INFSMESSAGE1(txt,st) MESSAGE_PRINTF(#txt " " #st "=%s\n",st ? st : MESSAGE_NULL_PTR) # define IIMESSAGE1(it1,it2) MESSAGE2_PRINTF(#it1 "=%d, " #it2 "=%d\n",it1,it2) # define DDMESSAGE1(dt1,dt2) MESSAGE2_PRINTF(#dt1 "=%f, " #dt2 "=%f\n",dt1,dt2) # define INFIIMESSAGE1(txt,it1,it2) MESSAGE2_PRINTF(#txt " " #it1 "=%d, " #it2 "=%d\n",it1,it2) #else # define BEGINMESSAGE1(txt) BEGIN_MESSAGE(txt) # define ENDMESSAGE1(txt) END_MESSAGE(txt) # define INFMESSAGE1(txt) MESSAGE_PRINTF("txt %s\n","") # define IMESSAGE1(it) MESSAGE_PRINTF("it=%d\n",it) # define INFIMESSAGE1(txt,it) MESSAGE_PRINTF("txt it=%d\n",it) # define FMESSAGE1(ft) MESSAGE_PRINTF("ft=%f\n",ft) # define INFFMESSAGE1(txt,ft) MESSAGE_PRINTF("txt ft=%f\n",ft) # define SMESSAGE1(st) MESSAGE_PRINTF("st=%s\n",st ? st : MESSAGE_NULL_PTR) # define INFSMESSAGE1(txt,st) MESSAGE_PRINTF("txt st=%s\n",st ? st : MESSAGE_NULL_PTR) # define IIMESSAGE1(it1,it2) MESSAGE2_PRINTF("it1=%d, it2=%d\n",it1,it2) # define DDMESSAGE1(dt1,dt2) MESSAGE2_PRINTF("dt1=%d, dt2=%d\n",dt1,dt2) # define INFIIMESSAGE1(txt,it1,it2) MESSAGE2_PRINTF("txt it1=%d, it2=%d\n",it1,it2) #endif #else /* MESSAGES1 */ # define BEGINMESSAGE1(txt) # define ENDMESSAGE1(txt) # define INFMESSAGE1(txt) # define IMESSAGE1(it) # define INFIMESSAGE1(txt,it) # define FMESSAGE1(ft) # define INFFMESSAGE1(txt,ft) # define SMESSAGE1(st) # define INFSMESSAGE1(txt,st) # define IIMESSAGE1(it1,it2) # define DDMESSAGE1(dt1,dt2) # define INFIIMESSAGE1(txt,it1,it2) #endif /* MESSAGES1 */ #define _MESSAGE_LOADED_ #endif /* _MESSAGE_LOADED_ */ gv-3.7.4/src/resource.h0000664000076400007640000000446011735103746011676 00000000000000/* ** ** resource.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project ** */ #ifndef _GV_RESOURCE_H_ #define _GV_RESOURCE_H_ extern void resource_freeData ( void ); extern XrmDatabase resource_buildDatabase ( Display *, char *, char *, int *, char ** ); extern void resource_putResource (XrmDatabase *, char *, char *, char *); extern char * resource_getResource ( XrmDatabase, char *, char *, char *, char * ); extern int resource_checkGeometryResource ( XrmDatabase *, char *, char * ); extern int resource_checkResources ( char *, char *, char * ); extern char * resource_userDefaultsFile ( void ); extern String orientations[5]; extern String popupVerb[5]; extern String automaticLabel; extern String confirm_quit_styles[4]; extern String title_styles[4]; extern String saveCurrentPageLabel; extern String saveMarkedPagesLabel; extern String saveDocumentLabel; extern String saveAsPDFLabel; extern String openFileLabel; extern String passwordPromptLabel; extern String passwordRequiredLabel; extern String quitConfirmLabel; extern String putTexCommandLabel, texCommandLabel; extern String stillInProgressLabel; extern String execOfFailedLabel; extern String copyrightTranslationLabel; #endif /* _GV_RESOURCE_H_ */ gv-3.7.4/src/dialog.h0000664000076400007640000000340011735103745011276 00000000000000/* ** ** dialog.h ** ** Copyright (C) 1995, 1996, 1997 Johannes Plass ** Copyright (C) 2004 Jose E. Marchesi ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GNU gv; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ** Boston, MA 02111-1307, USA. ** ** Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ** Department of Physics ** Johannes Gutenberg-University ** Mainz, Germany ** ** Jose E. Marchesi (jemarch@gnu.org) ** GNU Project */ #ifndef _GV_DIALOG_H_ #define _GV_DIALOG_H_ #define DIALOG_BUTTON_DONE (1<<0) #define DIALOG_BUTTON_CANCEL (1<<1) extern void cb_popdownDialogPopup (Widget, XtPointer, XtPointer); extern void cb_popupDialogPopup (Widget, XtPointer, XtPointer); extern void action_preferDialogPopupButton ( Widget, XEvent *, String *, Cardinal *); extern void makeDialogPopup (void); extern void DialogPopupSetButton (int, String, XtCallbackProc); extern void DialogPopupClearText (void); extern void DialogPopupSetText (String); extern String DialogPopupGetText (void); extern void DialogPopupSetPrompt (String); extern void DialogPopupSetMessage (String); #endif /* _GV_DIALOG_H_ */ gv-3.7.4/configure0000775000076400007640000141524712121323351011012 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.65. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error ERROR [LINENO LOG_FD] # --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="src/ps.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" gl_func_list= gl_header_list= gl_getopt_required=POSIX gl_getopt_required=POSIX ac_subst_vars='gltests_LTLIBOBJS gltests_LIBOBJS gl_LTLIBOBJS gl_LIBOBJS am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS DEPS_LIBS DEPS_CFLAGS PKG_CONFIG X_EXTRA_LIBS X_LIBS X_PRE_LIBS X_CFLAGS XMKMF USE_OFF_T_FALSE USE_OFF_T_TRUE USE_SETENV_CODE_FALSE USE_SETENV_CODE_TRUE ENABLE_INTERNATIONAL_FALSE ENABLE_INTERNATIONAL_TRUE ENABLE_FALLBACK_STYLES_FALSE ENABLE_FALLBACK_STYLES_TRUE USE_SCROLLBAR_CODE_FALSE USE_SCROLLBAR_CODE_TRUE USE_BACKING_PIXMAP SAVE_DIR SCRATCH_DIR PRINT_COMMAND PAPERSIZE LIBGNU_LTLIBDEPS LIBGNU_LIBDEPS gltests_WITNESS HAVE_UNISTD_H NEXT_AS_FIRST_DIRECTIVE_UNISTD_H NEXT_UNISTD_H PTHREAD_H_DEFINES_STRUCT_TIMESPEC SYS_TIME_H_DEFINES_STRUCT_TIMESPEC TIME_H_DEFINES_STRUCT_TIMESPEC NEXT_AS_FIRST_DIRECTIVE_TIME_H NEXT_TIME_H REPLACE_TIMEGM REPLACE_NANOSLEEP REPLACE_MKTIME REPLACE_LOCALTIME_R HAVE_TIMEGM HAVE_STRPTIME HAVE_NANOSLEEP HAVE_DECL_LOCALTIME_R GNULIB_TIME_R GNULIB_TIMEGM GNULIB_STRPTIME GNULIB_NANOSLEEP GNULIB_MKTIME NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H NEXT_SYS_STAT_H NEXT_AS_FIRST_DIRECTIVE_STDLIB_H NEXT_STDLIB_H NEXT_AS_FIRST_DIRECTIVE_STDDEF_H NEXT_STDDEF_H GL_GENERATE_STDDEF_H_FALSE GL_GENERATE_STDDEF_H_TRUE STDDEF_H HAVE_WCHAR_T REPLACE_NULL HAVE__BOOL GL_GENERATE_STDBOOL_H_FALSE GL_GENERATE_STDBOOL_H_TRUE STDBOOL_H NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H NEXT_SIGNAL_H HAVE_SIGHANDLER_T HAVE_TYPE_VOLATILE_SIG_ATOMIC_T HAVE_STRUCT_SIGACTION_SA_SIGACTION HAVE_SIGACTION HAVE_SIGINFO_T HAVE_SIGSET_T HAVE_POSIX_SIGNALBLOCKING GNULIB_SIGACTION GNULIB_SIGPROCMASK GNULIB_SIGNAL_H_SIGPIPE REPLACE_UTIMENSAT REPLACE_STAT REPLACE_MKNOD REPLACE_MKFIFO REPLACE_MKDIR REPLACE_LSTAT REPLACE_FUTIMENS REPLACE_FSTATAT REPLACE_FSTAT HAVE_UTIMENSAT HAVE_MKNODAT HAVE_MKNOD HAVE_MKFIFOAT HAVE_MKFIFO HAVE_MKDIRAT HAVE_LSTAT HAVE_LCHMOD HAVE_FUTIMENS HAVE_FSTATAT HAVE_FCHMODAT GNULIB_UTIMENSAT GNULIB_STAT GNULIB_MKNODAT GNULIB_MKNOD GNULIB_MKFIFOAT GNULIB_MKFIFO GNULIB_MKDIRAT GNULIB_LSTAT GNULIB_LCHMOD GNULIB_FUTIMENS GNULIB_FSTATAT GNULIB_FCHMODAT NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H NEXT_INTTYPES_H UINT64_MAX_EQ_ULONG_MAX UINT32_MAX_LT_UINTMAX_MAX PRIPTR_PREFIX PRI_MACROS_BROKEN INT64_MAX_EQ_LONG_MAX INT32_MAX_LT_INTMAX_MAX HAVE_DECL_STRTOUMAX HAVE_DECL_STRTOIMAX HAVE_DECL_IMAXDIV HAVE_DECL_IMAXABS GNULIB_STRTOUMAX GNULIB_STRTOIMAX GNULIB_IMAXDIV GNULIB_IMAXABS GL_GENERATE_STDINT_H_FALSE GL_GENERATE_STDINT_H_TRUE STDINT_H WINT_T_SUFFIX WCHAR_T_SUFFIX SIG_ATOMIC_T_SUFFIX SIZE_T_SUFFIX PTRDIFF_T_SUFFIX HAVE_SIGNED_WINT_T HAVE_SIGNED_WCHAR_T HAVE_SIGNED_SIG_ATOMIC_T BITSIZEOF_WINT_T BITSIZEOF_WCHAR_T BITSIZEOF_SIG_ATOMIC_T BITSIZEOF_SIZE_T BITSIZEOF_PTRDIFF_T APPLE_UNIVERSAL_BUILD HAVE_SYS_BITYPES_H HAVE_SYS_INTTYPES_H HAVE_STDINT_H NEXT_AS_FIRST_DIRECTIVE_STDINT_H NEXT_STDINT_H HAVE_SYS_TYPES_H HAVE_INTTYPES_H HAVE_WCHAR_H HAVE_UNSIGNED_LONG_LONG_INT HAVE_LONG_LONG_INT NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H NEXT_SYS_TIME_H REPLACE_GETTIMEOFDAY HAVE_SYS_TIME_H HAVE_STRUCT_TIMEVAL HAVE_GETTIMEOFDAY GNULIB_GETTIMEOFDAY LTLIBINTL LIBINTL GETOPT_H HAVE_GETOPT_H NEXT_AS_FIRST_DIRECTIVE_GETOPT_H NEXT_GETOPT_H UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS UNISTD_H_HAVE_WINSOCK2_H REPLACE_WRITE REPLACE_USLEEP REPLACE_UNLINKAT REPLACE_UNLINK REPLACE_TTYNAME_R REPLACE_SYMLINK REPLACE_SLEEP REPLACE_RMDIR REPLACE_READLINK REPLACE_READ REPLACE_PWRITE REPLACE_PREAD REPLACE_LSEEK REPLACE_LINKAT REPLACE_LINK REPLACE_LCHOWN REPLACE_GETPAGESIZE REPLACE_GETGROUPS REPLACE_GETLOGIN_R REPLACE_GETDOMAINNAME REPLACE_GETCWD REPLACE_FCHOWNAT REPLACE_DUP2 REPLACE_DUP REPLACE_CLOSE REPLACE_CHOWN HAVE_SYS_PARAM_H HAVE_OS_H HAVE_DECL_TTYNAME_R HAVE_DECL_GETUSERSHELL HAVE_DECL_GETPAGESIZE HAVE_DECL_GETLOGIN_R HAVE_DECL_GETDOMAINNAME HAVE_DECL_FCHDIR HAVE_DECL_ENVIRON HAVE_USLEEP HAVE_UNLINKAT HAVE_SYMLINKAT HAVE_SYMLINK HAVE_SLEEP HAVE_READLINKAT HAVE_READLINK HAVE_PWRITE HAVE_PREAD HAVE_PIPE2 HAVE_PIPE HAVE_LINKAT HAVE_LINK HAVE_LCHOWN HAVE_GETPAGESIZE HAVE_GETLOGIN HAVE_GETHOSTNAME HAVE_GETGROUPS HAVE_GETDTABLESIZE HAVE_FTRUNCATE HAVE_FSYNC HAVE_FCHOWNAT HAVE_FCHDIR HAVE_FACCESSAT HAVE_EUIDACCESS HAVE_DUP3 HAVE_DUP2 HAVE_CHOWN GNULIB_WRITE GNULIB_USLEEP GNULIB_UNLINKAT GNULIB_UNLINK GNULIB_UNISTD_H_SIGPIPE GNULIB_UNISTD_H_NONBLOCKING GNULIB_UNISTD_H_GETOPT GNULIB_TTYNAME_R GNULIB_SYMLINKAT GNULIB_SYMLINK GNULIB_SLEEP GNULIB_RMDIR GNULIB_READLINKAT GNULIB_READLINK GNULIB_READ GNULIB_PWRITE GNULIB_PREAD GNULIB_PIPE2 GNULIB_PIPE GNULIB_LSEEK GNULIB_LINKAT GNULIB_LINK GNULIB_LCHOWN GNULIB_GETUSERSHELL GNULIB_GETPAGESIZE GNULIB_GETLOGIN_R GNULIB_GETLOGIN GNULIB_GETHOSTNAME GNULIB_GETGROUPS GNULIB_GETDTABLESIZE GNULIB_GETDOMAINNAME GNULIB_GETCWD GNULIB_FTRUNCATE GNULIB_FSYNC GNULIB_FCHOWNAT GNULIB_FCHDIR GNULIB_FACCESSAT GNULIB_EUIDACCESS GNULIB_ENVIRON GNULIB_DUP3 GNULIB_DUP2 GNULIB_CLOSE GNULIB_CHOWN EOVERFLOW_VALUE EOVERFLOW_HIDDEN ENOLINK_VALUE ENOLINK_HIDDEN EMULTIHOP_VALUE EMULTIHOP_HIDDEN GL_GENERATE_ERRNO_H_FALSE GL_GENERATE_ERRNO_H_TRUE ERRNO_H NEXT_AS_FIRST_DIRECTIVE_ERRNO_H NEXT_ERRNO_H PRAGMA_COLUMNS PRAGMA_SYSTEM_HEADER INCLUDE_NEXT_AS_FIRST_DIRECTIVE INCLUDE_NEXT REPLACE_WCTOMB REPLACE_UNSETENV REPLACE_STRTOD REPLACE_SETENV REPLACE_REALPATH REPLACE_REALLOC REPLACE_PUTENV REPLACE_MKSTEMP REPLACE_MBTOWC REPLACE_MALLOC REPLACE_CANONICALIZE_FILE_NAME REPLACE_CALLOC HAVE_DECL_UNSETENV HAVE_UNLOCKPT HAVE_SYS_LOADAVG_H HAVE_STRUCT_RANDOM_DATA HAVE_STRTOULL HAVE_STRTOLL HAVE_STRTOD HAVE_DECL_SETENV HAVE_SETENV HAVE_RPMATCH HAVE_REALPATH HAVE_RANDOM_R HAVE_RANDOM_H HAVE_PTSNAME HAVE_MKSTEMPS HAVE_MKSTEMP HAVE_MKOSTEMPS HAVE_MKOSTEMP HAVE_MKDTEMP HAVE_GRANTPT HAVE_GETSUBOPT HAVE_DECL_GETLOADAVG HAVE_CANONICALIZE_FILE_NAME HAVE_ATOLL HAVE__EXIT GNULIB_WCTOMB GNULIB_UNSETENV GNULIB_UNLOCKPT GNULIB_SYSTEM_POSIX GNULIB_STRTOULL GNULIB_STRTOLL GNULIB_STRTOD GNULIB_SETENV GNULIB_RPMATCH GNULIB_REALPATH GNULIB_REALLOC_POSIX GNULIB_RANDOM_R GNULIB_PUTENV GNULIB_PTSNAME GNULIB_MKSTEMPS GNULIB_MKSTEMP GNULIB_MKOSTEMPS GNULIB_MKOSTEMP GNULIB_MKDTEMP GNULIB_MBTOWC GNULIB_MALLOC_POSIX GNULIB_GRANTPT GNULIB_GETSUBOPT GNULIB_GETLOADAVG GNULIB_CANONICALIZE_FILE_NAME GNULIB_CALLOC_POSIX GNULIB_ATOLL GNULIB__EXIT GL_GENERATE_ALLOCA_H_FALSE GL_GENERATE_ALLOCA_H_TRUE ALLOCA_H ALLOCA GL_COND_LIBTOOL_FALSE GL_COND_LIBTOOL_TRUE EGREP GREP CPP host_os host_vendor host_cpu host build_os build_vendor build_cpu build RANLIB am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC MANUALEDITION MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_dependency_tracking enable_largefile with_libzio with_default_papersize with_print_command with_user_defaults_file with_scratch_dir with_save_dir enable_ps_level_one enable_signal_handler enable_backing_pixmap enable_scrollbar_code enable_memmove_code enable_runtime_messages enable_fallback_styles enable_international enable_SIGCHLD_fallback enable_setenv_code enable_off_t with_x ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP XMKMF PKG_CONFIG DEPS_CFLAGS DEPS_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error "unrecognized option: \`$ac_option' Try \`$0 --help' for more information." ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-largefile omit support for large files --enable-ps-level-one Produce Level 1 PostScript --enable-signal-handler Use a signal handler intercepting SIGTERM,SIGQUIT, SIGHUP snd SIGINT signals. It requires X11R6. Defaults to `yes' --enable-backing-pixmap Use a backing pixmap and not rely on the XServer to maintain backing store (can be changed at runtime). Defaults to `yes' --enable-scrollbar-code Use gv's own Motif like scrollbar. It defaults to `yes' --enable-memmove-code Use gv's own memmove. It defaults to `yes' --enable-runtime-messages Generate informative messages at runtime. It defaults to `no' --enable-fallback-styles Compile X resource files into the executable. Defaults to `yes' --enable-international Enable international by default. It defaults to `no' --enable-SIGCHLD-fallback Use SIGCHLD as a fallback to SIGCLD. Defaults to 'no' --enable-setenv-code Use extra code for setenv() and getenv(). Defaults to `no' --enable-off_t Use code with off_t and fopen, ftello, fseeko, stat for potential large file support. It defaults to auto detection. largefile only has effects if this option is turned on. Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --without-libzio Do not probe for libzio --with-default-papersize=PSIZE The default papersize (can be changed at runtime). Defaults to `A4' --with-print-command=COMMAND Command for spool a print job. Defaults for `lpr' --with-user-defaults-file=PATH The file containing your preferences. It defaults to `~/.gv'. --with-scratch-dir=PATH Temporary directory. Must be terminated with a trailing `/'. Defaults to `/tmp/' --with-save-dir=PATH The default directory for saving. Must be terminated with a trailing `/'. Defaults to `~/' --with-x use the X Window System Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor XMKMF Path to xmkmf, Makefile generator for X Window System PKG_CONFIG path to pkg-config utility DEPS_CFLAGS C compiler flags for DEPS, overriding pkg-config DEPS_LIBS linker flags for DEPS, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.65 Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_func # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes # INCLUDES, setting VAR accordingly. Returns whether the value could be # computed ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid; break else as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=$ac_mid; break else as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval () { return $2; } static unsigned long int ulongval () { return $2; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : echo >>conftest.val; read $3 &5 $as_echo_n "checking whether $2 is declared... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { #ifndef $2 (void) $2; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_decl # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_type # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES # ---------------------------------------------------- # Tries to find if the field MEMBER exists in type AGGR, after including # INCLUDES, setting cache variable VAR accordingly. ac_fn_c_check_member () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 $as_echo_n "checking for $2.$3... " >&6; } if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main () { static $2 ac_aggr; if (ac_aggr.$3) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main () { static $2 ac_aggr; if (sizeof ac_aggr.$3) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" else eval "$4=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$4 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_member cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi gl_func_list="$gl_func_list canonicalize_file_name" gl_func_list="$gl_func_list getcwd" gl_func_list="$gl_func_list readlink" gl_func_list="$gl_func_list realpath" gl_header_list="$gl_header_list sys/param.h" gl_getopt_required=GNU gl_header_list="$gl_header_list getopt.h" gl_header_list="$gl_header_list sys/time.h" gl_func_list="$gl_func_list gettimeofday" gl_header_list="$gl_header_list wchar.h" gl_header_list="$gl_header_list stdint.h" gl_header_list="$gl_header_list inttypes.h" gl_func_list="$gl_func_list lstat" gl_func_list="$gl_func_list mkstemp" gl_func_list="$gl_func_list pathconf" gl_header_list="$gl_header_list sys/stat.h" gl_header_list="$gl_header_list unistd.h" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do for ac_t in install-sh install.sh shtool; do if test -f "$ac_dir/$ac_t"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/$ac_t -c" break 2 fi done done if test -z "$ac_aux_dir"; then as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=gv VERSION=3.7.4 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers src/ac_config.h" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE VERSION=3.7.4 MANUALEDITION=First ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "no acceptable C compiler found in \$PATH See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "C compiler cannot create executables See \`config.log' for more details." "$LINENO" 5; }; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of object files: cannot compile See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = x""yes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "#define _MINIX 1" >>confdefs.h fi case "$host_os" in hpux*) $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h $as_echo "#define _ALL_SOURCE 1" >>confdefs.h $as_echo "#define _GNU_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h # Code from module alloca-opt: # Code from module arg-nonnull: # Code from module c++defs: # Code from module canonicalize-lgpl: # Code from module dosname: # Code from module errno: # Code from module extensions: # Code from module getopt-gnu: # Code from module getopt-posix: # Code from module gettext-h: # Code from module gettimeofday: # Code from module include_next: # Code from module inttypes: # Code from module inttypes-incomplete: # Code from module lstat: # Code from module malloca: # Code from module mkdtemp: # Code from module mkstemp: # Code from module multiarch: # Code from module pathmax: # Code from module readlink: # Code from module signal: # Code from module stat: # Code from module stdbool: # Code from module stddef: # Code from module stdint: # Code from module stdlib: # Code from module sys_stat: # Code from module sys_time: # Code from module tempname: # Code from module time: # Code from module unistd: # Code from module verify: # Code from module warn-on-use: LIBC_FATAL_STDERR_=1 export LIBC_FATAL_STDERR_ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } if test "${ac_cv_working_alloca_h+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_working_alloca_h=yes else ac_cv_working_alloca_h=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 $as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } if test "${ac_cv_func_alloca_works+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_alloca_works=yes else ac_cv_func_alloca_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 $as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext $as_echo "#define C_ALLOCA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } if test "${ac_cv_os_cray+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then : ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 $as_echo "$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" eval as_val=\$$as_ac_var if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } if test "${ac_cv_c_stack_direction+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_c_stack_direction=0 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int find_stack_direction () { static char *addr = 0; auto char dummy; if (addr == 0) { addr = &dummy; return find_stack_direction (); } else return (&dummy > addr) ? 1 : -1; } int main () { return find_stack_direction () < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_stack_direction=1 else ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 $as_echo "$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi for ac_func in $gl_func_list do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" eval as_val=\$$as_ac_var if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 $as_echo_n "checking whether // is distinct from /... " >&6; } if test "${gl_cv_double_slash_root+set}" = set; then : $as_echo_n "(cached) " >&6 else if test x"$cross_compiling" = xyes ; then # When cross-compiling, there is no way to tell whether // is special # short of a list of hosts. However, the only known hosts to date # that have a distinct // are Apollo DomainOS (too old to port to), # Cygwin, and z/OS. If anyone knows of another system for which // has # special semantics and is distinct from /, please report it to # . case $host in *-cygwin | i370-ibm-openedition) gl_cv_double_slash_root=yes ;; *) # Be optimistic and assume that / and // are the same when we # don't know. gl_cv_double_slash_root='unknown, assuming no' ;; esac else set x `ls -di / // 2>/dev/null` if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then gl_cv_double_slash_root=no else gl_cv_double_slash_root=yes fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5 $as_echo "$gl_cv_double_slash_root" >&6; } if test "$gl_cv_double_slash_root" = yes; then $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h fi : { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5 $as_echo_n "checking whether realpath works... " >&6; } if test "${gl_cv_func_realpath_works+set}" = set; then : $as_echo_n "(cached) " >&6 else touch conftest.a if test "$cross_compiling" = yes; then : gl_cv_func_realpath_works="guessing no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int result = 0; { char *name = realpath ("conftest.a", NULL); if (!(name && *name == '/')) result |= 1; } { char *name = realpath ("conftest.b/../conftest.a", NULL); if (name != NULL) result |= 2; } { char *name = realpath ("conftest.a/", NULL); if (name != NULL) result |= 4; } return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_realpath_works=yes else gl_cv_func_realpath_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5 $as_echo "$gl_cv_func_realpath_works" >&6; } if test "$gl_cv_func_realpath_works" = yes; then $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h fi for ac_header in $gl_header_list do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done : : GNULIB__EXIT=0; GNULIB_ATOLL=0; GNULIB_CALLOC_POSIX=0; GNULIB_CANONICALIZE_FILE_NAME=0; GNULIB_GETLOADAVG=0; GNULIB_GETSUBOPT=0; GNULIB_GRANTPT=0; GNULIB_MALLOC_POSIX=0; GNULIB_MBTOWC=0; GNULIB_MKDTEMP=0; GNULIB_MKOSTEMP=0; GNULIB_MKOSTEMPS=0; GNULIB_MKSTEMP=0; GNULIB_MKSTEMPS=0; GNULIB_PTSNAME=0; GNULIB_PUTENV=0; GNULIB_RANDOM_R=0; GNULIB_REALLOC_POSIX=0; GNULIB_REALPATH=0; GNULIB_RPMATCH=0; GNULIB_SETENV=0; GNULIB_STRTOD=0; GNULIB_STRTOLL=0; GNULIB_STRTOULL=0; GNULIB_SYSTEM_POSIX=0; GNULIB_UNLOCKPT=0; GNULIB_UNSETENV=0; GNULIB_WCTOMB=0; HAVE__EXIT=1; HAVE_ATOLL=1; HAVE_CANONICALIZE_FILE_NAME=1; HAVE_DECL_GETLOADAVG=1; HAVE_GETSUBOPT=1; HAVE_GRANTPT=1; HAVE_MKDTEMP=1; HAVE_MKOSTEMP=1; HAVE_MKOSTEMPS=1; HAVE_MKSTEMP=1; HAVE_MKSTEMPS=1; HAVE_PTSNAME=1; HAVE_RANDOM_H=1; HAVE_RANDOM_R=1; HAVE_REALPATH=1; HAVE_RPMATCH=1; HAVE_SETENV=1; HAVE_DECL_SETENV=1; HAVE_STRTOD=1; HAVE_STRTOLL=1; HAVE_STRTOULL=1; HAVE_STRUCT_RANDOM_DATA=1; HAVE_SYS_LOADAVG_H=0; HAVE_UNLOCKPT=1; HAVE_DECL_UNSETENV=1; REPLACE_CALLOC=0; REPLACE_CANONICALIZE_FILE_NAME=0; REPLACE_MALLOC=0; REPLACE_MBTOWC=0; REPLACE_MKSTEMP=0; REPLACE_PUTENV=0; REPLACE_REALLOC=0; REPLACE_REALPATH=0; REPLACE_SETENV=0; REPLACE_STRTOD=0; REPLACE_UNSETENV=0; REPLACE_WCTOMB=0; { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } if test "${gl_cv_have_include_next+set}" = set; then : $as_echo_n "(cached) " >&6 else rm -rf conftestd1a conftestd1b conftestd2 mkdir conftestd1a conftestd1b conftestd2 cat < conftestd1a/conftest.h #define DEFINED_IN_CONFTESTD1 #include_next #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat < conftestd1b/conftest.h #define DEFINED_IN_CONFTESTD1 #include #include_next #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat < conftestd2/conftest.h #ifndef DEFINED_IN_CONFTESTD1 #error "include_next test doesn't work" #endif #define DEFINED_IN_CONFTESTD2 EOF gl_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_have_include_next=yes else CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_have_include_next=buggy else gl_cv_have_include_next=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CPPFLAGS="$gl_save_CPPFLAGS" rm -rf conftestd1a conftestd1b conftestd2 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 $as_echo "$gl_cv_have_include_next" >&6; } PRAGMA_SYSTEM_HEADER= if test $gl_cv_have_include_next = yes; then INCLUDE_NEXT=include_next INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next if test -n "$GCC"; then PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' fi else if test $gl_cv_have_include_next = buggy; then INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next else INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 $as_echo_n "checking whether system header files limit the line length... " >&6; } if test "${gl_cv_pragma_columns+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __TANDEM choke me #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "choke me" >/dev/null 2>&1; then : gl_cv_pragma_columns=yes else gl_cv_pragma_columns=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 $as_echo "$gl_cv_pragma_columns" >&6; } if test $gl_cv_pragma_columns = yes; then PRAGMA_COLUMNS="#pragma COLUMNS 10000" else PRAGMA_COLUMNS= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5 $as_echo_n "checking for complete errno.h... " >&6; } if test "${gl_cv_header_errno_h_complete+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if !defined ENOMSG booboo #endif #if !defined EIDRM booboo #endif #if !defined ENOLINK booboo #endif #if !defined EPROTO booboo #endif #if !defined EMULTIHOP booboo #endif #if !defined EBADMSG booboo #endif #if !defined EOVERFLOW booboo #endif #if !defined ENOTSUP booboo #endif #if !defined ESTALE booboo #endif #if !defined EDQUOT booboo #endif #if !defined ECANCELED booboo #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "booboo" >/dev/null 2>&1; then : gl_cv_header_errno_h_complete=no else gl_cv_header_errno_h_complete=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5 $as_echo "$gl_cv_header_errno_h_complete" >&6; } if test $gl_cv_header_errno_h_complete = yes; then ERRNO_H='' else if test $gl_cv_have_include_next = yes; then gl_cv_next_errno_h='<'errno.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_errno_h+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/errno.h#{ s#.*"\(.*/errno.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5 $as_echo "$gl_cv_next_errno_h" >&6; } fi NEXT_ERRNO_H=$gl_cv_next_errno_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'errno.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_errno_h fi NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive ERRNO_H='errno.h' fi if test -n "$ERRNO_H"; then GL_GENERATE_ERRNO_H_TRUE= GL_GENERATE_ERRNO_H_FALSE='#' else GL_GENERATE_ERRNO_H_TRUE='#' GL_GENERATE_ERRNO_H_FALSE= fi if test -n "$ERRNO_H"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5 $as_echo_n "checking for EMULTIHOP value... " >&6; } if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef EMULTIHOP yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : gl_cv_header_errno_h_EMULTIHOP=yes else gl_cv_header_errno_h_EMULTIHOP=no fi rm -f conftest* if test $gl_cv_header_errno_h_EMULTIHOP = no; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include #ifdef EMULTIHOP yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : gl_cv_header_errno_h_EMULTIHOP=hidden fi rm -f conftest* if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" " #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include "; then : fi fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; } case $gl_cv_header_errno_h_EMULTIHOP in yes | no) EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE= ;; *) EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP" ;; esac fi if test -n "$ERRNO_H"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5 $as_echo_n "checking for ENOLINK value... " >&6; } if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef ENOLINK yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : gl_cv_header_errno_h_ENOLINK=yes else gl_cv_header_errno_h_ENOLINK=no fi rm -f conftest* if test $gl_cv_header_errno_h_ENOLINK = no; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include #ifdef ENOLINK yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : gl_cv_header_errno_h_ENOLINK=hidden fi rm -f conftest* if test $gl_cv_header_errno_h_ENOLINK = hidden; then if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" " #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include "; then : fi fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; } case $gl_cv_header_errno_h_ENOLINK in yes | no) ENOLINK_HIDDEN=0; ENOLINK_VALUE= ;; *) ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK" ;; esac fi if test -n "$ERRNO_H"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5 $as_echo_n "checking for EOVERFLOW value... " >&6; } if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef EOVERFLOW yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : gl_cv_header_errno_h_EOVERFLOW=yes else gl_cv_header_errno_h_EOVERFLOW=no fi rm -f conftest* if test $gl_cv_header_errno_h_EOVERFLOW = no; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include #ifdef EOVERFLOW yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : gl_cv_header_errno_h_EOVERFLOW=hidden fi rm -f conftest* if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" " #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include "; then : fi fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; } case $gl_cv_header_errno_h_EOVERFLOW in yes | no) EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE= ;; *) EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW" ;; esac fi GNULIB_CHOWN=0; GNULIB_CLOSE=0; GNULIB_DUP2=0; GNULIB_DUP3=0; GNULIB_ENVIRON=0; GNULIB_EUIDACCESS=0; GNULIB_FACCESSAT=0; GNULIB_FCHDIR=0; GNULIB_FCHOWNAT=0; GNULIB_FSYNC=0; GNULIB_FTRUNCATE=0; GNULIB_GETCWD=0; GNULIB_GETDOMAINNAME=0; GNULIB_GETDTABLESIZE=0; GNULIB_GETGROUPS=0; GNULIB_GETHOSTNAME=0; GNULIB_GETLOGIN=0; GNULIB_GETLOGIN_R=0; GNULIB_GETPAGESIZE=0; GNULIB_GETUSERSHELL=0; GNULIB_LCHOWN=0; GNULIB_LINK=0; GNULIB_LINKAT=0; GNULIB_LSEEK=0; GNULIB_PIPE=0; GNULIB_PIPE2=0; GNULIB_PREAD=0; GNULIB_PWRITE=0; GNULIB_READ=0; GNULIB_READLINK=0; GNULIB_READLINKAT=0; GNULIB_RMDIR=0; GNULIB_SLEEP=0; GNULIB_SYMLINK=0; GNULIB_SYMLINKAT=0; GNULIB_TTYNAME_R=0; GNULIB_UNISTD_H_GETOPT=0; GNULIB_UNISTD_H_NONBLOCKING=0; GNULIB_UNISTD_H_SIGPIPE=0; GNULIB_UNLINK=0; GNULIB_UNLINKAT=0; GNULIB_USLEEP=0; GNULIB_WRITE=0; HAVE_CHOWN=1; HAVE_DUP2=1; HAVE_DUP3=1; HAVE_EUIDACCESS=1; HAVE_FACCESSAT=1; HAVE_FCHDIR=1; HAVE_FCHOWNAT=1; HAVE_FSYNC=1; HAVE_FTRUNCATE=1; HAVE_GETDTABLESIZE=1; HAVE_GETGROUPS=1; HAVE_GETHOSTNAME=1; HAVE_GETLOGIN=1; HAVE_GETPAGESIZE=1; HAVE_LCHOWN=1; HAVE_LINK=1; HAVE_LINKAT=1; HAVE_PIPE=1; HAVE_PIPE2=1; HAVE_PREAD=1; HAVE_PWRITE=1; HAVE_READLINK=1; HAVE_READLINKAT=1; HAVE_SLEEP=1; HAVE_SYMLINK=1; HAVE_SYMLINKAT=1; HAVE_UNLINKAT=1; HAVE_USLEEP=1; HAVE_DECL_ENVIRON=1; HAVE_DECL_FCHDIR=1; HAVE_DECL_GETDOMAINNAME=1; HAVE_DECL_GETLOGIN_R=1; HAVE_DECL_GETPAGESIZE=1; HAVE_DECL_GETUSERSHELL=1; HAVE_DECL_TTYNAME_R=1; HAVE_OS_H=0; HAVE_SYS_PARAM_H=0; REPLACE_CHOWN=0; REPLACE_CLOSE=0; REPLACE_DUP=0; REPLACE_DUP2=0; REPLACE_FCHOWNAT=0; REPLACE_GETCWD=0; REPLACE_GETDOMAINNAME=0; REPLACE_GETLOGIN_R=0; REPLACE_GETGROUPS=0; REPLACE_GETPAGESIZE=0; REPLACE_LCHOWN=0; REPLACE_LINK=0; REPLACE_LINKAT=0; REPLACE_LSEEK=0; REPLACE_PREAD=0; REPLACE_PWRITE=0; REPLACE_READ=0; REPLACE_READLINK=0; REPLACE_RMDIR=0; REPLACE_SLEEP=0; REPLACE_SYMLINK=0; REPLACE_TTYNAME_R=0; REPLACE_UNLINK=0; REPLACE_UNLINKAT=0; REPLACE_USLEEP=0; REPLACE_WRITE=0; UNISTD_H_HAVE_WINSOCK2_H=0; UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; : if test $gl_cv_have_include_next = yes; then gl_cv_next_getopt_h='<'getopt.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_getopt_h+set}" = set; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_getopt_h = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/getopt.h#{ s#.*"\(.*/getopt.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_getopt_h='<'getopt.h'>' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5 $as_echo "$gl_cv_next_getopt_h" >&6; } fi NEXT_GETOPT_H=$gl_cv_next_getopt_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'getopt.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_getopt_h fi NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive if test $ac_cv_header_getopt_h = yes; then HAVE_GETOPT_H=1 else HAVE_GETOPT_H=0 fi gl_replace_getopt= if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then for ac_header in getopt.h do : ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" if test "x$ac_cv_header_getopt_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETOPT_H 1 _ACEOF else gl_replace_getopt=yes fi done fi if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then for ac_func in getopt_long_only do : ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" if test "x$ac_cv_func_getopt_long_only" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETOPT_LONG_ONLY 1 _ACEOF else gl_replace_getopt=yes fi done fi if test -z "$gl_replace_getopt"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; } if test "${gl_cv_func_getopt_posix+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int *p = &optreset; return optreset; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_optind_min=1 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return !getopt_clip; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_optind_min=1 else gl_optind_min=0 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext gl_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min" if test "$cross_compiling" = yes; then : case "$host_os" in mingw*) gl_cv_func_getopt_posix="guessing no";; darwin* | aix*) gl_cv_func_getopt_posix="guessing no";; *) gl_cv_func_getopt_posix="guessing yes";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { { int argc = 0; char *argv[10]; int c; argv[argc++] = "program"; argv[argc++] = "-a"; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = OPTIND_MIN; opterr = 0; c = getopt (argc, argv, "ab"); if (!(c == 'a')) return 1; c = getopt (argc, argv, "ab"); if (!(c == -1)) return 2; if (!(optind == 2)) return 3; } /* Some internal state exists at this point. */ { int argc = 0; char *argv[10]; int c; argv[argc++] = "program"; argv[argc++] = "donald"; argv[argc++] = "-p"; argv[argc++] = "billy"; argv[argc++] = "duck"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = OPTIND_MIN; opterr = 0; c = getopt (argc, argv, "+abp:q:"); if (!(c == -1)) return 4; if (!(strcmp (argv[0], "program") == 0)) return 5; if (!(strcmp (argv[1], "donald") == 0)) return 6; if (!(strcmp (argv[2], "-p") == 0)) return 7; if (!(strcmp (argv[3], "billy") == 0)) return 8; if (!(strcmp (argv[4], "duck") == 0)) return 9; if (!(strcmp (argv[5], "-a") == 0)) return 10; if (!(strcmp (argv[6], "bar") == 0)) return 11; if (!(optind == 1)) return 12; } /* Detect MacOS 10.5, AIX 7.1 bug. */ { char *argv[3] = { "program", "-ab", NULL }; optind = OPTIND_MIN; opterr = 0; if (getopt (2, argv, "ab:") != 'a') return 13; if (getopt (2, argv, "ab:") != '?') return 14; if (optopt != 'b') return 15; if (optind != 2) return 16; } return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_getopt_posix=yes else gl_cv_func_getopt_posix=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi CPPFLAGS=$gl_save_CPPFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5 $as_echo "$gl_cv_func_getopt_posix" >&6; } case "$gl_cv_func_getopt_posix" in *no) gl_replace_getopt=yes ;; esac fi if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 $as_echo_n "checking for working GNU getopt function... " >&6; } if test "${gl_cv_func_getopt_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the # optstring is necessary for programs like m4 that have POSIX-mandated # semantics for supporting options interspersed with files. # Also, since getopt_long is a GNU extension, we require optind=0. # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; # so take care to revert to the correct (non-)export state. gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { int result = 0; /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10. */ { char *myargv[3]; myargv[0] = "conftest"; myargv[1] = "-+"; myargv[2] = 0; opterr = 0; if (getopt (2, myargv, "+a") != '?') result |= 1; } /* This code succeeds on glibc 2.8, mingw, and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ { char *argv[] = { "program", "-p", "foo", "bar", NULL }; optind = 1; if (getopt (4, argv, "p::") != 'p') result |= 2; else if (optarg != NULL) result |= 4; else if (getopt (4, argv, "p::") != -1) result |= 6; else if (optind != 2) result |= 8; } /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ { char *argv[] = { "program", "foo", "-p", NULL }; optind = 0; if (getopt (3, argv, "-p") != 1) result |= 16; else if (getopt (3, argv, "-p") != 'p') result |= 32; } /* This code fails on glibc 2.11. */ { char *argv[] = { "program", "-b", "-a", NULL }; optind = opterr = 0; if (getopt (3, argv, "+:a:b") != 'b') result |= 64; else if (getopt (3, argv, "+:a:b") != ':') result |= 64; } return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_getopt_gnu=yes else gl_cv_func_getopt_gnu=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi case $gl_had_POSIXLY_CORRECT in exported) ;; yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;; *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5 $as_echo "$gl_cv_func_getopt_gnu" >&6; } if test "$gl_cv_func_getopt_gnu" = "no"; then gl_replace_getopt=yes fi fi ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" if test "x$ac_cv_have_decl_getenv" = x""yes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETENV $ac_have_decl _ACEOF if test -n "$gl_replace_getopt"; then : GETOPT_H=getopt.h $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h GNULIB_UNISTD_H_GETOPT=1 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 $as_echo_n "checking for C/C++ restrict keyword... " >&6; } if test "${ac_cv_c_restrict+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_c_restrict=no # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ typedef int * int_ptr; int foo (int_ptr $ac_kw ip) { return ip[0]; } int main () { int s[1]; int * $ac_kw t = s; t[0] = 0; return foo(t) ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_restrict=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_restrict" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 $as_echo "$ac_cv_c_restrict" >&6; } case $ac_cv_c_restrict in restrict) ;; no) $as_echo "#define restrict /**/" >>confdefs.h ;; *) cat >>confdefs.h <<_ACEOF #define restrict $ac_cv_c_restrict _ACEOF ;; esac GNULIB_GETTIMEOFDAY=0; HAVE_GETTIMEOFDAY=1; HAVE_STRUCT_TIMEVAL=1; HAVE_SYS_TIME_H=1; REPLACE_GETTIMEOFDAY=0; : : if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_time_h='<'sys/time.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_sys_time_h+set}" = set; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_sys_time_h = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/sys/time.h#{ s#.*"\(.*/sys/time.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_sys_time_h='<'sys/time.h'>' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5 $as_echo "$gl_cv_next_sys_time_h" >&6; } fi NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'sys/time.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_sys_time_h fi NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive if test $ac_cv_header_sys_time_h != yes; then HAVE_SYS_TIME_H=0 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 $as_echo_n "checking for struct timeval... " >&6; } if test "${gl_cv_sys_struct_timeval+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if HAVE_SYS_TIME_H #include #endif #include int main () { static struct timeval x; x.tv_sec = x.tv_usec; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_sys_struct_timeval=yes else gl_cv_sys_struct_timeval=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5 $as_echo "$gl_cv_sys_struct_timeval" >&6; } if test $gl_cv_sys_struct_timeval != yes; then HAVE_STRUCT_TIMEVAL=0 fi for gl_func in gettimeofday; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if HAVE_SYS_TIME_H # include #endif #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval as_val=\$$as_gl_Symbol if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 $as_echo_n "checking for unsigned long long int... " >&6; } if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_type_unsigned_long_long_int=yes if test "x${ac_cv_prog_cc_c99-no}" = xno; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* For now, do not test the preprocessor; as of 2007 there are too many implementations with broken preprocessors. Perhaps this can be revisited in 2012. In the meantime, code should not expect #if to work with literals wider than 32 bits. */ /* Test literals. */ long long int ll = 9223372036854775807ll; long long int nll = -9223372036854775807LL; unsigned long long int ull = 18446744073709551615ULL; /* Test constant expressions. */ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) ? 1 : -1)]; typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 ? 1 : -1)]; int i = 63; int main () { /* Test availability of runtime routines for shift and division. */ long long int llmax = 9223372036854775807ll; unsigned long long int ullmax = 18446744073709551615ull; return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | (llmax / ll) | (llmax % ll) | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | (ullmax / ull) | (ullmax % ull)); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : else ac_cv_type_unsigned_long_long_int=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } if test $ac_cv_type_unsigned_long_long_int = yes; then $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 $as_echo_n "checking for long long int... " >&6; } if test "${ac_cv_type_long_long_int+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_type_long_long_int=yes if test "x${ac_cv_prog_cc_c99-no}" = xno; then ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int if test $ac_cv_type_long_long_int = yes; then if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef LLONG_MAX # define HALF \ (1LL << (sizeof (long long int) * CHAR_BIT - 2)) # define LLONG_MAX (HALF - 1 + HALF) #endif int main () { long long int n = 1; int i; for (i = 0; ; i++) { long long int m = n << i; if (m >> i != n) return 1; if (LLONG_MAX / 2 < m) break; } return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_type_long_long_int=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 $as_echo "$ac_cv_type_long_long_int" >&6; } if test $ac_cv_type_long_long_int = yes; then $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h fi gl_cv_c_multiarch=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : arch= prev= for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do if test -n "$prev"; then case $word in i?86 | x86_64 | ppc | ppc64) if test -z "$arch" || test "$arch" = "$word"; then arch="$word" else gl_cv_c_multiarch=yes fi ;; esac prev= else if test "x$word" = "x-arch"; then prev=arch fi fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $gl_cv_c_multiarch = yes; then APPLE_UNIVERSAL_BUILD=1 else APPLE_UNIVERSAL_BUILD=0 fi if test $ac_cv_type_long_long_int = yes; then HAVE_LONG_LONG_INT=1 else HAVE_LONG_LONG_INT=0 fi if test $ac_cv_type_unsigned_long_long_int = yes; then HAVE_UNSIGNED_LONG_LONG_INT=1 else HAVE_UNSIGNED_LONG_LONG_INT=0 fi : if test $ac_cv_header_wchar_h = yes; then HAVE_WCHAR_H=1 else HAVE_WCHAR_H=0 fi if test $ac_cv_header_inttypes_h = yes; then HAVE_INTTYPES_H=1 else HAVE_INTTYPES_H=0 fi if test $ac_cv_header_sys_types_h = yes; then HAVE_SYS_TYPES_H=1 else HAVE_SYS_TYPES_H=0 fi : if test $gl_cv_have_include_next = yes; then gl_cv_next_stdint_h='<'stdint.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_stdint_h+set}" = set; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_stdint_h = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/stdint.h#{ s#.*"\(.*/stdint.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_stdint_h='<'stdint.h'>' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 $as_echo "$gl_cv_next_stdint_h" >&6; } fi NEXT_STDINT_H=$gl_cv_next_stdint_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'stdint.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_stdint_h fi NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive if test $ac_cv_header_stdint_h = yes; then HAVE_STDINT_H=1 else HAVE_STDINT_H=0 fi if test $ac_cv_header_stdint_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; } if test "${gl_cv_header_working_stdint_h+set}" = set; then : $as_echo_n "(cached) " >&6 else gl_cv_header_working_stdint_h=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ #if !(defined WCHAR_MIN && defined WCHAR_MAX) #error "WCHAR_MIN, WCHAR_MAX not defined in " #endif /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #ifdef INT8_MAX int8_t a1 = INT8_MAX; int8_t a1min = INT8_MIN; #endif #ifdef INT16_MAX int16_t a2 = INT16_MAX; int16_t a2min = INT16_MIN; #endif #ifdef INT32_MAX int32_t a3 = INT32_MAX; int32_t a3min = INT32_MIN; #endif #ifdef INT64_MAX int64_t a4 = INT64_MAX; int64_t a4min = INT64_MIN; #endif #ifdef UINT8_MAX uint8_t b1 = UINT8_MAX; #else typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; #endif #ifdef UINT16_MAX uint16_t b2 = UINT16_MAX; #endif #ifdef UINT32_MAX uint32_t b3 = UINT32_MAX; #endif #ifdef UINT64_MAX uint64_t b4 = UINT64_MAX; #endif int_least8_t c1 = INT8_C (0x7f); int_least8_t c1max = INT_LEAST8_MAX; int_least8_t c1min = INT_LEAST8_MIN; int_least16_t c2 = INT16_C (0x7fff); int_least16_t c2max = INT_LEAST16_MAX; int_least16_t c2min = INT_LEAST16_MIN; int_least32_t c3 = INT32_C (0x7fffffff); int_least32_t c3max = INT_LEAST32_MAX; int_least32_t c3min = INT_LEAST32_MIN; int_least64_t c4 = INT64_C (0x7fffffffffffffff); int_least64_t c4max = INT_LEAST64_MAX; int_least64_t c4min = INT_LEAST64_MIN; uint_least8_t d1 = UINT8_C (0xff); uint_least8_t d1max = UINT_LEAST8_MAX; uint_least16_t d2 = UINT16_C (0xffff); uint_least16_t d2max = UINT_LEAST16_MAX; uint_least32_t d3 = UINT32_C (0xffffffff); uint_least32_t d3max = UINT_LEAST32_MAX; uint_least64_t d4 = UINT64_C (0xffffffffffffffff); uint_least64_t d4max = UINT_LEAST64_MAX; int_fast8_t e1 = INT_FAST8_MAX; int_fast8_t e1min = INT_FAST8_MIN; int_fast16_t e2 = INT_FAST16_MAX; int_fast16_t e2min = INT_FAST16_MIN; int_fast32_t e3 = INT_FAST32_MAX; int_fast32_t e3min = INT_FAST32_MIN; int_fast64_t e4 = INT_FAST64_MAX; int_fast64_t e4min = INT_FAST64_MIN; uint_fast8_t f1 = UINT_FAST8_MAX; uint_fast16_t f2 = UINT_FAST16_MAX; uint_fast32_t f3 = UINT_FAST32_MAX; uint_fast64_t f4 = UINT_FAST64_MAX; #ifdef INTPTR_MAX intptr_t g = INTPTR_MAX; intptr_t gmin = INTPTR_MIN; #endif #ifdef UINTPTR_MAX uintptr_t h = UINTPTR_MAX; #endif intmax_t i = INTMAX_MAX; uintmax_t j = UINTMAX_MAX; #include /* for CHAR_BIT */ #define TYPE_MINIMUM(t) \ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) #define TYPE_MAXIMUM(t) \ ((t) ((t) 0 < (t) -1 \ ? (t) -1 \ : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) struct s { int check_PTRDIFF: PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) ? 1 : -1; /* Detect bug in FreeBSD 6.0 / ia64. */ int check_SIG_ATOMIC: SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) ? 1 : -1; int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; int check_WCHAR: WCHAR_MIN == TYPE_MINIMUM (wchar_t) && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) ? 1 : -1; /* Detect bug in mingw. */ int check_WINT: WINT_MIN == TYPE_MINIMUM (wint_t) && WINT_MAX == TYPE_MAXIMUM (wint_t) ? 1 : -1; /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ int check_UINT8_C: (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; int check_UINT16_C: (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; /* Detect bugs in OpenBSD 3.9 stdint.h. */ #ifdef UINT8_MAX int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; #endif #ifdef UINT16_MAX int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; #endif #ifdef UINT32_MAX int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; #endif #ifdef UINT64_MAX int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; #endif int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; }; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if test "$cross_compiling" = yes; then : gl_cv_header_working_stdint_h=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include #include #define MVAL(macro) MVAL1(macro) #define MVAL1(expression) #expression static const char *macro_values[] = { #ifdef INT8_MAX MVAL (INT8_MAX), #endif #ifdef INT16_MAX MVAL (INT16_MAX), #endif #ifdef INT32_MAX MVAL (INT32_MAX), #endif #ifdef INT64_MAX MVAL (INT64_MAX), #endif #ifdef UINT8_MAX MVAL (UINT8_MAX), #endif #ifdef UINT16_MAX MVAL (UINT16_MAX), #endif #ifdef UINT32_MAX MVAL (UINT32_MAX), #endif #ifdef UINT64_MAX MVAL (UINT64_MAX), #endif NULL }; int main () { const char **mv; for (mv = macro_values; *mv != NULL; mv++) { const char *value = *mv; /* Test whether it looks like a cast expression. */ if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 || strncmp (value, "((int)"/*)*/, 6) == 0 || strncmp (value, "((signed short)"/*)*/, 15) == 0 || strncmp (value, "((signed char)"/*)*/, 14) == 0) return mv - macro_values + 1; } return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_header_working_stdint_h=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 $as_echo "$gl_cv_header_working_stdint_h" >&6; } fi if test "$gl_cv_header_working_stdint_h" = yes; then STDINT_H= else for ac_header in sys/inttypes.h sys/bitypes.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_header_sys_inttypes_h = yes; then HAVE_SYS_INTTYPES_H=1 else HAVE_SYS_INTTYPES_H=0 fi if test $ac_cv_header_sys_bitypes_h = yes; then HAVE_SYS_BITYPES_H=1 else HAVE_SYS_BITYPES_H=0 fi if test $APPLE_UNIVERSAL_BUILD = 0; then for gltype in ptrdiff_t size_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 $as_echo_n "checking for bit size of $gltype... " >&6; } if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include "; then : else result=unknown fi eval gl_cv_bitsizeof_${gltype}=\$result fi eval ac_res=\$gl_cv_bitsizeof_${gltype} { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval result=\$gl_cv_bitsizeof_${gltype} if test $result = unknown; then result=0 fi GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` cat >>confdefs.h <<_ACEOF #define BITSIZEOF_${GLTYPE} $result _ACEOF eval BITSIZEOF_${GLTYPE}=\$result done fi for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 $as_echo_n "checking for bit size of $gltype... " >&6; } if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include "; then : else result=unknown fi eval gl_cv_bitsizeof_${gltype}=\$result fi eval ac_res=\$gl_cv_bitsizeof_${gltype} { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval result=\$gl_cv_bitsizeof_${gltype} if test $result = unknown; then result=0 fi GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` cat >>confdefs.h <<_ACEOF #define BITSIZEOF_${GLTYPE} $result _ACEOF eval BITSIZEOF_${GLTYPE}=\$result done for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 $as_echo_n "checking whether $gltype is signed... " >&6; } if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : result=yes else result=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext eval gl_cv_type_${gltype}_signed=\$result fi eval ac_res=\$gl_cv_type_${gltype}_signed { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval result=\$gl_cv_type_${gltype}_signed GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` if test "$result" = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_SIGNED_${GLTYPE} 1 _ACEOF eval HAVE_SIGNED_${GLTYPE}=1 else eval HAVE_SIGNED_${GLTYPE}=0 fi done gl_cv_type_ptrdiff_t_signed=yes gl_cv_type_size_t_signed=no if test $APPLE_UNIVERSAL_BUILD = 0; then for gltype in ptrdiff_t size_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 $as_echo_n "checking for $gltype integer literal suffix... " >&6; } if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval gl_cv_type_${gltype}_suffix=no eval result=\$gl_cv_type_${gltype}_signed if test "$result" = yes; then glsufu= else glsufu=u fi for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do case $glsuf in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; i64) gltype1='__int64';; u) gltype1='unsigned int';; ul) gltype1='unsigned long int';; ull) gltype1='unsigned long long int';; ui64)gltype1='unsigned __int64';; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif extern $gltype foo; extern $gltype1 foo; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval gl_cv_type_${gltype}_suffix=\$glsuf fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext eval result=\$gl_cv_type_${gltype}_suffix test "$result" != no && break done fi eval ac_res=\$gl_cv_type_${gltype}_suffix { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` eval result=\$gl_cv_type_${gltype}_suffix test "$result" = no && result= eval ${GLTYPE}_SUFFIX=\$result cat >>confdefs.h <<_ACEOF #define ${GLTYPE}_SUFFIX $result _ACEOF done fi for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 $as_echo_n "checking for $gltype integer literal suffix... " >&6; } if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval gl_cv_type_${gltype}_suffix=no eval result=\$gl_cv_type_${gltype}_signed if test "$result" = yes; then glsufu= else glsufu=u fi for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do case $glsuf in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; i64) gltype1='__int64';; u) gltype1='unsigned int';; ul) gltype1='unsigned long int';; ull) gltype1='unsigned long long int';; ui64)gltype1='unsigned __int64';; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif extern $gltype foo; extern $gltype1 foo; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval gl_cv_type_${gltype}_suffix=\$glsuf fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext eval result=\$gl_cv_type_${gltype}_suffix test "$result" != no && break done fi eval ac_res=\$gl_cv_type_${gltype}_suffix { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` eval result=\$gl_cv_type_${gltype}_suffix test "$result" = no && result= eval ${GLTYPE}_SUFFIX=\$result cat >>confdefs.h <<_ACEOF #define ${GLTYPE}_SUFFIX $result _ACEOF done STDINT_H=stdint.h fi if test -n "$STDINT_H"; then GL_GENERATE_STDINT_H_TRUE= GL_GENERATE_STDINT_H_FALSE='#' else GL_GENERATE_STDINT_H_TRUE='#' GL_GENERATE_STDINT_H_FALSE= fi GNULIB_IMAXABS=0; GNULIB_IMAXDIV=0; GNULIB_STRTOIMAX=0; GNULIB_STRTOUMAX=0; HAVE_DECL_IMAXABS=1; HAVE_DECL_IMAXDIV=1; HAVE_DECL_STRTOIMAX=1; HAVE_DECL_STRTOUMAX=1; INT32_MAX_LT_INTMAX_MAX=1; INT64_MAX_EQ_LONG_MAX='defined _LP64'; PRI_MACROS_BROKEN=0; PRIPTR_PREFIX=__PRIPTR_PREFIX; UINT32_MAX_LT_UINTMAX_MAX=1; UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; : : if test $gl_cv_have_include_next = yes; then gl_cv_next_inttypes_h='<'inttypes.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_inttypes_h+set}" = set; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_inttypes_h = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/inttypes.h#{ s#.*"\(.*/inttypes.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_inttypes_h='<'inttypes.h'>' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5 $as_echo "$gl_cv_next_inttypes_h" >&6; } fi NEXT_INTTYPES_H=$gl_cv_next_inttypes_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'inttypes.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_inttypes_h fi NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive $as_echo "#define GL_TRIGGER_STDC_LIMIT_MACROS 1" >>confdefs.h for gl_func in imaxabs imaxdiv strtoimax strtoumax; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval as_val=\$$as_gl_Symbol if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done for ac_header in inttypes.h do : ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" if test "x$ac_cv_header_inttypes_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_INTTYPES_H 1 _ACEOF fi done if test $ac_cv_header_inttypes_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5 $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; } if test "${gt_cv_inttypes_pri_broken+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef PRId32 char *p = PRId32; #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gt_cv_inttypes_pri_broken=no else gt_cv_inttypes_pri_broken=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5 $as_echo "$gt_cv_inttypes_pri_broken" >&6; } fi if test "$gt_cv_inttypes_pri_broken" = yes; then cat >>confdefs.h <<_ACEOF #define PRI_MACROS_BROKEN 1 _ACEOF PRI_MACROS_BROKEN=1 else PRI_MACROS_BROKEN=0 fi GNULIB_FCHMODAT=0; GNULIB_FSTATAT=0; GNULIB_FUTIMENS=0; GNULIB_LCHMOD=0; GNULIB_LSTAT=0; GNULIB_MKDIRAT=0; GNULIB_MKFIFO=0; GNULIB_MKFIFOAT=0; GNULIB_MKNOD=0; GNULIB_MKNODAT=0; GNULIB_STAT=0; GNULIB_UTIMENSAT=0; HAVE_FCHMODAT=1; HAVE_FSTATAT=1; HAVE_FUTIMENS=1; HAVE_LCHMOD=1; HAVE_LSTAT=1; HAVE_MKDIRAT=1; HAVE_MKFIFO=1; HAVE_MKFIFOAT=1; HAVE_MKNOD=1; HAVE_MKNODAT=1; HAVE_UTIMENSAT=1; REPLACE_FSTAT=0; REPLACE_FSTATAT=0; REPLACE_FUTIMENS=0; REPLACE_LSTAT=0; REPLACE_MKDIR=0; REPLACE_MKFIFO=0; REPLACE_MKNOD=0; REPLACE_STAT=0; REPLACE_UTIMENSAT=0; { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then : $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then : # When cross-compiling, be pessimistic so we will end up using the # replacement version of lstat that checks for trailing slashes and # calls lstat a second time when necessary. ac_cv_func_lstat_dereferences_slashed_symlink=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_lstat_dereferences_slashed_symlink=yes else ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else # If the 'ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if test "${ac_cv_c_inline+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_malloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { return ! malloc (0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes else ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then : gl_cv_func_malloc_0_nonnull=1 else gl_cv_func_malloc_0_nonnull=0 fi cat >>confdefs.h <<_ACEOF #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull _ACEOF # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if test "${ac_cv_sys_largefile_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if test "${ac_cv_sys_file_offset_bits+set}" = set; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if test "${ac_cv_sys_large_files+set}" = set; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -rf conftest* fi fi GNULIB_SIGNAL_H_SIGPIPE=0; GNULIB_SIGPROCMASK=0; GNULIB_SIGACTION=0; HAVE_POSIX_SIGNALBLOCKING=1; HAVE_SIGSET_T=1; HAVE_SIGINFO_T=1; HAVE_SIGACTION=1; HAVE_STRUCT_SIGACTION_SA_SIGACTION=1; HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1; HAVE_SIGHANDLER_T=1; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 $as_echo_n "checking for uid_t in sys/types.h... " >&6; } if test "${ac_cv_type_uid_t+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "uid_t" >/dev/null 2>&1; then : ac_cv_type_uid_t=yes else ac_cv_type_uid_t=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 $as_echo "$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then $as_echo "#define uid_t int" >>confdefs.h $as_echo "#define gid_t int" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if test "${ac_cv_header_stdbool_h+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi REPLACE_NULL=0; HAVE_WCHAR_T=1; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 $as_echo_n "checking for wchar_t... " >&6; } if test "${gt_cv_c_wchar_t+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include wchar_t foo = (wchar_t)'\0'; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gt_cv_c_wchar_t=yes else gt_cv_c_wchar_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 $as_echo "$gt_cv_c_wchar_t" >&6; } if test $gt_cv_c_wchar_t = yes; then $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } if test "${ac_cv_header_stat_broken+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if defined S_ISBLK && defined S_IFDIR extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; #endif #if defined S_ISBLK && defined S_IFCHR extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; #endif #if defined S_ISLNK && defined S_IFREG extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; #endif #if defined S_ISSOCK && defined S_IFREG extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stat_broken=no else ac_cv_header_stat_broken=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 $as_echo "$ac_cv_header_stat_broken" >&6; } if test $ac_cv_header_stat_broken = yes; then $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h fi GNULIB_MKTIME=0; GNULIB_NANOSLEEP=0; GNULIB_STRPTIME=0; GNULIB_TIMEGM=0; GNULIB_TIME_R=0; HAVE_DECL_LOCALTIME_R=1; HAVE_NANOSLEEP=1; HAVE_STRPTIME=1; HAVE_TIMEGM=1; REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; REPLACE_MKTIME=GNULIB_PORTCHECK; REPLACE_NANOSLEEP=GNULIB_PORTCHECK; REPLACE_TIMEGM=GNULIB_PORTCHECK; : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 $as_echo_n "checking for struct timespec in ... " >&6; } if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { static struct timespec x; x.tv_sec = x.tv_nsec; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_sys_struct_timespec_in_time_h=yes else gl_cv_sys_struct_timespec_in_time_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } TIME_H_DEFINES_STRUCT_TIMESPEC=0 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then TIME_H_DEFINES_STRUCT_TIMESPEC=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 $as_echo_n "checking for struct timespec in ... " >&6; } if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { static struct timespec x; x.tv_sec = x.tv_nsec; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_sys_struct_timespec_in_sys_time_h=yes else gl_cv_sys_struct_timespec_in_sys_time_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 $as_echo_n "checking for struct timespec in ... " >&6; } if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { static struct timespec x; x.tv_sec = x.tv_nsec; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_sys_struct_timespec_in_pthread_h=yes else gl_cv_sys_struct_timespec_in_pthread_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 fi fi fi if test $gl_cv_have_include_next = yes; then gl_cv_next_time_h='<'time.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_time_h+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/time.h#{ s#.*"\(.*/time.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5 $as_echo "$gl_cv_next_time_h" >&6; } fi NEXT_TIME_H=$gl_cv_next_time_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'time.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_time_h fi NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive if false; then GL_COND_LIBTOOL_TRUE= GL_COND_LIBTOOL_FALSE='#' else GL_COND_LIBTOOL_TRUE='#' GL_COND_LIBTOOL_FALSE= fi gl_cond_libtool=false gl_libdeps= gl_ltlibdeps= gl_m4_base='m4' gl_source_base='lib' if test $ac_cv_func_alloca_works = no; then : fi # Define an additional variable used in the Makefile substitution. if test $ac_cv_working_alloca_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5 $as_echo_n "checking for alloca as a compiler built-in... " >&6; } if test "${gl_cv_rpl_alloca+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __GNUC__ || defined _AIX || defined _MSC_VER Need own alloca #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Need own alloca" >/dev/null 2>&1; then : gl_cv_rpl_alloca=yes else gl_cv_rpl_alloca=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5 $as_echo "$gl_cv_rpl_alloca" >&6; } if test $gl_cv_rpl_alloca = yes; then $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h ALLOCA_H=alloca.h else ALLOCA_H= fi else ALLOCA_H=alloca.h fi if test -n "$ALLOCA_H"; then GL_GENERATE_ALLOCA_H_TRUE= GL_GENERATE_ALLOCA_H_FALSE='#' else GL_GENERATE_ALLOCA_H_TRUE='#' GL_GENERATE_ALLOCA_H_FALSE= fi if test $ac_cv_func_canonicalize_file_name = no; then HAVE_CANONICALIZE_FILE_NAME=0 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext" if test $ac_cv_func_realpath = no; then HAVE_REALPATH=0 elif test "$gl_cv_func_realpath_works" != yes; then REPLACE_REALPATH=1 fi elif test "$gl_cv_func_realpath_works" != yes; then gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext" REPLACE_REALPATH=1 REPLACE_CANONICALIZE_FILE_NAME=1 fi cat >>confdefs.h <<_ACEOF #define GNULIB_CANONICALIZE_LGPL 1 _ACEOF GNULIB_CANONICALIZE_FILE_NAME=1 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h GNULIB_REALPATH=1 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h $as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h if test -n "$gl_replace_getopt"; then : GETOPT_H=getopt.h $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h GNULIB_UNISTD_H_GETOPT=1 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" : fi : gl_gettimeofday_timezone=void if test $ac_cv_func_gettimeofday != yes; then HAVE_GETTIMEOFDAY=0 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" for ac_header in sys/timeb.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default" if test "x$ac_cv_header_sys_timeb_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_TIMEB_H 1 _ACEOF fi done for ac_func in _ftime do : ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime" if test "x$ac_cv_func__ftime" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE__FTIME 1 _ACEOF fi done else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; } if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_func_gettimeofday_clobber=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { time_t t = 0; struct tm *lt; struct tm saved_lt; struct timeval tv; lt = localtime (&t); saved_lt = *lt; gettimeofday (&tv, NULL); return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_gettimeofday_clobber=no else gl_cv_func_gettimeofday_clobber=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; } if test $gl_cv_func_gettimeofday_clobber = yes; then REPLACE_GETTIMEOFDAY=1 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" for ac_header in sys/timeb.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default" if test "x$ac_cv_header_sys_timeb_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_TIMEB_H 1 _ACEOF fi done for ac_func in _ftime do : ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime" if test "x$ac_cv_func__ftime" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE__FTIME 1 _ACEOF fi done $as_echo "#define gmtime rpl_gmtime" >>confdefs.h $as_echo "#define localtime rpl_localtime" >>confdefs.h $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; } if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include struct timeval c; int gettimeofday (struct timeval *restrict, void *restrict); int main () { /* glibc uses struct timezone * rather than the POSIX void * if _GNU_SOURCE is defined. However, since the only portable use of gettimeofday uses NULL as the second parameter, and since the glibc definition is actually more typesafe, it is not worth wrapping this to get a compliant signature. */ int (*f) (struct timeval *restrict, void *restrict) = gettimeofday; int x = f (&c, 0); return !(x | c.tv_sec | c.tv_usec); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_func_gettimeofday_posix_signature=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int gettimeofday (struct timeval *restrict, struct timezone *restrict); int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_func_gettimeofday_posix_signature=almost else gl_cv_func_gettimeofday_posix_signature=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; } if test $gl_cv_func_gettimeofday_posix_signature = almost; then gl_gettimeofday_timezone='struct timezone' elif test $gl_cv_func_gettimeofday_posix_signature != yes; then REPLACE_GETTIMEOFDAY=1 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" for ac_header in sys/timeb.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default" if test "x$ac_cv_header_sys_timeb_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_TIMEB_H 1 _ACEOF fi done for ac_func in _ftime do : ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime" if test "x$ac_cv_func__ftime" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE__FTIME 1 _ACEOF fi done fi fi cat >>confdefs.h <<_ACEOF #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone _ACEOF GNULIB_GETTIMEOFDAY=1 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h PRIPTR_PREFIX= if test -n "$STDINT_H"; then PRIPTR_PREFIX='"l"' else for glpfx in '' l ll I64; do case $glpfx in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; I64) gltype1='__int64';; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include extern intptr_t foo; extern $gltype1 foo; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : PRIPTR_PREFIX='"'$glpfx'"' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test -n "$PRIPTR_PREFIX" && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; } if test "${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Work also in C++ mode. */ #define __STDC_LIMIT_MACROS 1 /* Work if build is not clean. */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H #include #if HAVE_STDINT_H #include #endif #if defined INT32_MAX && defined INTMAX_MAX #define CONDITION (INT32_MAX < INTMAX_MAX) #elif HAVE_LONG_LONG_INT #define CONDITION (sizeof (int) < sizeof (long long int)) #else #define CONDITION 0 #endif int test[CONDITION ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes else gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; } if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then INT32_MAX_LT_INTMAX_MAX=1; else INT32_MAX_LT_INTMAX_MAX=0; fi if test $APPLE_UNIVERSAL_BUILD = 0; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; } if test "${gl_cv_test_INT64_MAX_EQ_LONG_MAX+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Work also in C++ mode. */ #define __STDC_LIMIT_MACROS 1 /* Work if build is not clean. */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H #include #if HAVE_STDINT_H #include #endif #if defined INT64_MAX #define CONDITION (INT64_MAX == LONG_MAX) #elif HAVE_LONG_LONG_INT #define CONDITION (sizeof (long long int) == sizeof (long int)) #else #define CONDITION 0 #endif int test[CONDITION ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes else gl_cv_test_INT64_MAX_EQ_LONG_MAX=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; } if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then INT64_MAX_EQ_LONG_MAX=1; else INT64_MAX_EQ_LONG_MAX=0; fi else INT64_MAX_EQ_LONG_MAX=-1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; } if test "${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Work also in C++ mode. */ #define __STDC_LIMIT_MACROS 1 /* Work if build is not clean. */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H #include #if HAVE_STDINT_H #include #endif #if defined UINT32_MAX && defined UINTMAX_MAX #define CONDITION (UINT32_MAX < UINTMAX_MAX) #elif HAVE_LONG_LONG_INT #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int)) #else #define CONDITION 0 #endif int test[CONDITION ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes else gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; } if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then UINT32_MAX_LT_UINTMAX_MAX=1; else UINT32_MAX_LT_UINTMAX_MAX=0; fi if test $APPLE_UNIVERSAL_BUILD = 0; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; } if test "${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Work also in C++ mode. */ #define __STDC_LIMIT_MACROS 1 /* Work if build is not clean. */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H #include #if HAVE_STDINT_H #include #endif #if defined UINT64_MAX #define CONDITION (UINT64_MAX == ULONG_MAX) #elif HAVE_LONG_LONG_INT #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int)) #else #define CONDITION 0 #endif int test[CONDITION ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes else gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; } if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then UINT64_MAX_EQ_ULONG_MAX=1; else UINT64_MAX_EQ_ULONG_MAX=0; fi else UINT64_MAX_EQ_ULONG_MAX=-1 fi : : if test $gl_cv_have_include_next = yes; then gl_cv_next_inttypes_h='<'inttypes.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_inttypes_h+set}" = set; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_inttypes_h = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/inttypes.h#{ s#.*"\(.*/inttypes.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_inttypes_h='<'inttypes.h'>' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5 $as_echo "$gl_cv_next_inttypes_h" >&6; } fi NEXT_INTTYPES_H=$gl_cv_next_inttypes_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'inttypes.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_inttypes_h fi NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive $as_echo "#define GL_TRIGGER_STDC_LIMIT_MACROS 1" >>confdefs.h for gl_func in imaxabs imaxdiv strtoimax strtoumax; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval as_val=\$$as_gl_Symbol if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done : if test $ac_cv_func_lstat = yes; then if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then REPLACE_LSTAT=1 fi # Prerequisites of lib/lstat.c. else HAVE_LSTAT=0 fi GNULIB_LSTAT=1 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h for ac_func in mkdtemp do : ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp" if test "x$ac_cv_func_mkdtemp" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MKDTEMP 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done if test $ac_cv_func_mkdtemp = no; then HAVE_MKDTEMP=0 : fi GNULIB_MKDTEMP=1 $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h : if test $ac_cv_func_mkstemp = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5 $as_echo_n "checking for working mkstemp... " >&6; } if test "${gl_cv_func_working_mkstemp+set}" = set; then : $as_echo_n "(cached) " >&6 else mkdir conftest.mkstemp if test "$cross_compiling" = yes; then : gl_cv_func_working_mkstemp="guessing no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { int result = 0; int i; off_t large = (off_t) 4294967295u; if (large < 0) large = 2147483647; umask (0); for (i = 0; i < 70; i++) { char templ[] = "conftest.mkstemp/coXXXXXX"; int (*mkstemp_function) (char *) = mkstemp; int fd = mkstemp_function (templ); if (fd < 0) result |= 1; else { struct stat st; if (lseek (fd, large, SEEK_SET) != large) result |= 2; if (fstat (fd, &st) < 0) result |= 4; else if (st.st_mode & 0077) result |= 8; if (close (fd)) result |= 16; } } return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_working_mkstemp=yes else gl_cv_func_working_mkstemp=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -rf conftest.mkstemp fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5 $as_echo "$gl_cv_func_working_mkstemp" >&6; } if test "$gl_cv_func_working_mkstemp" != yes; then REPLACE_MKSTEMP=1 gl_LIBOBJS="$gl_LIBOBJS mkstemp.$ac_objext" fi else HAVE_MKSTEMP=0 gl_LIBOBJS="$gl_LIBOBJS mkstemp.$ac_objext" fi GNULIB_MKSTEMP=1 $as_echo "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h : : : if test $ac_cv_func_readlink = no; then HAVE_READLINK=0 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5 $as_echo_n "checking whether readlink signature is correct... " >&6; } if test "${gl_cv_decl_readlink_works+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Cause compilation failure if original declaration has wrong type. */ ssize_t readlink (const char *, char *, size_t); int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_decl_readlink_works=yes else gl_cv_decl_readlink_works=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5 $as_echo "$gl_cv_decl_readlink_works" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; } if test "${gl_cv_func_readlink_works+set}" = set; then : $as_echo_n "(cached) " >&6 else # We have readlink, so assume ln -s works. ln -s conftest.no-such conftest.link ln -s conftest.link conftest.lnk2 if test "$cross_compiling" = yes; then : gl_cv_func_readlink_works="guessing no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char buf[20]; return readlink ("conftest.lnk2/", buf, sizeof buf) != -1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_readlink_works=yes else gl_cv_func_readlink_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.link conftest.lnk2 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5 $as_echo "$gl_cv_func_readlink_works" >&6; } if test "$gl_cv_func_readlink_works" != yes; then $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h REPLACE_READLINK=1 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" elif test "$gl_cv_decl_readlink_works" != yes; then REPLACE_READLINK=1 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" fi fi GNULIB_READLINK=1 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h if test $gl_cv_have_include_next = yes; then gl_cv_next_signal_h='<'signal.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_signal_h+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/signal.h#{ s#.*"\(.*/signal.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5 $as_echo "$gl_cv_next_signal_h" >&6; } fi NEXT_SIGNAL_H=$gl_cv_next_signal_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'signal.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_signal_h fi NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive # AIX declares sig_atomic_t to already include volatile, and C89 compilers # then choke on 'volatile sig_atomic_t'. C99 requires that it compile. ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" " #include " if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then : else HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0 fi ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" " #include " if test "x$ac_cv_type_sighandler_t" = x""yes; then : else HAVE_SIGHANDLER_T=0 fi for gl_func in sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval as_val=\$$as_gl_Symbol if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done : { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; } if test "${gl_cv_func_stat_dir_slash+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case $host_os in mingw*) gl_cv_func_stat_dir_slash="guessing no";; *) gl_cv_func_stat_dir_slash="guessing yes";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct stat st; return stat (".", &st) != stat ("./", &st); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_stat_dir_slash=yes else gl_cv_func_stat_dir_slash=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5 $as_echo "$gl_cv_func_stat_dir_slash" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } if test "${gl_cv_func_stat_file_slash+set}" = set; then : $as_echo_n "(cached) " >&6 else touch conftest.tmp # Assume that if we have lstat, we can also check symlinks. if test $ac_cv_func_lstat = yes; then ln -s conftest.tmp conftest.lnk fi if test "$cross_compiling" = yes; then : gl_cv_func_stat_file_slash="guessing no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int result = 0; struct stat st; if (!stat ("conftest.tmp/", &st)) result |= 1; #if HAVE_LSTAT if (!stat ("conftest.lnk/", &st)) result |= 2; #endif return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_stat_file_slash=yes else gl_cv_func_stat_file_slash=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.tmp conftest.lnk fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5 $as_echo "$gl_cv_func_stat_file_slash" >&6; } case $gl_cv_func_stat_dir_slash in *no) REPLACE_STAT=1 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h ;; esac case $gl_cv_func_stat_file_slash in *no) REPLACE_STAT=1 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h ;; esac if test $REPLACE_STAT = 1; then gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" fi GNULIB_STAT=1 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h # Define two additional variables used in the Makefile substitution. if test "$ac_cv_header_stdbool_h" = yes; then STDBOOL_H='' else STDBOOL_H='stdbool.h' fi if test -n "$STDBOOL_H"; then GL_GENERATE_STDBOOL_H_TRUE= GL_GENERATE_STDBOOL_H_FALSE='#' else GL_GENERATE_STDBOOL_H_TRUE='#' GL_GENERATE_STDBOOL_H_FALSE= fi if test "$ac_cv_type__Bool" = yes; then HAVE__BOOL=1 else HAVE__BOOL=0 fi STDDEF_H= if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 STDDEF_H=stddef.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } if test "${gl_cv_decl_null_works+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int test[2 * (sizeof NULL == sizeof (void *)) -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gl_cv_decl_null_works=yes else gl_cv_decl_null_works=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 $as_echo "$gl_cv_decl_null_works" >&6; } if test $gl_cv_decl_null_works = no; then REPLACE_NULL=1 STDDEF_H=stddef.h fi if test -n "$STDDEF_H"; then GL_GENERATE_STDDEF_H_TRUE= GL_GENERATE_STDDEF_H_FALSE='#' else GL_GENERATE_STDDEF_H_TRUE='#' GL_GENERATE_STDDEF_H_FALSE= fi if test -n "$STDDEF_H"; then if test $gl_cv_have_include_next = yes; then gl_cv_next_stddef_h='<'stddef.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_stddef_h+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/stddef.h#{ s#.*"\(.*/stddef.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 $as_echo "$gl_cv_next_stddef_h" >&6; } fi NEXT_STDDEF_H=$gl_cv_next_stddef_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'stddef.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_stddef_h fi NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive fi if test $ac_cv_type_long_long_int = yes; then HAVE_LONG_LONG_INT=1 else HAVE_LONG_LONG_INT=0 fi if test $ac_cv_type_unsigned_long_long_int = yes; then HAVE_UNSIGNED_LONG_LONG_INT=1 else HAVE_UNSIGNED_LONG_LONG_INT=0 fi : if test $ac_cv_header_wchar_h = yes; then HAVE_WCHAR_H=1 else HAVE_WCHAR_H=0 fi if test $ac_cv_header_inttypes_h = yes; then HAVE_INTTYPES_H=1 else HAVE_INTTYPES_H=0 fi if test $ac_cv_header_sys_types_h = yes; then HAVE_SYS_TYPES_H=1 else HAVE_SYS_TYPES_H=0 fi : if test $gl_cv_have_include_next = yes; then gl_cv_next_stdint_h='<'stdint.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_stdint_h+set}" = set; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_stdint_h = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/stdint.h#{ s#.*"\(.*/stdint.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_stdint_h='<'stdint.h'>' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 $as_echo "$gl_cv_next_stdint_h" >&6; } fi NEXT_STDINT_H=$gl_cv_next_stdint_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'stdint.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_stdint_h fi NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive if test $ac_cv_header_stdint_h = yes; then HAVE_STDINT_H=1 else HAVE_STDINT_H=0 fi if test $ac_cv_header_stdint_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; } if test "${gl_cv_header_working_stdint_h+set}" = set; then : $as_echo_n "(cached) " >&6 else gl_cv_header_working_stdint_h=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ #if !(defined WCHAR_MIN && defined WCHAR_MAX) #error "WCHAR_MIN, WCHAR_MAX not defined in " #endif /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #ifdef INT8_MAX int8_t a1 = INT8_MAX; int8_t a1min = INT8_MIN; #endif #ifdef INT16_MAX int16_t a2 = INT16_MAX; int16_t a2min = INT16_MIN; #endif #ifdef INT32_MAX int32_t a3 = INT32_MAX; int32_t a3min = INT32_MIN; #endif #ifdef INT64_MAX int64_t a4 = INT64_MAX; int64_t a4min = INT64_MIN; #endif #ifdef UINT8_MAX uint8_t b1 = UINT8_MAX; #else typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; #endif #ifdef UINT16_MAX uint16_t b2 = UINT16_MAX; #endif #ifdef UINT32_MAX uint32_t b3 = UINT32_MAX; #endif #ifdef UINT64_MAX uint64_t b4 = UINT64_MAX; #endif int_least8_t c1 = INT8_C (0x7f); int_least8_t c1max = INT_LEAST8_MAX; int_least8_t c1min = INT_LEAST8_MIN; int_least16_t c2 = INT16_C (0x7fff); int_least16_t c2max = INT_LEAST16_MAX; int_least16_t c2min = INT_LEAST16_MIN; int_least32_t c3 = INT32_C (0x7fffffff); int_least32_t c3max = INT_LEAST32_MAX; int_least32_t c3min = INT_LEAST32_MIN; int_least64_t c4 = INT64_C (0x7fffffffffffffff); int_least64_t c4max = INT_LEAST64_MAX; int_least64_t c4min = INT_LEAST64_MIN; uint_least8_t d1 = UINT8_C (0xff); uint_least8_t d1max = UINT_LEAST8_MAX; uint_least16_t d2 = UINT16_C (0xffff); uint_least16_t d2max = UINT_LEAST16_MAX; uint_least32_t d3 = UINT32_C (0xffffffff); uint_least32_t d3max = UINT_LEAST32_MAX; uint_least64_t d4 = UINT64_C (0xffffffffffffffff); uint_least64_t d4max = UINT_LEAST64_MAX; int_fast8_t e1 = INT_FAST8_MAX; int_fast8_t e1min = INT_FAST8_MIN; int_fast16_t e2 = INT_FAST16_MAX; int_fast16_t e2min = INT_FAST16_MIN; int_fast32_t e3 = INT_FAST32_MAX; int_fast32_t e3min = INT_FAST32_MIN; int_fast64_t e4 = INT_FAST64_MAX; int_fast64_t e4min = INT_FAST64_MIN; uint_fast8_t f1 = UINT_FAST8_MAX; uint_fast16_t f2 = UINT_FAST16_MAX; uint_fast32_t f3 = UINT_FAST32_MAX; uint_fast64_t f4 = UINT_FAST64_MAX; #ifdef INTPTR_MAX intptr_t g = INTPTR_MAX; intptr_t gmin = INTPTR_MIN; #endif #ifdef UINTPTR_MAX uintptr_t h = UINTPTR_MAX; #endif intmax_t i = INTMAX_MAX; uintmax_t j = UINTMAX_MAX; #include /* for CHAR_BIT */ #define TYPE_MINIMUM(t) \ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) #define TYPE_MAXIMUM(t) \ ((t) ((t) 0 < (t) -1 \ ? (t) -1 \ : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) struct s { int check_PTRDIFF: PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) ? 1 : -1; /* Detect bug in FreeBSD 6.0 / ia64. */ int check_SIG_ATOMIC: SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) ? 1 : -1; int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; int check_WCHAR: WCHAR_MIN == TYPE_MINIMUM (wchar_t) && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) ? 1 : -1; /* Detect bug in mingw. */ int check_WINT: WINT_MIN == TYPE_MINIMUM (wint_t) && WINT_MAX == TYPE_MAXIMUM (wint_t) ? 1 : -1; /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ int check_UINT8_C: (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; int check_UINT16_C: (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; /* Detect bugs in OpenBSD 3.9 stdint.h. */ #ifdef UINT8_MAX int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; #endif #ifdef UINT16_MAX int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; #endif #ifdef UINT32_MAX int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; #endif #ifdef UINT64_MAX int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; #endif int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; }; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if test "$cross_compiling" = yes; then : gl_cv_header_working_stdint_h=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include #include #define MVAL(macro) MVAL1(macro) #define MVAL1(expression) #expression static const char *macro_values[] = { #ifdef INT8_MAX MVAL (INT8_MAX), #endif #ifdef INT16_MAX MVAL (INT16_MAX), #endif #ifdef INT32_MAX MVAL (INT32_MAX), #endif #ifdef INT64_MAX MVAL (INT64_MAX), #endif #ifdef UINT8_MAX MVAL (UINT8_MAX), #endif #ifdef UINT16_MAX MVAL (UINT16_MAX), #endif #ifdef UINT32_MAX MVAL (UINT32_MAX), #endif #ifdef UINT64_MAX MVAL (UINT64_MAX), #endif NULL }; int main () { const char **mv; for (mv = macro_values; *mv != NULL; mv++) { const char *value = *mv; /* Test whether it looks like a cast expression. */ if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 || strncmp (value, "((int)"/*)*/, 6) == 0 || strncmp (value, "((signed short)"/*)*/, 15) == 0 || strncmp (value, "((signed char)"/*)*/, 14) == 0) return mv - macro_values + 1; } return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_header_working_stdint_h=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 $as_echo "$gl_cv_header_working_stdint_h" >&6; } fi if test "$gl_cv_header_working_stdint_h" = yes; then STDINT_H= else for ac_header in sys/inttypes.h sys/bitypes.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_header_sys_inttypes_h = yes; then HAVE_SYS_INTTYPES_H=1 else HAVE_SYS_INTTYPES_H=0 fi if test $ac_cv_header_sys_bitypes_h = yes; then HAVE_SYS_BITYPES_H=1 else HAVE_SYS_BITYPES_H=0 fi if test $APPLE_UNIVERSAL_BUILD = 0; then for gltype in ptrdiff_t size_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 $as_echo_n "checking for bit size of $gltype... " >&6; } if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include "; then : else result=unknown fi eval gl_cv_bitsizeof_${gltype}=\$result fi eval ac_res=\$gl_cv_bitsizeof_${gltype} { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval result=\$gl_cv_bitsizeof_${gltype} if test $result = unknown; then result=0 fi GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` cat >>confdefs.h <<_ACEOF #define BITSIZEOF_${GLTYPE} $result _ACEOF eval BITSIZEOF_${GLTYPE}=\$result done fi for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 $as_echo_n "checking for bit size of $gltype... " >&6; } if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include "; then : else result=unknown fi eval gl_cv_bitsizeof_${gltype}=\$result fi eval ac_res=\$gl_cv_bitsizeof_${gltype} { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval result=\$gl_cv_bitsizeof_${gltype} if test $result = unknown; then result=0 fi GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` cat >>confdefs.h <<_ACEOF #define BITSIZEOF_${GLTYPE} $result _ACEOF eval BITSIZEOF_${GLTYPE}=\$result done for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 $as_echo_n "checking whether $gltype is signed... " >&6; } if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : result=yes else result=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext eval gl_cv_type_${gltype}_signed=\$result fi eval ac_res=\$gl_cv_type_${gltype}_signed { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval result=\$gl_cv_type_${gltype}_signed GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` if test "$result" = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_SIGNED_${GLTYPE} 1 _ACEOF eval HAVE_SIGNED_${GLTYPE}=1 else eval HAVE_SIGNED_${GLTYPE}=0 fi done gl_cv_type_ptrdiff_t_signed=yes gl_cv_type_size_t_signed=no if test $APPLE_UNIVERSAL_BUILD = 0; then for gltype in ptrdiff_t size_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 $as_echo_n "checking for $gltype integer literal suffix... " >&6; } if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval gl_cv_type_${gltype}_suffix=no eval result=\$gl_cv_type_${gltype}_signed if test "$result" = yes; then glsufu= else glsufu=u fi for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do case $glsuf in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; i64) gltype1='__int64';; u) gltype1='unsigned int';; ul) gltype1='unsigned long int';; ull) gltype1='unsigned long long int';; ui64)gltype1='unsigned __int64';; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif extern $gltype foo; extern $gltype1 foo; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval gl_cv_type_${gltype}_suffix=\$glsuf fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext eval result=\$gl_cv_type_${gltype}_suffix test "$result" != no && break done fi eval ac_res=\$gl_cv_type_${gltype}_suffix { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` eval result=\$gl_cv_type_${gltype}_suffix test "$result" = no && result= eval ${GLTYPE}_SUFFIX=\$result cat >>confdefs.h <<_ACEOF #define ${GLTYPE}_SUFFIX $result _ACEOF done fi for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 $as_echo_n "checking for $gltype integer literal suffix... " >&6; } if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval gl_cv_type_${gltype}_suffix=no eval result=\$gl_cv_type_${gltype}_signed if test "$result" = yes; then glsufu= else glsufu=u fi for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do case $glsuf in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; i64) gltype1='__int64';; u) gltype1='unsigned int';; ul) gltype1='unsigned long int';; ull) gltype1='unsigned long long int';; ui64)gltype1='unsigned __int64';; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif extern $gltype foo; extern $gltype1 foo; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval gl_cv_type_${gltype}_suffix=\$glsuf fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext eval result=\$gl_cv_type_${gltype}_suffix test "$result" != no && break done fi eval ac_res=\$gl_cv_type_${gltype}_suffix { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` eval result=\$gl_cv_type_${gltype}_suffix test "$result" = no && result= eval ${GLTYPE}_SUFFIX=\$result cat >>confdefs.h <<_ACEOF #define ${GLTYPE}_SUFFIX $result _ACEOF done STDINT_H=stdint.h fi if test -n "$STDINT_H"; then GL_GENERATE_STDINT_H_TRUE= GL_GENERATE_STDINT_H_FALSE='#' else GL_GENERATE_STDINT_H_TRUE='#' GL_GENERATE_STDINT_H_FALSE= fi if test $gl_cv_have_include_next = yes; then gl_cv_next_stdlib_h='<'stdlib.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_stdlib_h+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/stdlib.h#{ s#.*"\(.*/stdlib.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5 $as_echo "$gl_cv_next_stdlib_h" >&6; } fi NEXT_STDLIB_H=$gl_cv_next_stdlib_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'stdlib.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_stdlib_h fi NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt unsetenv; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if HAVE_SYS_LOADAVG_H # include #endif #if HAVE_RANDOM_H # include #endif int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval as_val=\$$as_gl_Symbol if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done : if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_stat_h='<'sys/stat.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_sys_stat_h+set}" = set; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_sys_stat_h = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/sys/stat.h#{ s#.*"\(.*/sys/stat.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_sys_stat_h='<'sys/stat.h'>' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 $as_echo "$gl_cv_next_sys_stat_h" >&6; } fi NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'sys/stat.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_sys_stat_h fi NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include #include " if test "x$ac_cv_type_nlink_t" = x""yes; then : else $as_echo "#define nlink_t int" >>confdefs.h fi for gl_func in fchmodat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval as_val=\$$as_gl_Symbol if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done gl_LIBOBJS="$gl_LIBOBJS tempname.$ac_objext" : : if test $gl_cv_have_include_next = yes; then gl_cv_next_unistd_h='<'unistd.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_unistd_h+set}" = set; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_unistd_h = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/unistd.h#{ s#.*"\(.*/unistd.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_unistd_h='<'unistd.h'>' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5 $as_echo "$gl_cv_next_unistd_h" >&6; } fi NEXT_UNISTD_H=$gl_cv_next_unistd_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'unistd.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_unistd_h fi NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive if test $ac_cv_header_unistd_h = yes; then HAVE_UNISTD_H=1 else HAVE_UNISTD_H=0 fi for gl_func in chown dup2 dup3 environ euidaccess faccessat fchdir fchownat fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat usleep; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Some systems declare various items in the wrong headers. */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include # include # include # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include # endif #endif int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval as_val=\$$as_gl_Symbol if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done # End of code from modules gltests_libdeps= gltests_ltlibdeps= gl_source_base='tests' gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS gl_module_indicator_condition=$gltests_WITNESS LIBGNU_LIBDEPS="$gl_libdeps" LIBGNU_LTLIBDEPS="$gl_ltlibdeps" LIBS="$X_LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 $as_echo_n "checking for sqrt in -lm... " >&6; } if test "${ac_cv_lib_m_sqrt+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sqrt (); int main () { return sqrt (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_sqrt=yes else ac_cv_lib_m_sqrt=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 $as_echo "$ac_cv_lib_m_sqrt" >&6; } if test "x$ac_cv_lib_m_sqrt" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yywrap in -lfl" >&5 $as_echo_n "checking for yywrap in -lfl... " >&6; } if test "${ac_cv_lib_fl_yywrap+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char yywrap (); int main () { return yywrap (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fl_yywrap=yes else ac_cv_lib_fl_yywrap=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fl_yywrap" >&5 $as_echo "$ac_cv_lib_fl_yywrap" >&6; } if test "x$ac_cv_lib_fl_yywrap" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBFL 1 _ACEOF LIBS="-lfl $LIBS" fi # Needed e. g. on Mac OS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv_open in -liconv" >&5 $as_echo_n "checking for iconv_open in -liconv... " >&6; } if test "${ac_cv_lib_iconv_iconv_open+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-liconv $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char iconv_open (); int main () { return iconv_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_iconv_iconv_open=yes else ac_cv_lib_iconv_iconv_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_iconv_open" >&5 $as_echo "$ac_cv_lib_iconv_iconv_open" >&6; } if test "x$ac_cv_lib_iconv_iconv_open" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBICONV 1 _ACEOF LIBS="-liconv $LIBS" fi # Check whether --with-libzio was given. if test "${with_libzio+set}" = set; then : withval=$with_libzio; opt_zio=$withval else opt_zio=yes fi if test "$opt_zio" != "no" ; then # # Check for zlib and libbz2 libraries to use this together # with SuSE's libzio to open compressed files. # savedLIBS=$LIBS ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" if test "x$ac_cv_header_zlib_h" = x""yes; then : for lib in z gz do as_ac_Lib=`$as_echo "ac_cv_lib_$lib''_gzopen" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzopen in -l$lib" >&5 $as_echo_n "checking for gzopen in -l$lib... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$lib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gzopen (); int main () { return gzopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval as_val=\$$as_ac_Lib if test "x$as_val" = x""yes; then : LIBS="$LIBS -l$lib" ; break fi done fi ac_fn_c_check_header_mongrel "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default" if test "x$ac_cv_header_bzlib_h" = x""yes; then : for lib in bz2 bzip2 do as_ac_Lib=`$as_echo "ac_cv_lib_$lib''_BZ2_bzopen" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzopen in -l$lib" >&5 $as_echo_n "checking for BZ2_bzopen in -l$lib... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$lib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char BZ2_bzopen (); int main () { return BZ2_bzopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval as_val=\$$as_ac_Lib if test "x$as_val" = x""yes; then : LIBS="$LIBS -l$lib" ; break fi done fi ac_fn_c_check_header_mongrel "$LINENO" "zio.h" "ac_cv_header_zio_h" "$ac_includes_default" if test "x$ac_cv_header_zio_h" = x""yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fzopen in -lzio" >&5 $as_echo_n "checking for fzopen in -lzio... " >&6; } if test "${ac_cv_lib_zio_fzopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lzio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char fzopen (); int main () { return fzopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_zio_fzopen=yes else ac_cv_lib_zio_fzopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zio_fzopen" >&5 $as_echo "$ac_cv_lib_zio_fzopen" >&6; } if test "x$ac_cv_lib_zio_fzopen" = x""yes; then : LIBS="$LIBS -lzio" ; $as_echo "#define HAVE_ZIO 1" >>confdefs.h else LIBS=$savedLIBS fi else LIBS=$savedLIBS fi fi # Check whether --with-default-papersize was given. if test "${with_default_papersize+set}" = set; then : withval=$with_default_papersize; opt_default_papersize=$withval else opt_default_papersize=A4 fi test "$opt_default_papersize" = "yes" && { opt_default_papersize=A4 } PAPERSIZE=$opt_default_papersize # Check whether --with-print-command was given. if test "${with_print_command+set}" = set; then : withval=$with_print_command; opt_print_command=$withval else opt_print_command=lpr fi test "$opt_print_command" = "yes" && { opt_print_command=\"lpr\" } PRINT_COMMAND=$opt_print_command # Check whether --with-user-defaults-file was given. if test "${with_user_defaults_file+set}" = set; then : withval=$with_user_defaults_file; opt_user_defaults_file=$withval else opt_user_defaults_file="~/.gv" fi test "$opt_user_defaults_file" = "yes" && { opt_user_defaults_file="~/.gv" } cat >>confdefs.h <<_ACEOF #define USER_DEFAULTS "$opt_user_defaults_file" _ACEOF # Check whether --with-scratch-dir was given. if test "${with_scratch_dir+set}" = set; then : withval=$with_scratch_dir; opt_scratch_dir=$withval else opt_scratch_dir="/tmp/" fi test "$opt_scratch_dir" = "yes" && { opt_scratch_dir="/tmp/" } SCRATCH_DIR=$opt_scratch_dir # Check whether --with-save-dir was given. if test "${with_save_dir+set}" = set; then : withval=$with_save_dir; opt_save_dir=$withval else opt_save_dir="~/" fi test "$opt_save_dir" = "yes" && { opt_save_dir="~/" } SAVE_DIR=$opt_save_dir # Check whether --enable-ps-level-one was given. if test "${enable_ps_level_one+set}" = set; then : enableval=$enable_ps_level_one; opt_ps_level_one=$enableval else opt_ps_level_one=no fi test "$opt_ps_level_one" = "yes" && { $as_echo "#define PSLevel1 /**/" >>confdefs.h } # Check whether --enable-signal-handler was given. if test "${enable_signal_handler+set}" = set; then : enableval=$enable_signal_handler; opt_signal_handler=$enableval else opt_signal_handler=yes fi test "x$opt_signal_handler" = "xyes" && { $as_echo "#define USE_SIGNAL_HANDLER /**/" >>confdefs.h } # Check whether --enable-backing-pixmap was given. if test "${enable_backing_pixmap+set}" = set; then : enableval=$enable_backing_pixmap; opt_backing_pixmap=$enableval else opt_backing_pixmap=yes fi test "$opt_backing_pixmap" = "yes" && { USE_BACKING_PIXMAP=True } test "$opt_backing_pixmap" = "no" && { USE_BACKING_PIXMAP=False } # Check whether --enable-scrollbar-code was given. if test "${enable_scrollbar_code+set}" = set; then : enableval=$enable_scrollbar_code; case "${enableval}" in yes) opt_scrollbar_code=true ;; no) opt_scrollbar_code=false ;; *) as_fn_error "bad value ${enableval} for --enable-scrollbar-code" "$LINENO" 5 ;; esac else opt_scrollbar_code=true fi if test x$opt_scrollbar_code = xtrue; then USE_SCROLLBAR_CODE_TRUE= USE_SCROLLBAR_CODE_FALSE='#' else USE_SCROLLBAR_CODE_TRUE='#' USE_SCROLLBAR_CODE_FALSE= fi # Check whether --enable-memmove-code was given. if test "${enable_memmove_code+set}" = set; then : enableval=$enable_memmove_code; opt_memmove_code=$enableval else opt_memmove_code=yes fi test "$opt_memmove_code" = "yes" && { $as_echo "#define USE_MEMMOVE_CODE /**/" >>confdefs.h } # Check whether --enable-runtime-messages was given. if test "${enable_runtime_messages+set}" = set; then : enableval=$enable_runtime_messages; opt_runtime_messages=$enableval else opt_runtime_messages=no fi test "$opt_runtime_messages" = "yes" && { $as_echo "#define MESSAGES /**/" >>confdefs.h $as_echo "#define MESSAGE_NO_ESC /**/" >>confdefs.h } # Check whether --enable-fallback-styles was given. if test "${enable_fallback_styles+set}" = set; then : enableval=$enable_fallback_styles; opt_fallback_styles=$enableval else opt_fallback_styles=yes fi test "$opt_fallback_styles" = "yes" && { $as_echo "#define USE_FALLBACK_STYLES /**/" >>confdefs.h } if test x$opt_fallback_styles = xyes; then ENABLE_FALLBACK_STYLES_TRUE= ENABLE_FALLBACK_STYLES_FALSE='#' else ENABLE_FALLBACK_STYLES_TRUE='#' ENABLE_FALLBACK_STYLES_FALSE= fi # Check whether --enable-memmove-code was given. if test "${enable_memmove_code+set}" = set; then : enableval=$enable_memmove_code; opt_memmove_code=$enableval else opt_memmove_code=yes fi test "$opt_memmove_code" = "yes" && { $as_echo "#define USE_MEMMOVE_CODE /**/" >>confdefs.h } # Check whether --enable-international was given. if test "${enable_international+set}" = set; then : enableval=$enable_international; opt_international=$enableval else opt_international=no fi if test x$opt_international = xyes; then ENABLE_INTERNATIONAL_TRUE= ENABLE_INTERNATIONAL_FALSE='#' else ENABLE_INTERNATIONAL_TRUE='#' ENABLE_INTERNATIONAL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGCLD" >&5 $as_echo_n "checking for SIGCLD... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef SIGCLD we_have_sigcld #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "we_have_sigcld" >/dev/null 2>&1; then : $as_echo "#define HAVE_SIGCLD 1" >>confdefs.h haveSIGCLD=yes else haveSIGCLD=no fi rm -f conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $haveSIGCLD" >&5 $as_echo "$haveSIGCLD" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGCHLD" >&5 $as_echo_n "checking for SIGCHLD... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef SIGCHLD we_have_sigchld #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "we_have_sigchld" >/dev/null 2>&1; then : $as_echo "#define HAVE_SIGCHLD 1" >>confdefs.h haveSIGCHLD=yes else haveSIGCHLD=no fi rm -f conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $haveSIGCHLD" >&5 $as_echo "$haveSIGCHLD" >&6; } # Check whether --enable-SIGCHLD-fallback was given. if test "${enable_SIGCHLD_fallback+set}" = set; then : enableval=$enable_SIGCHLD_fallback; case "${enableval}" in yes) opt_sigchld=true ;; no) opt_sigchld=false ;; *) as_fn_error "bad value ${enableval} for --enable-SIGCHLD-fallback" "$LINENO" 5 ;; esac else opt_sigchld=false fi if test "x$haveSIGCLD" = "xno" then if test x$opt_sigchld = xfalse then as_fn_error "SIGCLD is needed. You can try --enable-SIGCHLD-fallback. It's secure on MacOS X, but on FreeBSD the fallback creates zombies." "$LINENO" 5 else $as_echo "#define SIGCLD SIGCHLD" >>confdefs.h fi fi opt_setenv_code=unknown # Check whether --enable-setenv-code was given. if test "${enable_setenv_code+set}" = set; then : enableval=$enable_setenv_code; case "${enableval}" in yes) opt_setenv_code=true ;; no) opt_setenv_code=false ;; *) as_fn_error "bad value ${enableval} for --enable-setenv-code" "$LINENO" 5 ;; esac else opt_setenv_code=unknown fi if test x$opt_setenv_code = xunknown then for ac_func in setenv unsetenv do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" eval as_val=\$$as_ac_var if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else as_fn_error "The configure option --disable-setenv-code or --enable-setenv-code should help." "$LINENO" 5 fi done fi if test x$opt_setenv_code = xtrue; then USE_SETENV_CODE_TRUE= USE_SETENV_CODE_FALSE='#' else USE_SETENV_CODE_TRUE='#' USE_SETENV_CODE_FALSE= fi # Check whether --enable-off_t was given. if test "${enable_off_t+set}" = set; then : enableval=$enable_off_t; case "${enableval}" in yes) opt_off_t=true ;; no) opt_off_t=false ;; *) as_fn_error "bad value ${enableval} for --enable-off_t" "$LINENO" 5 ;; esac else for ac_func in ftello fseeko do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" eval as_val=\$$as_ac_var if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF opt_off_t=true else opt_off_t=false fi done fi test "$opt_off_t" = "true" && { # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if test "${ac_cv_sys_largefile_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if test "${ac_cv_sys_file_offset_bits+set}" = set; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if test "${ac_cv_sys_large_files+set}" = set; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -rf conftest* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } if test "${ac_cv_sys_largefile_source+set}" = set; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* for off_t */ #include int main () { int (*fp) (FILE *, off_t, int) = fseeko; return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_sys_largefile_source=no; break fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGEFILE_SOURCE 1 #include /* for off_t */ #include int main () { int (*fp) (FILE *, off_t, int) = fseeko; return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_sys_largefile_source=1; break fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_cv_sys_largefile_source=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 $as_echo "$ac_cv_sys_largefile_source" >&6; } case $ac_cv_sys_largefile_source in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source _ACEOF ;; esac rm -rf conftest* # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug # in glibc 2.1.3, but that breaks too many other things. # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. if test $ac_cv_sys_largefile_source != unknown; then $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h fi echo Enabling LFS. $as_echo "#define HAVE_OFF_T /**/" >>confdefs.h } if test x$opt_off_t = xtrue; then USE_OFF_T_TRUE= USE_OFF_T_FALSE='#' else USE_OFF_T_TRUE='#' USE_OFF_T_FALSE= fi #################### X11 related stuff ###################### { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } # Check whether --with-x was given. if test "${with_x+set}" = set; then : withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl dylib la dll; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /usr/lib64 | /lib | /lib64) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # We can compile using X headers with no special include directory. ac_x_includes= else for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { XrmInitialize () ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else LIBS=$ac_save_LIBS for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl dylib la dll; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 $as_echo "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 $as_echo_n "checking whether -R must be followed by a space... " >&6; } ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" ac_xsave_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } X_LIBS="$X_LIBS -R $x_libraries" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 $as_echo "neither works" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_c_werror_flag=$ac_xsave_c_werror_flag LIBS=$ac_xsave_LIBS fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn Johnson says this is needed for Ultrix, if the X # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XOpenDisplay (); int main () { return XOpenDisplay (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_dnet_ntoa=yes else ac_cv_lib_dnet_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_stub_dnet_ntoa=yes else ac_cv_lib_dnet_stub_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" if test "x$ac_cv_func_gethostbyname" = x""yes; then : fi if test $ac_cv_func_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname=yes else ac_cv_lib_nsl_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bsd_gethostbyname=yes else ac_cv_lib_bsd_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says Simon Leinen: it contains gethostby* # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" if test "x$ac_cv_func_connect" = x""yes; then : fi if test $ac_cv_func_connect = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 $as_echo_n "checking for connect in -lsocket... " >&6; } if test "${ac_cv_lib_socket_connect+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char connect (); int main () { return connect (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_connect=yes else ac_cv_lib_socket_connect=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 $as_echo "$ac_cv_lib_socket_connect" >&6; } if test "x$ac_cv_lib_socket_connect" = x""yes; then : X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" if test "x$ac_cv_func_remove" = x""yes; then : fi if test $ac_cv_func_remove = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 $as_echo_n "checking for remove in -lposix... " >&6; } if test "${ac_cv_lib_posix_remove+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char remove (); int main () { return remove (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_posix_remove=yes else ac_cv_lib_posix_remove=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 $as_echo "$ac_cv_lib_posix_remove" >&6; } if test "x$ac_cv_lib_posix_remove" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" if test "x$ac_cv_func_shmat" = x""yes; then : fi if test $ac_cv_func_shmat = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 $as_echo_n "checking for shmat in -lipc... " >&6; } if test "${ac_cv_lib_ipc_shmat+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shmat (); int main () { return shmat (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ipc_shmat=yes else ac_cv_lib_ipc_shmat=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 $as_echo "$ac_cv_lib_ipc_shmat" >&6; } if test "x$ac_cv_lib_ipc_shmat" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS=$LDFLAGS test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char IceConnectionNumber (); int main () { return IceConnectionNumber (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ICE_IceConnectionNumber=yes else ac_cv_lib_ICE_IceConnectionNumber=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then : X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi LDFLAGS=$ac_save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XOpenDisplay in -lX11" >&5 $as_echo_n "checking for XOpenDisplay in -lX11... " >&6; } if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lX11 $X_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XOpenDisplay (); int main () { return XOpenDisplay (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_X11_XOpenDisplay=yes else ac_cv_lib_X11_XOpenDisplay=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_X11_XOpenDisplay" >&5 $as_echo "$ac_cv_lib_X11_XOpenDisplay" >&6; } if test "x$ac_cv_lib_X11_XOpenDisplay" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBX11 1 _ACEOF LIBS="-lX11 $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lICE" >&5 $as_echo_n "checking for main in -lICE... " >&6; } if test "${ac_cv_lib_ICE_main+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ICE_main=yes else ac_cv_lib_ICE_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_main" >&5 $as_echo "$ac_cv_lib_ICE_main" >&6; } if test "x$ac_cv_lib_ICE_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBICE 1 _ACEOF LIBS="-lICE $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lSM" >&5 $as_echo_n "checking for main in -lSM... " >&6; } if test "${ac_cv_lib_SM_main+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lSM $X_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_SM_main=yes else ac_cv_lib_SM_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_main" >&5 $as_echo "$ac_cv_lib_SM_main" >&6; } if test "x$ac_cv_lib_SM_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSM 1 _ACEOF LIBS="-lSM $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXext" >&5 $as_echo_n "checking for main in -lXext... " >&6; } if test "${ac_cv_lib_Xext_main+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXext $X_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xext_main=yes else ac_cv_lib_Xext_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_main" >&5 $as_echo "$ac_cv_lib_Xext_main" >&6; } if test "x$ac_cv_lib_Xext_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXEXT 1 _ACEOF LIBS="-lXext $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XtOpenDisplay in -lXt" >&5 $as_echo_n "checking for XtOpenDisplay in -lXt... " >&6; } if test "${ac_cv_lib_Xt_XtOpenDisplay+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXt $X_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XtOpenDisplay (); int main () { return XtOpenDisplay (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xt_XtOpenDisplay=yes else ac_cv_lib_Xt_XtOpenDisplay=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xt_XtOpenDisplay" >&5 $as_echo "$ac_cv_lib_Xt_XtOpenDisplay" >&6; } if test "x$ac_cv_lib_Xt_XtOpenDisplay" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXT 1 _ACEOF LIBS="-lXt $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXmu" >&5 $as_echo_n "checking for main in -lXmu... " >&6; } if test "${ac_cv_lib_Xmu_main+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXmu $X_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xmu_main=yes else ac_cv_lib_Xmu_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_main" >&5 $as_echo "$ac_cv_lib_Xmu_main" >&6; } if test "x$ac_cv_lib_Xmu_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXMU 1 _ACEOF LIBS="-lXmu $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXpm" >&5 $as_echo_n "checking for main in -lXpm... " >&6; } if test "${ac_cv_lib_Xpm_main+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXpm $X_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xpm_main=yes else ac_cv_lib_Xpm_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_main" >&5 $as_echo "$ac_cv_lib_Xpm_main" >&6; } if test "x$ac_cv_lib_Xpm_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXPM 1 _ACEOF LIBS="-lXpm $LIBS" fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DEPS" >&5 $as_echo_n "checking for DEPS... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$DEPS_CFLAGS"; then pkg_cv_DEPS_CFLAGS="$DEPS_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw3d\""; } >&5 ($PKG_CONFIG --exists --print-errors "xaw3d") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DEPS_CFLAGS=`$PKG_CONFIG --cflags "xaw3d" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$DEPS_LIBS"; then pkg_cv_DEPS_LIBS="$DEPS_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw3d\""; } >&5 ($PKG_CONFIG --exists --print-errors "xaw3d") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DEPS_LIBS=`$PKG_CONFIG --libs "xaw3d" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then DEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xaw3d"` else DEPS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xaw3d"` fi # Put the nasty error message in config.log where it belongs echo "$DEPS_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } DEPS_CFLAGS=""; DEPS_LIB="" elif test $pkg_failed = untried; then DEPS_CFLAGS=""; DEPS_LIB="" else DEPS_CFLAGS=$pkg_cv_DEPS_CFLAGS DEPS_LIBS=$pkg_cv_DEPS_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } true fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawInitializeWidgetSet in -lXaw3d" >&5 $as_echo_n "checking for XawInitializeWidgetSet in -lXaw3d... " >&6; } if test "${ac_cv_lib_Xaw3d_XawInitializeWidgetSet+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXaw3d $X_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XawInitializeWidgetSet (); int main () { return XawInitializeWidgetSet (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xaw3d_XawInitializeWidgetSet=yes else ac_cv_lib_Xaw3d_XawInitializeWidgetSet=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawInitializeWidgetSet" >&5 $as_echo "$ac_cv_lib_Xaw3d_XawInitializeWidgetSet" >&6; } if test "x$ac_cv_lib_Xaw3d_XawInitializeWidgetSet" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXAW3D 1 _ACEOF LIBS="-lXaw3d $LIBS" else as_fn_error "Unable to find a valid Xaw3d library. Please install it and rerun configure." "$LINENO" 5 fi CFLAGS="$CFLAGS $DEPS_CFLAGS" LIBS="$LIBS $DEPS_LIBS" myCPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS" ## AC_CHECK_MEMBER(SimplePart.international,,[AC_MSG_ERROR([Xaw3d misses internationalisation support])],[#include ]) ac_fn_c_check_member "$LINENO" "SimplePart" "international" "ac_cv_member_SimplePart_international" "#include " if test "x$ac_cv_member_SimplePart_international" = x""yes; then : opt_xaw3d_international=true else opt_xaw3d_international=false fi test x$opt_xaw3d_international = xtrue && { $as_echo "#define HAVE_XAW3D_INTERNATIONAL /**/" >>confdefs.h } test x$opt_xaw3d_international = xfalse && { echo echo "****************************************************" echo "WARNING: international support has not been detected" echo " in your version of Xaw3d. The UTF8-Support" echo " of GNU gv has been disabled." echo "****************************************************" echo } CPPFLAGS="$myCPPFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXinerama" >&5 $as_echo_n "checking for main in -lXinerama... " >&6; } if test "${ac_cv_lib_Xinerama_main+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXinerama $X_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xinerama_main=yes else ac_cv_lib_Xinerama_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_main" >&5 $as_echo "$ac_cv_lib_Xinerama_main" >&6; } if test "x$ac_cv_lib_Xinerama_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXINERAMA 1 _ACEOF LIBS="-lXinerama $LIBS" fi #################### END: X11 related stuff ###################### ac_config_files="$ac_config_files Makefile lib/Makefile src/Makefile doc/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then as_fn_error "conditional \"GL_GENERATE_ERRNO_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi gl_libobjs= gl_ltlibobjs= if test -n "$gl_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gl_libobjs="$gl_libobjs $i.$ac_objext" gl_ltlibobjs="$gl_ltlibobjs $i.lo" done fi gl_LIBOBJS=$gl_libobjs gl_LTLIBOBJS=$gl_ltlibobjs gltests_libobjs= gltests_ltlibobjs= if test -n "$gltests_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gltests_libobjs="$gltests_libobjs $i.$ac_objext" gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" done fi gltests_LIBOBJS=$gltests_libobjs gltests_LTLIBOBJS=$gltests_ltlibobjs if test -z "${USE_SCROLLBAR_CODE_TRUE}" && test -z "${USE_SCROLLBAR_CODE_FALSE}"; then as_fn_error "conditional \"USE_SCROLLBAR_CODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_FALLBACK_STYLES_TRUE}" && test -z "${ENABLE_FALLBACK_STYLES_FALSE}"; then as_fn_error "conditional \"ENABLE_FALLBACK_STYLES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_INTERNATIONAL_TRUE}" && test -z "${ENABLE_INTERNATIONAL_FALSE}"; then as_fn_error "conditional \"ENABLE_INTERNATIONAL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_SETENV_CODE_TRUE}" && test -z "${USE_SETENV_CODE_FALSE}"; then as_fn_error "conditional \"USE_SETENV_CODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_OFF_T_TRUE}" && test -z "${USE_OFF_T_FALSE}"; then as_fn_error "conditional \"USE_OFF_T\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error ERROR [LINENO LOG_FD] # --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "src/ac_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/ac_config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit $? fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi gv-3.7.4/README.I18N0000664000076400007640000000352011735247005010436 00000000000000GV I18N Fontset Patch Keio University in Japan 1998 Yasuyuki Furukawa This patch make gv to support UTF8. Note that Xaw3d version 1.5E or 1.6.1 or newer is required for UTF8-Support. Note that UTF8-Mode is currently turned off by default. To enable it, you have two possibilities: 1. include the resource GV*international: True e. g. in ~/.gv 2. The configure parameter --enable-international will turn on international by default. NEED: Xaw3d 1.4, 1.5 and 1.6.0 and 1.6.1 has a fatal bug in MultiSrc.c line 735-740. This GV's patch need Xaw3d library patched follow: *** xc/lib/Xaw3d/MultiSrc.c Fri May 15 04:03:23 1998 --- xc-fix/lib/Xaw3d/MultiSrc.c Fri Dec 18 09:59:52 1998 @@ -736,6 +736,7 @@ if ( string_set || (old_src->multi_src.type != src->multi_src.type) ) { RemoveOldStringOrFile(old_src, string_set); + src->multi_src.allocated_string = old_src->multi_src.allocated_string; file = InitStringOrFile(src, string_set); /* Load pieces does this logic for us, but it shouldn't. Its messy.*/ Another bug in Xaw3d will segfault in closing the application. The following patch will fix it: --- XawIm.c +++ XawIm.c @@ -331,12 +331,12 @@ static void DestroyAllIM( ve ) /* * Close Input Method */ - CloseIM(ve); if (!XFindContext(XDisplayOfIM(ve->im.xim), (Window)ve->im.xim, errContext, (XPointer*)&contextErrData)) { if (contextErrData) XtFree((char *)contextErrData); } XDeleteContext(XDisplayOfIM(ve->im.xim), (Window)ve->im.xim, errContext); + CloseIM(ve); ve->im.xim = NULL; /* A collection of Xaw3D 1.5E and 1.6.x bug fixing patches can be found on git://gitorious.org/xaw3d/xaw3d.git. For Xaw3d 1.5E take the master branch, for libXaw3d 1.6.x take the "v1.6-branch", "v1.6.1-branch" and so on. gv-3.7.4/aclocal.m40000664000076400007640000012411412121323350010727 00000000000000# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, [m4_warning([this file was generated for autoconf 2.65. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, 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 # General Public License for more details. # # You should have received a copy of the GNU 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. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure to call # PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$PKG_CONFIG"; then if test -n "$$1"; then pkg_cv_[]$1="$$1" else PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) fi else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless `enable' is passed literally. # For symmetry, `disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/00gnulib.m4]) m4_include([m4/alloca.m4]) m4_include([m4/canonicalize.m4]) m4_include([m4/double-slash-root.m4]) m4_include([m4/eealloc.m4]) m4_include([m4/errno_h.m4]) m4_include([m4/extensions.m4]) m4_include([m4/getopt.m4]) m4_include([m4/gettimeofday.m4]) m4_include([m4/gnulib-common.m4]) m4_include([m4/gnulib-comp.m4]) m4_include([m4/include_next.m4]) m4_include([m4/inttypes-pri.m4]) m4_include([m4/inttypes.m4]) m4_include([m4/longlong.m4]) m4_include([m4/lstat.m4]) m4_include([m4/malloca.m4]) m4_include([m4/mkdtemp.m4]) m4_include([m4/mkstemp.m4]) m4_include([m4/multiarch.m4]) m4_include([m4/onceonly.m4]) m4_include([m4/pathmax.m4]) m4_include([m4/readlink.m4]) m4_include([m4/signal_h.m4]) m4_include([m4/stat.m4]) m4_include([m4/stdbool.m4]) m4_include([m4/stddef_h.m4]) m4_include([m4/stdint.m4]) m4_include([m4/stdlib_h.m4]) m4_include([m4/sys_stat_h.m4]) m4_include([m4/sys_time_h.m4]) m4_include([m4/tempname.m4]) m4_include([m4/time_h.m4]) m4_include([m4/unistd_h.m4]) m4_include([m4/warn-on-use.m4]) m4_include([m4/wchar_t.m4]) gv-3.7.4/c++defs.h0000664000076400007640000002675311735103745010502 00000000000000/* C++ compatible function declaration macros. Copyright (C) 2010-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H #define _GL_CXXDEFS_H /* The three most frequent use cases of these macros are: * For providing a substitute for a function that is missing on some platforms, but is declared and works fine on the platforms on which it exists: #if @GNULIB_FOO@ # if !@HAVE_FOO@ _GL_FUNCDECL_SYS (foo, ...); # endif _GL_CXXALIAS_SYS (foo, ...); _GL_CXXALIASWARN (foo); #elif defined GNULIB_POSIXCHECK ... #endif * For providing a replacement for a function that exists on all platforms, but is broken/insufficient and needs to be replaced on some platforms: #if @GNULIB_FOO@ # if @REPLACE_FOO@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef foo # define foo rpl_foo # endif _GL_FUNCDECL_RPL (foo, ...); _GL_CXXALIAS_RPL (foo, ...); # else _GL_CXXALIAS_SYS (foo, ...); # endif _GL_CXXALIASWARN (foo); #elif defined GNULIB_POSIXCHECK ... #endif * For providing a replacement for a function that exists on some platforms but is broken/insufficient and needs to be replaced on some of them and is additionally either missing or undeclared on some other platforms: #if @GNULIB_FOO@ # if @REPLACE_FOO@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef foo # define foo rpl_foo # endif _GL_FUNCDECL_RPL (foo, ...); _GL_CXXALIAS_RPL (foo, ...); # else # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ _GL_FUNCDECL_SYS (foo, ...); # endif _GL_CXXALIAS_SYS (foo, ...); # endif _GL_CXXALIASWARN (foo); #elif defined GNULIB_POSIXCHECK ... #endif */ /* _GL_EXTERN_C declaration; performs the declaration with C linkage. */ #if defined __cplusplus # define _GL_EXTERN_C extern "C" #else # define _GL_EXTERN_C extern #endif /* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); declares a replacement function, named rpl_func, with the given prototype, consisting of return type, parameters, and attributes. Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ _GL_EXTERN_C rettype rpl_func parameters_and_attributes /* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); declares the system function, named func, with the given prototype, consisting of return type, parameters, and attributes. Example: _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); */ #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ _GL_EXTERN_C rettype func parameters_and_attributes /* _GL_CXXALIAS_RPL (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to rpl_func, if GNULIB_NAMESPACE is defined. Example: _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); */ #define _GL_CXXALIAS_RPL(func,rettype,parameters) \ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ namespace GNULIB_NAMESPACE \ { \ rettype (*const func) parameters = ::rpl_func; \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different declaration. A cast is used to silence the "invalid conversion" error that would otherwise occur. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ namespace GNULIB_NAMESPACE \ { \ rettype (*const func) parameters = \ reinterpret_cast(::rpl_func); \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE is defined. Example: _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); */ #if defined __cplusplus && defined GNULIB_NAMESPACE /* If we were to write rettype (*const func) parameters = ::func; like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls better (remove an indirection through a 'static' pointer variable), but then the _GL_CXXALIASWARN macro below would cause a warning not only for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */ # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ namespace GNULIB_NAMESPACE \ { \ static rettype (*func) parameters = ::func; \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); is like _GL_CXXALIAS_SYS (func, rettype, parameters); except that the C function func may have a slightly different declaration. A cast is used to silence the "invalid conversion" error that would otherwise occur. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ namespace GNULIB_NAMESPACE \ { \ static rettype (*func) parameters = \ reinterpret_cast(::func); \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); is like _GL_CXXALIAS_SYS (func, rettype, parameters); except that the C function is picked among a set of overloaded functions, namely the one with rettype2 and parameters2. Two consecutive casts are used to silence the "cannot find a match" and "invalid conversion" errors that would otherwise occur. */ #if defined __cplusplus && defined GNULIB_NAMESPACE /* The outer cast must be a reinterpret_cast. The inner cast: When the function is defined as a set of overloaded functions, it works as a static_cast<>, choosing the designated variant. When the function is defined as a single variant, it works as a reinterpret_cast<>. The parenthesized cast syntax works both ways. */ # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ namespace GNULIB_NAMESPACE \ { \ static rettype (*func) parameters = \ reinterpret_cast( \ (rettype2(*)parameters2)(::func)); \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIASWARN (func); causes a warning to be emitted when ::func is used but not when GNULIB_NAMESPACE::func is used. func must be defined without overloaded variants. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIASWARN(func) \ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) # define _GL_CXXALIASWARN_1(func,namespace) \ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ # if !__OPTIMIZE__ # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING # define _GL_CXXALIASWARN_2(func,namespace) \ extern __typeof__ (func) func # else # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_EXTERN_C int _gl_cxxalias_dummy # endif #else # define _GL_CXXALIASWARN(func) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); causes a warning to be emitted when the given overloaded variant of ::func is used but not when GNULIB_NAMESPACE::func is used. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ GNULIB_NAMESPACE) # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ # if !__OPTIMIZE__ # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ extern __typeof__ (func) func # else # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ _GL_EXTERN_C int _gl_cxxalias_dummy # endif #else # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif #endif /* _GL_CXXDEFS_H */ gv-3.7.4/README0000664000076400007640000000070611735103745007765 00000000000000-*- mode: text; coding: utf-8 -*- Time-stamp: "07/06/28 16:04:08 jemarch" README for gv ============= This is version 3.6.5 of gv, an X11 ghostscript frontend based on Tim Theisen's ghostview 1.5. The most recent version may be obtained from gv's homepage at http://www.gnu.org/software/gv/ or via anonymous ftp from ftp://ftp.gnu.org/gnu/gv/ Please send suggestions or bug reports to bug-gv@gnu.org -- José E. Marchesi (jemarch@gnu.org) gv-3.7.4/README.TRANSLATION0000664000076400007640000000612311735103745011561 00000000000000(1) Prerequisites Make sure that GNU gv has been installed if you want to test the translation. In this case also make sure you have turned on international mode for GNU gv (see README.I18N for details). Otherwise compiling GNU gv and taking the generated file "src/gv-update-userconfig" will be enough. Also make sure that perl 5.8 or newer is working. (2) File names of the translation file The file has to be named "$LOCLAE.dat", where $LOCALE may be e. g. "de_AT.utf8" for the austrian locale. See appendix "(B) Naming locales" for details. If you do not have a translation file, start with an empty one, that is, create one with "touch $LOCALE.dat". (3) Getting the file to translate / Updating it simply run "gv-update-userconfig -i $LOCALE.dat" This command will add all strings that are not in the translation file to the end of that file. (4) Translating the strings After (3) you will find in your $LOCALE.dat many lines like the followings: GV*copyright.Label: Copyright GV*miscmenuLabel.label: Misc Menu Entries GV*optionsgv.Label: gv Options ... GV*mark.Label: Mark GV*dismiss.Label: Dismiss Just overwrite the right hand side with your translation. Important: Do not change the "GV.version" resource which may look like the following: GV.version: gv 3.6.7.90 (5) Testing your translation (optional) Create a symlink "~/.gv-$LOCALE" to the rranslation file $LOCALE.dat unless you have already done so. Just run gv, your symlink "~/.gv-$LOCALE" will ensure that your translation is used instead of GNU gv's own strings. (6) Submitting the translated files See my job discription on http://sv.gnu.org/projects/gv for details. I'll check if they are syntactically correct and copy them to "src/nls" in the distribution tarball of GNU gv and update the src/nls/LANGUAGES file. (A) What to do of more locales share the same translation strings? src/nls/LANGUAGES can contain aliases for languages. Assume "de_CH.utf8" uses the same translation strings as "de_AT.utf8". "echo 'de_AT.utf8 -> de_CH.utf8' >> LANGUAGES" tells GNU gv to use the strings from the locale "de_AT.utf8" for the locale "de_CH.utf8". (B) Naming locales A locale is named "language[_territory][.codeset][@modifier]". If the complete locale does not match to one of the translations, the modifier is removed. If this still does not match, the territory is removed. IMPORTANT NOTE: If international mode is turned off, the locale is prefixed with "noint:", e. g. "noint:en_US". So locales are named "noint:language[_territory]". Note that multibyte characters are not available in non-international mode. For that reason it is wise not to use the translation from the international mode for the non-international mode and codeset and modifier are not used to identify a translation. It's ok not to provide a translation for the non-international mode. But you can provide one if you think that this is a good idea. TODO: Which charset to use in non-international mode? 7-bit-ASCII might be a good choice. gv-3.7.4/NEWS0000664000076400007640000011542712117145137007607 00000000000000-*- coding: utf-8 -*- Notation: --------- In the list below some paragraphs (or lines) are marked either by a '#' or a '*' or a '?'. A '*' marks some internal change of which the user doesn't see anything. '#' denotes a change which is noticeable by the user. '?' describes a known problem which is not fixed yet. %%%%%%%%%%%%%%%%%%% GV 3.7.4 (March 2013) %%%%%%%%%%%%%%%%%%%%%%%%%% # Fixed CVE-2012-3386 (by using updated automake) # Fixed bug-gv] Problem after saving gv-settings # improve wording of gv-update-userconfig manual # Scrolling and memory access improved # README.I18N adjusted for libXaw3d 1.6.x # Fixed GNU gv 3.6.4 - 3.7.3 page selector button geometry bug %%%%%%%%%%%%%%%%%%% GV 3.7.3.90 (March 2012) %%%%%%%%%%%%%%%%%%%%%%%%%% # Support for libXaw3d-1.6.x %%%%%%%%%%%%%%%%%%% GV 3.7.3 (November 2011) %%%%%%%%%%%%%%%%%%%%%%%%%% # Updated Translations %%%%%%%%%%%%%%%%%%% GV 3.7.2.90 (October 2011) %%%%%%%%%%%%%%%%%%%%%%%%%% ? Reverted fix of debian bug #594991: unexpected scrolling of the TOC widget", this fixes the following bug: # Pressng END does not scroll TOC wodget. # Fixed "Save document" dialog for PDF files # Fix debian bug 627471: gv: fails to read bounding box (depending on the command line!), see http://bugs.debian.org/627471 for details # ignore resource and style files without absolute paths (in order to improve security) # Do not install files that re not used # avoid make distcheck failing because of gv-i18n.h * Update gnulib, import signal, # this should fix compiling on Mac OS again * Improved handling of DSC parse errors * Varuos code cleanups - for details see either CHANGELOG or the git repotory. %%%%%%%%%%%%%%%%%%% GV 3.7.2 (April 2011) %%%%%%%%%%%%%%%%%%%%%%%%%% # Minor bugfix ? "Fit to window magnification" and "Fit width to window magnification" with "Automatic resizing" turned on sometime miss rescaling, especially when changing the orientation or resizing the window. You can force rescaling by selecting the active "special" scale in the scales menu. ? Interactive prompting for the password of encrypted PDF files do not work if and only if DSC is turned off. As a workarouund, you can load the file with DSC turned on and then turn DSC off. %%%%%%%%%%%%%%%%%%% GV 3.7.1.90 (April 2011) %%%%%%%%%%%%%%%%%%%%%%%%%% # Fix Debian bug #594991: unexpected scrolling of the TOC widget # Fixed file descriptor leak # Added Dutch, French, Italian and Spanish translation * Code cleanup %%%%%%%%%%%%%%%%%%% GV 3.7.1 (June 2010) %%%%%%%%%%%%%%%%%%%%%%%%%%%%% # Fix bug [bug #30081] gv 3.7.0: unable to print/save pdf files. %%%%%%%%%%%%%%%%%%% GV 3.7.0 (June 2010) %%%%%%%%%%%%%%%%%%%%%%%%%%%%% * GV 3.6.91 has been released as GV 3.7.0 with no changes but some minor code cleanups. %%%%%%%%%%%%%%%%%%% GV 3.6.91 (June 2010) %%%%%%%%%%%%%%%%%%%%%%%%%%%%% # Support starting ghostscript from a safe directory. # ghostscript is started with -P- if SAFER is enabled. # ghostscript is started with -dSAFER and -dDELAYSAFER for "pdf2dsc" and "pdf2ps" if safer is enabled # Minor bugfixes %%%%%%%%%%%%%%%%%%% GV 3.6.90 (May 2010) %%%%%%%%%%%%%%%%%%%%%%%%%%%%% # Fix compiling on Mac OS X # Support for localised user interfaces %%%%%%%%%%%%%%%%%%% GV 3.6.9 (April 2010) %%%%%%%%%%%%%%%%%%%%%%%%%%%%% # Bugfix in gv-update-userconfig %%%%%%%%%%%%%%%%%%% GV 3.6.8.91 (March 2010) %%%%%%%%%%%%%%%%%%%%%%%%%%%%% # Fixed compiling on Xaw3d 1.5. %%%%%%%%%%%%%%%%%%% GV 3.6.8.90 (March 2010) %%%%%%%%%%%%%%%%%%%%%%%%%%%%% # UTF-8 Support. Read the included file README.I18N for details. %%%%%%%%%%%%%%%%%%% GV 3.6.8 (December 2009) %%%%%%%%%%%%%%%%%%%%%%%%%%%%% # GV 3.6.7.90 has been released as GV 3.6.8 with no changes ? "Fit to window magnification" and "Fit width to window magnification" with "Automatic resizing" turned on sometime miss rescaling, especially when changing the orientation or resizing the window. You can force rescaling by selecting the active "special" scale in the scales menu. ? Interactive prompting for the password of encrypted PDF files do not work if and only if DSC is turned off. As a workarouund, you can load the file with DSC turned on and then turn DSC off. %%%%%%%%%%%%%%%%%%% GV 3.6.7.90 (December 2009) %%%%%%%%%%%%%%%%%%%%%%%%%%% # Compilation fix for Mac OS X: Requires --enable-SIGCHLD-fallback during compilation. # "Fit height to window magnification" -- currently works best with "Automatic resizing" turned off. With --scale=-1003, you can access the new scale from the command line. # Improved handling of filename "-" (which means read document from stdin) %%%%%%%%%%%%%%%%%%% GV 3.6.7 (March 2009) %%%%%%%%%%%%%%%%%%%%%%%%%%%%% # GV 3.6.6.92 has been released as GV 3.6.7 with no changes ? "Fit to window magnification" and "Fit width to window magnification" with "Automatic resizing" turned on sometime miss rescaling, especially when changing the orientation or resizing the window. You can force rescaling by selecting the active "special" scale in the scales menu. ? Interactive prompting for the password of encrypted PDF files do not work if and only if DSC is turned off. As a workarouund, you can load the file with DSC turned on and then turn DSC off. %%%%%%%%%%%%%% GV 3.6.6.92 (internal release: March 2009) %%%%%%%%%%%%%% # Fixed debian bug #516995: Misleading error message when .gv file is not present [and XUSERFILESEARCHPATH is used] %%%%%%%%%%%%%%%%%%% GV 3.6.6.91 (February 2009) %%%%%%%%%%%%%%%%%%%%%%%% # Fixed a bug in switching to presentation mode. # Fixed reset scrolling position in open dialog when changing directories. %%%%%%%%%%%%%%%%%%% GV 3.6.6.90 (January 2009) %%%%%%%%%%%%%%%%%%%%%%%% # TOC can now display more than about 2000 pages (fixes bug #24069). # File open dialog can now display more than about 2000 files (fixes ubuntu bug #274767). # By pressing "Shift-P" or selecting "State/Presentation Mode", you can open another instance of GNU gv which is in presentation mode. %%%%%%%%%%%%%%%%%%% GV 3.6.6 (September 2008) %%%%%%%%%%%%%%%%%%%%%%%% # Updated maintainer's e-mail address, otherwise no changes %%%%%%%%%%%%%%%%%%% GV 3.6.5.92 (September 2008) %%%%%%%%%%%%%%%%%%%%% # libzio is now used if available during compile time %%%%%%%%%%%%%%%%%%% GV 3.6.5.91 (September 2008) %%%%%%%%%%%%%%%%%%%%% # gv-update-userconfig now offers the options -n resp. -N to switch to an alternative navigation: After each page switch (except if selected by the page number) the page is scrolled to the top (if switching forward) resp. the bottom (if switching backward). # gv-update-userconfig can remove the resources inserted by -n resp. -N with the new option -s. # Support for encrypted PDF files. New command line switch "--password=PASSWORD" for opening encrypted PDFs. If the password is not supplied via command line, the user will be asked to enter it. # Support for files > 2GB on file systems with large file support. ? Interactive prompting for the password of encrypted PDF files do not work if and only if DSC is turned off. As a workarouund, you can load the file with DSC turned on and then turn DSC off. %%%%%%%%%%%%%%%%%%% GV 3.6.5.90 (August 2008) %%%%%%%%%%%%%%%%%%%%%%%% # the current coordinate can be saved to a file by the z resp. the u key. See gv.info for details. # The return key now scrolls through the whole document vertically. Unlike the space key no horizontal scrolling is performed. The old function of the return key is still available through the "Page Down" and the "f" key. # *.ad and *.dat files are installed to $PREFIX/share/gv # "ERROR:" and "error:" now also trigger the info popup in error mode # Xinerama support. It can be configured by the "xinerama"-resource. Its values can be "On", "Off" or "Auto". "Auto" is the default. # New helper Script "gv-update-userconfig", which is a simple script to update an .gv config file to the current version of gv. # Should build on Solaris now using sun studio 11 compiler %%%%%%%%%%%%%%%%%%% GV 3.6.5 (July 2008) %%%%%%%%%%%%%%%%%%%%%%%%%%%%% # GV 3.6.4.91 has been released as GV 3.6.5 with no changes ? "Fit to window magnification" and "Fit width to window magnification" with "Automatic resizing" turned on sometime miss rescaling, especially when changing the orientation or resizing the window. You can force rescaling by selecting the active "special" scale in the scales menu. %%%%%%%%%%%%%%%%%%% GV 3.6.4.91 (June 2008) %%%%%%%%%%%%%%%%%%%%%%%%%% # ~/.gv now contains the version that has saved that configuration. %%%%%%%%%%%%%%%%%%% GV 3.6.4.90 (June 2008) %%%%%%%%%%%%%%%%%%%%%%%%%% * Build-system ensures that the man-page is always up to date # Fixed some compiler warnings # Added new widgetless mode, usable via option "--widgetless" # --help, --usage and --version now work without having an X11 display # --spartan and --widgetless now use embedded resources. Before this bugfix, you had to use --style=gv_spartan.dat to use the embedded resource. # --infoSilent, --infoErrors and --infoAll will control, which ghostscript messages will lead to an info pop-up window. The same effect can be reached via a resource "infoVerbose", which values can be "Silent", "Errors" and "All". It can also be edited via the "gv options" dialog. # "Fit to window magnification" and "Fit width to window magnification" -- currently works best with "Automatic resizing" turned off. With --scale=-1000 resp. --scale=-1001, you can access these special scales from the command line. ? "Fit to window magnification" and "Fit width to window magnification" with "Automatic resizing" turned on sometime miss rescaling, especially when changing the orientation or resizing the window. You can force rescaling by selecting the active "special" scale in the scales menu. # Arbitrary scales are now possible - input them in the gv options dialog or with --scale=n, where n is a float. # New fullscreen mode which needs support from the window manager # New command line switch "--presentation" as a shortcut for "--fullscreen --noresize --scale=-1000 --widgetless" %%%%%%%%%%%%%%%%%%% GV 3.6.4 (June 2008) %%%%%%%%%%%%%%%%%%%%%%%%%%%%% # GV 3.6.3.90 has been released as GV 3.6.4 with no changes %%%%%%%%%%%%%%%%%%% GV 3.6.3.90 (May 2008) %%%%%%%%%%%%%%%%%%%%%%%%%%% # DSC parser now respects the level of BeginDocument/EndDocument # Possible segfault has been fixed # Fixed bug #21239: Vlist.c produces garbage if International is set # Fixed bug #21740: popup windows may partly invisible as not on the screen # The escape key is now working in more contexts # The filename can optionally be shown insted of the title # Fixed bug #23199: No error message for errors in opened file * Got rid of non-free code. %%%%%%%%%%%%%%%%%%% GV 3.6.3 (June 2007) %%%%%%%%%%%%%%%%%%%%%%%%%%%%% # gv is now able to work with latest ghostscript: gs 8.57 # The bug causing the version not to figure in the manual has been fixed. # The SIGINT signal is now masked (ignored) by gv. # gv no more segfaults when reading a configuration file as produced by State -> Setup Options -> Save # gv should compile in non-GNU system that doesnt have glib2. The `getopt' gnulib module has been imported to fix this. # gv now correctly adjust the page index window after PAGE-UP and PAGE-DOWN events. # gv is now able to open files with minus character beginning filenames. # X resources related bugs has been fixed. gv is now able to get resources from the display database, user file, gv system database and command line doing the Right Thing (TM). # gv is now able to correctly understand DocumentMedia and other DSC directives that uses postscript strings. It was not possible with previous versions due to a bug in the postscript names scanning routine. * Vulnerability CVE-2006-5864 has been fixed. * gs is now invoked with `-dFIXEDMEDIA' * The internal gettext implementation has been renamed to `ps_gettext' to avoid collisions with the builtin `gettext' function. * --quiet and --noquiet now works as expected. ? There are troubles with 64 bits machines: the use of x-pointers to store data should be eliminated in subsequent versions. %%%%%%%%%%%%%%%%%%% GV 3.6.2 (14 December 2006) %%%%%%%%%%%%%%%%%%%%%% ? There are troubles with 64 bits machines: the use of x-pointers to store data should be eliminated from the sources. ? It is not possible to zoom when viewing PDF 1.4 files. PDF 1.5 files are not supported at all. ? The quality of postcript files generated by saving PDF files is poor. ? See http://savannah.gnu.org/bugs/?group=gv for more known bugs on this release. %%%%%%%%%%%%%%%%%%% GV 3.6.1 (?? December 2004) %%%%%%%%%%%%%%%%%%%%%% # New set of command line arguments. This solves the horrid bug on gv 3.6.0 that made such release nearly unusable. See the documentation for details about the new argument list. # The "Reopen" entry on the File menu has been renamed to "Reload" in order to be coherent with the "Reload" button. # The distributed package structure have been fixed, now conforming a legal GNU source package. # The delete key now work as expected, that is, it deletes the next character rather the last character when typed on text entries. # Dot files are not shown by default on file selection forms. # If you try to open an empty file you get a coherent error message. # New manual page * Most of the Debian patches has been applied to gv: 162830_scanf.diff (Fix a security risk involving buffer overflows) 167029_argv.diff (Fix an access beyond end of array on process.c) 206008_flicker.diff (Add double-buffering to pixmap operations) 223556_hidden_dir.diff (Do not show dot files on file listings) 250854_tmp_umask.diff (Tempfiles should not be created worldreadable) 252548_errno.diff (Wrong error message while opening empty files) 179643_bad_dsc.diff (Make DSC parsing case-insensitive) 159433_delete_key.diff (Change behaviour of Delete key on text entries) * The gs command used for PDF to PostScript conversion has been fixed to allow document saving. ? It is not possible to zoom when viewing PDF 1.4 files. PDF 1.5 files are not supported at all. ? The quality of postcript files generated by saving PDF files is poor. ? See http://savannah.gnu.org/bugs/?group=gv for more known bugs on this release. %%%%%%%%%%%%%%%%%%% GV 3.6.0 (20 November 2004) %%%%%%%%%%%%%%%%%%%%%% # New configuration/compilation/installation using GNU Autotools # Documentation is now distributed in texinfo format. # "Redisplay" button has been renamed to "Reload". # Some GNU standard command line arguments are supported now: --help, --usage and --version. # Antialiasing is now used by default. # Solved bug #11014: gv is capable to open files with spaces (or other harm character) in the filename. %%%%%%%%%%%%%%%%%%% GV 3.5.8 (21 June 1997) %%%%%%%%%%%%%%%%%%%%%%%%%% # Bugfix: The command line option "-geometry" didn't work correctly (neither did the GV.Geometry resource). # Bugfix: Use a LabeledLineTextField instead of a LabeledTextField for the "Screen Size" in the "Setup Options". # Keep the number of the displayed page "in sight" in the table of contents if the geometry of the main window changes. # Automatically use "Fixed Size" if a fixed window width or height is prescribed by the "-geometry" command line option or the "GV.geometry" resource. # Kill ghostscript processes in zoom windows immediately after the page is rendered and not when the window is closed. # Disallow the "Misc Menu" in zoom windows. # Define and change the default resources "GV*dirs", "GV*filter" and "GV*filters" in source/Imakefile and source/descrip.mms since they are Unix/VMS specific. # Remove the "GV.geometry: +10+10" resource from the default resource files. %%%%%%%%%%%%%%%%%%% GV 3.5.3 (9 June 1997) %%%%%%%%%%%%%%%%%%%%%%%%%%%% # Bugfix: Fixed compilation problems on Solaris. [ thanks to Yamamoto Hirotaka for sending a patch ] %%%%%%%%%%%%%%%%%%% GV 3.5.2 (7 June 1997) %%%%%%%%%%%%%%%%%%%%%%%%%%%% # Bugfix: Zooming didn't work for large magnifications. # Bugfix: "Redisplay" still jumped back to the first page when the file changed. How funny ... # Bugfix: "Auto Center" didn't work as it should. # Bugfix: Removed a debugging printf(...) call from the zoom code. # Bugfix: Removed some drawing flaws in the Vlist widget (table of contents). # Bugfix: Show caret in the print confirmation dialog and set the insert position to the end of the print command. # Bugfix: Action GV_Resizing() didn't work. # Bugfix: File Selection Popup allowed weird things after not being able to access a directory. # Added a keyboard scrolling "Eye Guide": when scrolling a temporary border is drawn around the previously visible area. The feature may be disabled in the "Setup Options". # Changed the keyboard bindings in the main window. This was necessary to fully take advantage of the capabilities of the new action GV_Page() which is now responsible for navigating with keyboard events through the document. People will hate me for doing that, but it was overdue ... Some examples: - Allow to move through a document by using a single key. For instance the key "Space" scrolls in vertical strips and jumps to the next page if the bottom/right edge of a page is reached. ("BackSpace" reverses this operation). - Allow to move to a page by typing its page number on the keypad, followed by pressing "Enter" on the keypad. Pressing (Keypad +) or (Keypad -) followed by (Keypad Enter) does the obvioys thing. # Clicking on the ">>" button in the main window with mouse button 1,2,3 jumps +1,+5,+10 pages. Analogously for the "<<" button ... # Take care that the mark highlighting the current page in the table of contents always remains visible. # Added command line option "-v" to display version information. # Highlight the "Dismiss" button in zoom windows and let pressing "Return" close the window. # Let the table of contents not become to broad for exorbitantly long page labels. # Removed the action GV_HandleEOF() and its key binding to key "E". * Changed resource syntax "*.Translations" to "*.baseTranslations" to allow overriding event bindings in user resource files. * Made USE_FALLBACK_STYLES the default. * Replaced the actions GV_Scroll(),GV_Next(),GV_Previous(),GV_Show(), GV_Center() and GV_Redisplay() by the more flexible action GV_Page(). * Bugfix: Correct header "error.h" for Linux/Alpha. * Bugfix: Corrected a typo in source/Imakefile that caused the "fallbackPageMedia" not to be recognized correctly. * Added possibility to install documentation via "make install.doc". * Removed the directory 'old' from the distribution. %%%%%%%%%%%%%%%%%%% GV 3.4.12 (1 June 1997) %%%%%%%%%%%%%%%%%%%%%%%%%%%% # Bugfix: Zooming didn't work correctly in non portrait orientations. # Bugfix: "Update File" jumped back to the first page. # Bugfix: "Redisplay" jumped back to the first page when the file changed. # Bugfix: When compiling USE_FALLBACK_STYLES didn't work as intended. # Bugfix: Command line options -watch and -nowatch didn't work. # Bugfix: The "watchFile" resource was not taken into account properly. # Bugfix: Viewing gzipped non-DSC files didn't work. # Bugfix: Wrong postscript coordinates were shown in the main window when using non portrait orientation. # Compatibility: Allow the command line options -letter -tabloid, -ledger, -legal, -statement, -executive, -a0, -a1, -a2, -a3, -a4, -a5, -b4, -b5, -folio, -quarto, -10x14 for backwards compatibility as an undocumented feature. # Compatibility: Allow the command line option "-magstep " as synonym for "-scale " for compatibility reasons but as an undocumented feature. # Fix manpage so that 'apropos postscript' lists gv. %%%%%%%%%%%%%%%%%%% GV 3.4.3 (26 April 1997) %%%%%%%%%%%%%%%%%%%%%%%%%%% # Fix a missing dependancy in the Imakefile which caused 'gv_intern_res_unix.h' not to be created sometimes. %%%%%%%%%%%%%%%%%%% GV 3.4.2 (26 April 1997) %%%%%%%%%%%%%%%%%%%%%%%%%%% # Fix a bug which caused 'Segmentation Faults' when performing certain operations after starting gv with a file name on the command line. # Add the automatic decompression feature for VMS. [thanks to Tim Adye (adye@v2.rl.ac.uk) for sending a patch] # Replace the concept of "magsteps" by "scales" and "scale bases". This also caused the "-dpi", "-xdpi" and "-ydpi" option to vanish. # Allow to specify additional scales, scale bases and paper sizes in the option popups. # Allow to provide the screen size to view documents in their natural size. # Change the way how gv handles resource files. A full set of required resources is now always compiled into the executable, system and user specific resource files contain by default only the very limited set of resources which may be interesting to change by non gv-developers. This has the side effect that - the chance of gv complaining about no or incompatible resources is minimized. - security sensitive resources (those of type 'GVintern') can now be treated in a unified way without loss of security and may also be specified in the system specific resource file. # When opening/saving a file pressing 'Return' now rescans the directory if the provided path doesn't seem to be a file but a directory. # Add the command line otions '-pixmap' and '-nopixmap' to trigger the value of the 'useBackingPixmap' resource (which, in this turn, became a resource of gv). # Remove the "-letter", "-a4" etc. page media options. Instead the option "-media " should be used. # Allow to compile style files into the executable (currently this only affects gv_spartan.dat). # The 'Uncompress' text field in the options window didn't show a cursor. # For a given papersize or bounding box the displayed area was a little too small; one or two postscript points were omitted. %%%%%%%%%%%%%%%%%%% GV 3.2.4 (15 April 1997) %%%%%%%%%%%%%%%%%%%%%%%%%%% # Let gv handle gzipped, zipped or compressed files (this feature is not available on VMS). # Create another options window for ghostscript specific settings. In the 'State' menu there are now entries 'gv Options' and 'Ghostscript options'. # Make the on-screen menu that pops up when clicking with the third mouse button on the displayed page configurable via the 'miscMenu' resource. # Let gv (optionally) show the name of the displayed file in the window title bar. # Add an entry "BBox" to the PageMedia menu and use the document's bounding box information even if it is not an EPSF. # Define the command line option '-spartan' as a shortcut for '-style gv_spartan.dat'. # Add 'Toggle even marks', 'Toggle odd marks', 'Toggle current mark' and 'Unmark all' entries to the 'Page' menu. # Add 'Automatic resizing' entry to the 'State' menu. # Remove the 'Update File' button from the main window and add an entry 'Update' to the 'File' menu instead. # Fix a memory bug that caused seg faults when scanning documents specifying more than one papersize in the context of '%%DocumentPaperSizes:' comments. This bug was in there since the dawn of time .... # Rename the macro definition 'O_NONE' to something which is not used on AIX. [thanks to Larry Schwimmer ]. # Use fork() instead of vfork() (except on VMS). [thanks again to Larry Schwimmer ]. # Change the test for SunOS in the Imakefile. [thanks once more to Larry Schwimmer ]. # Include a code modification to avoid Bus error crashs on HP/UX 9.07. [thanks to Christian Illinger ] # The list of top- and sub-directories was not scrollable in horizontal direction. %%%%%%%%%%%%%%%%%%% GV 3.1.6 (8 April 1997) %%%%%%%%%%%%%%%%%%%%%%%%%%%% # Fix the 'Filters' menu which was broken in 3.1.4 (showed entries with all spaces removed). * Redefine 'InstallProgram' in the source/Imakefile to respect BINDIR and GV_BINDIR (which was a problem on Solaris). # On VMS use a smaller font in the 'Path' field of the file selection popup. # Let the file selection window grow in width when the path or filter becomes longer. %%%%%%%%%%%%%%%%%%% GV 3.1.4 (6 April 1997) %%%%%%%%%%%%%%%%%%%%%%%%%%%% # Tim Adye (adye@v2.rl.ac.uk) and William Bader (william@nscs.fast.net) sent me a large patch which has been merged into this version. Their changes include: - an excellent improvement to the postcript scanner which allows to ignore bogus 'End of File' (EOF) comments. The main effect is that if you have a document which embeds other documents without the proper 'BeginDocument', 'EndDocument' comments then the chances are good that they can still be previewed. And believe me, there are many such documents .... This feature can be turned on/off by means of the '-eof' and '-noeof' command line option or via an entry in the 'State' menu or via ... . - a 'confirm quit' popup which (by default) shows up when trying to leave gv while PDF to PS conversions are still in progress. - a signal handler to clean up ghostscript subprocesses when gv receives a SIGQUIT, SIGINT or SIGTERM signal. SIGHUP causes gv to display a new version of the current if it exists. - an FAQ which is now part of the documentation. - better name suggestions when saving data. - and about 3681 other improvements which are not mentioned here. # More work on the postscript scanner: increase initial buffer size and adjust its size increment when reallocation is needed. Also increase the anumber of bytes read in one turn. This reduces memory reallocation and memory shifting to a minimum. # Fix a bug in the postscript scanner which caused faulty behaviour when reading lines longer than about 100kB. # Add a "Next Page" and "Previous Page" button to the main window. # Further extend the "Options" menu. # Add a "Watch file" feature which checks the displayed file periodically if activated. If the document changes the new version is displayed. # Add a menu "State" to the main window which holds entries previously found in the "File" menu without having anything to do with any file. # Add Mouse bindings for two button mice: actions bound to the third button can be accessed by using the second button while pressing the Shift key. # Include some 'memmove()' replacement for systems which don't provide this function. The code will be activated by defining 'USE_MEMMOVE_CODE' in the configuration file 'confg.Unix'. # Use the 'Vlist' widget (instead of the 'List' widget) to display files and directories in the file selection popup. # Add scrolllbars to the file selection popup. They are not needed since scrolling can be done directly in the windows of the file and directory lists by using the event sequence 'button down, move mouse, button release'. However, the scrollbars reappeared since the mails asking why the lists cannot be scrolled start to fill my hard disc. # Fix the 'A' key (for antialiasing) which stopped working recently. # *Try* to provide some more helpful message when gv detects incompatible resources. # Change the format of the manpage. * Change 'ifdef _DECC' to 'if defined (__DECC) && defined (VMS)' in error.c. %%%%%%%%%%%%%%%%%%% GV 3.0.4 (1 April 1997) %%%%%%%%%%%%%%%%%%%%%%%%%%%% # Allow to choose and save a default filter from within the options menu. # Add the filter 'GV*filter: no .*' to the user resource file. This defines the filter 'no .*' as default when opening the file selection popup. # Fix the 'two-pixel' bug that caused the page marks to overlap with the indicator for the current page. # Correct syntax in Imakefile which was not understood by non-'GNU makes'. * Avoid unnecessary drawing of shadows in the table of contents. %%%%%%%%%%%%%%%%%%% GV 3.0.0 (31 March 1997) %%%%%%%%%%%%%%%%%%%%%%%%%%% # Provide a new 'Look and Feel' by using - 'feather touch' buttons, toggles and menus instead of the standard ones with raised shadows. - a new table of contents. Apart from looking better this has the side effect that the table of contents can now be scrolled in the same way as the main window, the zoom window and the file and directory lists in the File Selection popup (it should be clear now that I don't like Scrollbars :-). # Redo the File Selection popup. Changes include but are not limited to - the addition of a menu with pre-definable directories. - the removal of the 'Tmp' and 'Home' buttons. The functionality offered by these two buttons is now available via the 'Directories' menu. - the addition of a menu with pre-definable filters. # Add all relevant preferences to the 'Options' popup so that users don't have to mess around with resource files in order to change some options. # Add an 'Antialias' entry to the 'File' menu. # Allow for multiple wildcards '%s' in the print command. Each such wildcard will be replaced by the file to be printed. # Add a bugfix for the bugfix added to cure some problems when scanning postscript files with incorrect structuring comments. %%%%%%%%%%%%%%%%%%% GV 2.9.4 (20 March 1997) %%%%%%%%%%%%%%%%%%%%%%%%%%% # Add another mouse binding in the main window. A double click with the left mouse button in the left/right half of the shown page causes the previous/next page to be displayed. # Add yet another mouse binding in the main window. A click with the right mouse button pops up a small menu offering a few standard action. # Allow gv to either respect or ignore document structuring comments when opening a file. This should be helpful when viewing documents with faulty structuring comments. To toggle between these two states a new menu entry has been added to the 'File' menu. A keyboard binding to toggle DSC parsing on and off has beem added as well. By default the key is 'I'. Alternatively the new command line options '-dsc' and '-nodsc' may be used. # Keep the point located in the center of the visible area of the displayed page centered when changing the magnification or orientation. # Add resources 'minimumWidth' and 'minimumHeight' to allow users to specify a size beyond which gv will never shrink so that all controls and titles remain accessible when changing the magnification or the page media or ... For both resources the default value is 400. # Merge in a few patches enlarging and correcting the set of allowed papersizes. [ thanks to Andreas Schott (schott@rzg.mpg.de) ] # Add Keyboard binding to toggle antialiasing on and off. By default the key 'A' is used. # Add Keyboard binding to toggle the resize behaviour of the main window between 'Fixed Size' and 'Variable Size'. By default the key 'Z' is used. # Update the documentation. The new sections mainly cover resources and key and mouse bindings. # Fix a bug that causes gv to crash when the current page media is 'Bounding Box' and the user disables automatic page media selection. # Fix a bug that causes wrong page media selection when changing from a document with document specific papersizes to one without document specific papersizes (or vice versa). %%%%%%%%%%%%%%%%%%% GV 2.7.6 (1 November 1996) %%%%%%%%%%%%%%%%%%%%%%%%% # 'Upgrade' postscript scanner to be able to read buggy Windows NT generated postscript files. Mark Pfeifer (pfeiferm%ppddev@comet.cmis.abbott.com) found that Windows NT generates files which show some non-comment postscript code after the '%%EndSetup' and before the first page comment '%%Page: x y'. # VMS: Built in Rick Dyson's (dyson@blanc.physics.uiowa.edu) two small changes for the Xmu library to allow compilation with DECC 5.2. Note that these changes do not affect the sources of gv itself, it's only the VMS specific archive xmu_4.zip which was modified. # Use my own scrollbar widget to avoid problems people encounter with hacked Xaw3d libraries. # Make 'make depend' cleaner. [thanks to Thomas Gellekum (thomas@ghpc8.ihf.rwth-aachen.de)] # Include Xfuncs.h in ps.c and Ghostview.c to avoid unresolved memmove() on SunOS [thanks to Harald Boehme (boehme@informatik.hu-berlin.de)] # VMS: Fix a problem which reapperared in 2.7 b5 and caused certain file formats (non LF_STREAM,CR_STREAM) not to be read correctly. [thanks to Tim Adye (adye@v2.rl.ac.uk)] # Correct wrong URL in the documentation. [thanks to Helmut Geyer (hardy@lynx.ps.uci.edu)] # Change some resource bindings s that gv works on SunOS. [thanks to Matthias Klose (doko@cs.tu-berlin.de)] %%%%%%%%%%%%%%%%%%% GV 2.7 b5 ( 1 August 1996) %%%%%%%%%%%%%%%%%%%%%%%%%% # Add doc/gv.man, doc/gv.ps, doc/gv.html to provide at least some documentation about gv's command line options. # Unix: Fixed the 'Update File' button (everything related to updating the displayed file when the modification date changed didn't work correctly). [thanks to Lars Bruecher (bruecher@dipmza.physik.uni-mainz.de) for telling me about the bug] # Fixed 'Reopen'. After reopening a (changed) file gv displayed the first page instead of the current page. [thanks to Lars Bruecher (bruecher@dipmza.physik.uni-mainz.de) for telling me about the bug] %%%%%%%%%%%%%%%%%%% GV 2.7 b4 (31 July 1996) %%%%%%%%%%%%%%%%%%%%%%%%%%%% # Fixed extracting pages [thanks to Arne Mueller (amuelle3@gwdg.de) for telling me about the bug] # Allow for a possible extra byte in front of the "%!PS-Adobe-" identifier at the beginning of the file for comaptibility reasons. [thanks to Ronan Melennec (MELENNEC_Ronan@cena.dgac.fr) for suggesting this change] # Fixed errorneous detection of the "-arguments " command-line option. [thanks to Dr. Gunnar Ribitzki (ribitzki@clri6f.gsi.de) for his patch] %%%%%%%%%%%%%%%%%%% GV 2.7 b3 (15 June 1996) %%%%%%%%%%%%%%%%%%%%%%%%%%%% # Fixed code for appending s at the end of ps-sections of oriented files on Unix systems (thanks to Tim Adye (adye@v2.rl.ac.uk)). %%%%%%%%%%%%%%%%%%% GV 2.7 b2 (8 June 1996) %%%%%%%%%%%%%%%%%%%%%%%%%%%%% # VMS: use explicit ftell() calls in ps.c to get reliable file positions whenever possible (thanks to Tim Adye (adye@v2.rl.ac.uk)). * Use read() instead of fread() in ps.c to unify VMS and Unix code. %%%%%%%%%%%%%%%%%%% GV 2.7 b1 (2 June 1996) %%%%%%%%%%%%%%%%%%%%%%%%%%%%% This version # offers an improved PDF capability: a) Page numbers are shown, allowing to freely move through the document. b) Saving marked pages of a PDF file (or the whole file) is now a valid operation. The file will first be converted to postscript, then the pages are extracted and saved to the destination file. Since the PDF->PS conversion takes a considerable amount of time it is done "in the background" to not block the user interface. c) Printing marked pages of a PDF file (or the whole file) is now also a valid option. The marked pages are first saved in postscript format, then they are printed. Printing is also done "in the background" due to the involved PDF->PS conversion. # provides an additional layout of the main window for those who want to minimize the on-screen-area consumption of gv. To use it start gv by executing $ gv -style gv_spartan.dat The file gv_spartan.dat contains a layout description which omits some of the buttons shown in the standard version and which uses a different on-screen arrangement of the remaining widgets. # provides an option to reverse the scrolling behaviour in the main window. # widens the class of previewable postscript documents by a) removing the constraint that lines shouldn't have more than 255 characters. b) allowing LF, CR and CR LF as line terminators. # removes the concept of a "forced" orientation and media. Instead the orientation and papersize menus offer the "Automatic" entry, which, if selected, advices gv to use the orientation and media extracted from the DSC comments. # uses a different algorithm for smoothing the scrolling process in the main window. The new method is based on taking an average of the last few motion events. # handles some resources more restrictive for security reasons. Those resources are prefixed by "GVintern" and may only be set via a command line option or in the resource file "~/.gv" (or "DECW$USER_DEFAULTS:GV.DAT" on VMS). Affected are, for instance, "GVintern.printCommand" and "GVintern.gsArguments". After installation the file "gv_intern_res.dat" contains a complete list of these resources. # uses by default a Pixmap instead of requesting Backing Store from the X Server (GV*useBackingPixmap: True). # uses an improved version of the FileSelection Widget. # fixes a bug in the file selection widget which causes a crash on OpenVMS VAX. # doesn't show tons of String-to-Pixmap conversion warnings on Motif displays anymore. # corrects a bug in the layout of the main window which caused a wrong horizontal scaling behaviour. # fixes a bug which caused the comment '%%Pages: 0" to appear in saved postscript files. # fixes problematic file inclusion macros in "paths.h" which caused errors for a lot of people. ñ%%%%%%%%%%%%%%%%%%% GhostView-VMS 2.3 (1 March 1996) %%%%%%%%%%%%%%%%%%%% 1) New platform (linux) 2) New widgets: Clip,Frame,Aaa 3) New Layout 4) New method to define regions to be magnified by zoom popups. 5) New Zoom Popups (scrollable) 6) New Bugfixes 7) New Bugs %%%%%%%%%%%%%%%%%%% GhostView-VMS 2.1 (18 January 1996) %%%%%%%%%%%%%%%%% 1) added "basic" PDF support. PDF files are handled in the same way as unstructured PS files now. 2) fixed a quite large memory leak which appeared in the VMS_DIR.C code. 3) added the -landscape,-portrait, -seascape and -upsidedown options which somehow got lost in previous versions. %%%%%%%%%%%%%%%%%%% GhostView-VMS 2.0.3 (1 February 1995) %%%%%%%%%%%%%%%%% 1) callback 'cb_moveSlider' in file CALLBACKS.C calls 'XtCallActionProc' which is buggy in the VMS/X11R4 implemetation and causes a crash at startup -> fixed Related problem appears in ACTIONS.C when in action_panner XtRemoveCallback(pageview,XtNreportCallback,...) is called. Also a problem only on R4 ... -> fixed (thanks to Martin Zinser who provided an account on an X11R4 machine, so that the tests could be made). 2) color specifications of type 'rgb:x/y/z' do not work on VMS/X11R4. They got replaced in the resource files by specifications of type 'grayX'. 3) some ps-formatters include the 'end' command in the last page, not in the trailer. These may cause ghostscript to break if switching from the last page to another page. Therefore the compile time option 'GV_RESTART_IF_BUSY' has been introduced (see CONFIG.H). Enabling this option may help but will slow down performance for many correctly formatted files also. By default this options is not activated. %%%%%%%%%%%%%%%%%%% GhostView-VMS 2.0 (1 January 1995) %%%%%%%%%%%%%%%%%%%% Original Release gv-3.7.4/arg-nonnull.h0000664000076400007640000000230011735103745011502 00000000000000/* A C macro for declaring that specific arguments must not be NULL. Copyright (C) 2009-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) # endif #endif gv-3.7.4/COPYING0000664000076400007640000010451311735103745010141 00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . gv-3.7.4/AUTHORS0000664000076400007640000000124111735103745010150 00000000000000-*- coding: utf-8 -*- GNU Maintainer: Markus Steinborn Original Author: Johannes Plass Contributors: - Karl Berry - Peter Breitenlohner - John Bowman - Bernhard R. Link (brlink@debian.org) - José E. Marchesi (jemarch@gnu.org) [was GNU Maintainer] - Brett W. McCoy - Hans Fredrik Nordhaug - Markus Steinborn - Thanh Han The Translators: - Gajus Dirkzwager (Dutch translation) - Quentin Gibeaux (Fremch translation) - César Gil (Spanish translation) - Marco Paolone (Italian translation) gv-3.7.4/ChangeLog0000664000076400007640000012354712117145501010657 00000000000000 * src/options_gv.c(orientation2extern): Handle "Automatic" orientation correctly * src/options_gv.c(pagemedia2extern): For pagemedia, we have to replace Translation of "Automatic" to "Automatic" befire saving. This is done by this new function. * src/options_gv.c(options_gv_cb_save): Call pagemedia2extern. See above for explanation. 2012-04-01 Markus Steinborn * configure.ac, src/versionp.h: Bumped version to 3.7.3.91 2012-04-01 A. Costa * doc/gv-update-userconfig: improve wording of gv-update-userconfig manual. 2012-04-01 William Bader * src/FileSel.c: Fix use of IIMESSAGE with a real argument. Initialize dirp. * src/Ghostview.c: Give InterpreterFailed() a way to indicate the type of failure. * src/Scrollbar.c, src/Scrollbar.h: Let XawScrollbarSetThumb pick its arguments as double or float depending on NeedWidePrototypes. This is required to make the scroll bar work in Fedora 14. * src/Vlist.c: Add some IIMESSAGE() lines for debugging. Add a call to ENDMESSAGE() before an error return to balance the earlier BEGINMESSAGE(). * src/ Vlist.c, src/Vlist.h: Add VlistMaxEntriesVisible(Widget w, int height) to return the maximum number of entries that can fit in the list. * src/actions.c: Fix use of IIMESSAGE with a real argument. * src/doc_misc.c: Loosen the test for media sizes. * src/gv_misc_res.dat: Add more space around the mag menu. Implement keypad enter, insert, delete, home, end, prior. Switch buttons for zoom and pan. * src/gv_user_res.dat: Turn off scrolling eye guide. Add a margin in the geometry. Add a 10x24 paper size. * src/magmenu.c: Fix an attempt to increment a NULL pointer. * src/main.c: Initialize gv_psfile and toc_text. * src/media.c: Fix an attempt to increment a NULL pointer. * src/message.h: Write messages to stderr instead of stdout so they aren't buffered. Add DDMESSAGE1() debug macro for real numbers. * src/misc.c: Clean up the toc scrolling to avoid leaving empty space when there are items to fill the space. Fix a possible NULL pointer reference. Fix a possible -1 array index. Fix an attempt to increment a NULL pointer. * src/ps.c: Check for %!PS instead of %!PS-Adobe- to recognize old files. Do not stop parsing comments at a line starting % space. Implement Seascape orientation. * src/scale.c: Fix an attempt to increment a NULL pointer. 2012-02-29 Markus Steinborn * configure.ac, src/versionp.h: Bumped version to 3.7.3.90 2011-08-23 Markus Steinborn * src/resource.c(resource_buildDatabase): Save resource strings.saveAsPDF to variable 2011-08-16 Markus Steinborn * src/misc.c: Revert "Fix Debian bug #594991: unexpected scrolling of the TOC widget" 2011-08-04 Bernhard R. Link * src/ps.c(dsc_strncmp): avoid unnecessary temporary string copy * src/ps.c: reduce the number of sec_sscanf invocations 2011-08-03 Markus Steinborn * src/ps.c (whole file): Fix calls of sec_sscanf having %s in format. 2011-08-01 Bernhard R. Link * src/Ghostview.c, src/error.h: do not define errno, as it might be a macro already. * src/doc_misc.c, src/misc.c, src/ps.c, src/ps.h: make numpages and nummedia signed to avoid warnings * src/*: get rid of core K&R, use gnulib's _GL_UNUSED and avoid some signed/unsigned 2011-07-12 Bernhard R. Link * src/ps.c: handling dsc parse errors: fix FILE given to unlink, check for file open error 2011-05-06 Bernhard R. Link * configure.ac, src/Makefile.am: Only install files gv actually reads. 2011-05-05 Markus Steinborn * m4/* lib/* imported signal from gnulib. Note: I ran "sed -i 's///g' lib/*" after the import. I imported from revision 9dba31e113c15a07103d04980a8f39bcba5f7795 of gnulib. 2011-05-04 Markus Steinborn * src/callbacks.c(cb_presentation): Drop typedef sighandler_t again, gnulib update (see 2011-05-05) will do the job. 2011-05-04 Bernhard R. Link * src/Makefile.am: Improved dependencies and minor improvements. * src/gv-i18n.pl: Use src/nls/LANGUAGES for getting list of translations available. 2011-05-02 Markus Steinborn * src/callbacks.c(cb_presentation): Renamed typedef sighandler_t to mysighandler_t (incomplete). 2011-04-29 Markus Steinborn * src/callbacks.c(cb_presentation): Readd typedef sighandler_t. 2011-04-29 Markus Steinborn * configure.ac, src/versionp.h: Bumped version to 3.7.2.90 2011-04-29 Markus Steinborn * configure.ac, src/versionp.h: Bumped version to 3.7.2 2011-04-27 Bernhard R. Link * configure.ac: remove --enable-memdebug-code from configure, as the feature itself was already removed. * src/resource.c(resource_buildDatabase): don't store stat output in random memory location 2011-04-25 Markus Steinborn * configure.ac, src/versionp.h: Bumped version to 3.7.1.91 2011-04-17 Markus Steinborn * src/Ghostview.c(StartInterpreter): Save fd of pipe being used for std_in in the else case 2011-02-13 Bernhard R. Link * src/FileSel.c, src/Ghostview.c, src/actions.c, src/callbacks.c, src/main.c, src/main_globals.h, src/misc.c, src/options_gs.c, src/ps.c, src/zoom.c: avoid shadowing identifiers * src/*.c, src/*.h: remove ancient memory debugging stuff, unconditionally use prototypes * src/scale.c: Include . * src/scale.c(scale_getScreenResourceName): Fixed typo. * src/secscanf.c(process_number): avoid warning about pointer sizes * src/gv_string.c, src/gv_string.h, src/vms_dir.c: Removed (unused) * src/info.c(cb_appendInfoPopup): show beginning of last error message instead if the end 2010-11-20 Markus Steinborn * srcscale.c(scale_getScreenResourceName): use ssh remote adress instead of hostname for a remote ssh connection 2010-06-25 Markus Steinborn * src/dialog.c(DialogPopupSetText): move "n=0" outside of #ifdef. 2010-06-19 Markus Steinborn * src/main.c(main): In case of a temporary safedir is needed, use strdup to copy the temporary buffer to a permanent location. 2010-06-19 Markus Steinborn * configure.ac, src/versionp.h: Bumped version to 3.7.1.90 2010-06-08 Markus Steinborn * src/save.c(save_forkPDFToPSConversion): src has to be initialized with command, not gv_gs_cmd_scan_pdf. Fix bug [bug #30081] gv 3.7.0: unable to print/save pdf files. 2010-06-06 Markus Steinborn * configure.ac, src/versionp.h: Bumped version to 3.7.1 2010-06-06 Markus Steinborn * configure.ac, src/versionp.h: Bumped version to 3.7.0 2010-06-03 Markus Steinborn * configure.ac: Added macro AC_PROG_MKDIR_P * src/Makefile.am: Use $(MKDIR_P) instead mkdir 2010-06-03 Bernhard R. Link * src/Makefile.am: Add gv-i18n.h to MAINTAINERCLEANFILES insted of CLEANFILES. 2010-06-03 Markus Steinborn * src/main.c(main): Use .scratchDir for path of temporary savedirectory. 2010-06-03 Markus Steinborn * configure.ac, src/versionp.h: Bumped version to 3.6.92 2010-06-03 Markus Steinborn * src/Aaa.c, src/Aaa_bison.c: Include ac_config.h, otherwise compiling failes in Mac OS X. 2010-06-02 Markus Steinborn * m4/* lib/* imported mkdtemp from gnulib. Note: I ran "sed -i 's///g' lib/*" after the import. I imported from revision of gnulib. 2010-06-02 Markus Steinborn * src/Ghostview.c, src/process.c, src/ps.c: Use safe-dir from variable gv_safe_gs_workdir. * src/main.c: Check if global safe-dir is accessible, if not, create a temporary one. * src/Ghostview.c, src/Scrollbar.c, src/callbacks.c, src/ps.c: Call clean_safe_tempdir on each position gv can exit. * src/main_globals.h: Two new vaiables gv_safe_gs_workdir and gv_safe_gs_tempdir (=1 iff gv_safe_gs_workdir is temporary). * src/actions.c(clean_safe_tempdir): Delete temporary safe-dir. 2010-06-02 Markus Steinborn * src/Makefile.am: Create s"afe-gs-workdir". 2010-06-02 Markus Steinborn * configure.ac, src/FileSel.c, src/Scrollbar.c, src/actions.c, src/callbacks.c, src/file.c, src/main.c, src/misc.c, src/options_gv.c: mkstemo and inttypes.h are always available after gnulib import 2010-06-02 Markus Steinborn * m4/* lib/* updated gnulib and imported canonicalize-lgpl, inttypes and mkstemp. Note: I ran "sed -i 's///g' lib/*" after the import. I imported from revision 8ab5996c4a14364411442d93babb343cc2ce0d89 of gnulib. 2010-05-30 Markus Steinborn * src/gv_message.h: Document new options * rc/main.c: Parsing of new options --safedir and --nosafedir * src/main_globals.h: Global variable for each of the new options * src/resource.c: Modify resource GV.gsSafeDir on new options 2010-05-30 Bernhard R. Link * src/Ghostview.c, src/Ghostview.h, src/GhostviewP.h, src/Makefile.am, src/doc_misc.c, src/doc_misc.h, gv_layout_res.dat, src/gv_misc_res.dat, src/main.c, main_globals.h, main_resources.h, src/misc.c, options_gs.c, process.c, src/ps.c, src/ps.h, src/save.c, src/zoom.c: New resource GV.gsSafeDir, ability to set it to true resp. false by user interface, if enabled start ghostscript from a safe directory. 2010-05-30 Markus Steinborn * src/misc.c(setup_ghostview), src/save.c(save_forkPDFToPSConversion): Add -P- if and only if SAVER is turned on. 2010-05-29 Markus Steinborn * doc/gv.texi: Update: ghostscript is called with -P- (by B. R. Link) * src/Ghostview.c(StartInterpreter): Call ghostscript with -P- (by B. R. Link) * src/misc.c(setup_ghostview): Call ghostscript with -P- * src/save.c(save_forkPDFToPSConversion): likewise 2010-05-29 Bernhard R. Link * src/resource.c(resource_buildDatabase): Fixed possible segfault 2010-05-29 Markus Steinborn * configure.ac, src/versionp.h: Bumped version to 3.6.91 2010-05-29 Markus Steinborn * src/nls/de.UTF-8.dat, src/nls/noint:de.dat: Translate one missing string 2010-05-14 Yasuyuki Furukawa * src/nls/ja_JP.UTF-8.dat, src/nls/ko_KR.UTF-8.dat: Added Japanese and Korean translation 2010-05-14 Markus Steinborn * src/nls/de.UTF-8.dat, src/nls/noint:de.dat: Added German translation. 2010-05-14 Markus Steinborn * src/Makefile.am: New rule to generate src/gv-i18n.h * src/gv-i18n.pl: Generates src/gv-i18n.h at compile time * src/nls/README.txt: Placeholder just to ensure nls directory is not empty. * src/Ghostview.c, src/callbacks.c, src/doc_misc.c, src/options_gv.c, src/options_setup.c, src/process.c, src/resource.c, src/resource.h, src/version.c, src/versionp.h src/gv_misc_res.dat, : All textual user messages are moved to resources in src/gv_misc_res.dat. * src/gv-update-userconfig.in: Support for creating translation files has been added. 2010-04-24 Markus Steinborn * configure.ac, src/versionp.h: Bumped version to 3.6.90 2010-04-24 Markus Steinborn * configure.ac, src/versionp.h: Bumped version to 3.6.9 2010-03-10 Bernhard R. Link * doc/gv-update-userconfig.1: Fixed typo 2010-03-09 Markus Steinborn * src/gv-update-userconfig.in: corrected parsing version from ~/.gv 2010-03-10 Markus Steinborn * configure.ac, src/versionp.h: Bumped version to 3.6.8.92 2010-03-07 Markus Steinborn * src/Vlist.c(PaintEntryString): Fixed a typo introducved by my patch from 2010-03-03 preventing compiling with Xaw3d 1.5. (Fixes #28424) * configure.ac: Fix several tests on RHEL 4.8. 2010-03-07 Markus Steinborn * configure.ac, src/versionp.h: Bumped version to 3.6.8.91 2010-03-03 Markus Steinborn * src/configure.ac: if no international support is available in Xaw3d, do not abort. * src/configure.ac: setenv-test: if --disable-setenv-code is given, continue without testing for setenv support * src/dialog.c, src/info.c, src/misc_private.c, src/Vlist.c: Use #ifdef-s to enable compilation on Xaw3d-1.5 by disabling all if "international"-parts statements and leaving only their "else case". 2010-03-02 Markus Steinborn * src/configure.ac: New option "--enable-international". * src/Makefile.am(target gv_class.ad): Enable international if requested 2010-03-02 Yasuyuki Furukawa * src/callbacks.c(setTitle): New function for supporting UTF-8 titles * src/callbacks.c(showTitle): call setTitle * src/misc.c(setup_ghostview): likewise 2010-03-01 Dr. Werner Fink Yasuyuki Furukawa Markus Steinborn * Makefile.am: Include README.I18N in distribuation * src/main.c(main): Correcting environment, calling XtSetLanguageProc * src/Makefile.am: Handling of new source files * src/info.c, src/misc_private.c, src/dialog.c: Properly handle the case that international is enabled. * src/gv_misc_res.dat: Add resource "GV*fileSelPopup.title" * src/gv_font_res-I18N_mb.dat: New filw with extra resources for I18N. 2010-02-27 Markus Steinborn * configure.ac, src/versionp.h: Bumped version to 3.6.8.90 2009-12-25 Markus Steinborn * configure.ac, src/versionp.h: Bumped version to 3.6.8 2009-12-08 Markus Steinborn * src/scale.c(scale_parseScales): Fixed Scale "Fit to height", it wasn't added o the scale menu 2009-09-05 Andrew Hamilton * src/main.c: use getopt's built-in option counter * src/Ghostview.c (StartInterpreter): Call ghostscript with an additional option "-dNOPROMPT" * src/Ghostview.c: (StartInterpreter, GhostviewNextPage): Handle "-" as filename * src/zoom.c (zoom_createZoom): Fix checking for "no file" * src/zoom.c (zoom_createZoom): Handle "-" as filename * src/resource.c (resource_buildDatabase): Handle resource "arguments" 2009-05-18 Markus Steinborn Stefan Uhl * src/gv_user_res.dat: New scale "Fit height to window" * src/misc.c (set_new_scale): Handle "Fit height to window"-scale * src/main.c: likeweise, use --scale=-1003 for "fit height to window" 2009-04-11 Markus Steinborn * src/Makefile.am: Include src/secscanf.h in tar archive. 2009-04-11 Bernhard R. Link * configure.ac: Corrected check if "SimplePart.international" exists in Xaw3D 2009-04-10 Markus Steinborn * configure.ac: Check for presence of SIGCLD and SIGOCLD. If --enable-SIGCLD-fallback is given, use SIGCHLD as fallback to SIGCLD. * configure.ac: Reverted change from 2009-03-23. It breaks building on Mac OS X. 2009-03-23 Bernhard R. Link * configure.ac: Check if "SimplePart.international" exists in Xaw3D * several files: fixed a few compiler warnings 2009-03-23 Markus Steinborn * configure.ac, src/versionp.h: Bumped version to 3.6.7.90 2009-03-21 Markus Steinborn * configure.ac, src/versionp.h: Bumped version to 3.6.7 2009-03-01 Markus Steinborn * doc/gv-update-userconfig.1: Filename as optional argument * src/gv-update-userconfig.in: Filename as optional argument * src/resource.c (resource_buildDatabase): Update newly introduced variable haveXUSERFILESEARCHPATH and resource_user_file_symb * src/resource.c (resource_checkResources): Corrected error message in case XUSERFILESEARCHPATH is used. 2009-02-10 Markus Steinborn * src/FileSel.c (TopDirSelectionProc, SubDirSelectionProc): Call VlistSetFirstVisible(..., 0) to scroll list back to top position. 2009-01-16 Markus Steinborn * src/callbacks.c (cb_presentation): use /usr/bin/env to find executable 2009-01-15 Markus Steinborn * src/actions.c(action_shellConfigureNotify): Set Thumnb size of scrollbar on resize event. 2009-01-15 Bernhard R. Link * src/misc.c(setup_ghostview): Set Thumnb size of scrollbar. 2009-01-14 Markus Steinborn * arc/action.c (action_presentation): Handling the new "z"-key for saving positions. * src/actions.h: likewise for the prototypes * src/callbacks.c (cb_presentation): fork+exec new instance of gv in presentation mode * src/callbacks.h: Likewise for the prototypes. * src/gv_misc_res.dat: Add handling for Shift P key * src/main.c: Add event handlers for GV_Presentation. * src/main_globals.h: Add Widget "presentationEntry". * src/misc.c: Set Sensitivity of new "saveposEntry". 2009-01-13 Markus Steinborn * src/scrollbar.c(MoveThumb): Improve usability * src/callbacks.c(cb_newtocScrollbar) src/FileSel.c(cb_scroll): Rouning position to integer instead of using implicitly the floor function. 2009-01-12 Markus Steinborn * src/callbacks.c(cb_newtocVisibleAdjust): Use VlistVisibleLength to calculate visible area. * src/scrollbar.c(MoveThumb): New calculation of TOP, the actual relative position of the scrollbar. * src/scrollbar.c(GetRelativeThumbLocation): Adjusted to fit to MoveThumb. * src/callbacks.c(cb_newtocScrollbar): Just scroll one position less than calculated, but at least one. This should help to ensure that every page is reachable by this mechanism. 2009-01-02 Markus Steinborn * src/FileSel.c: Bugfixed 2009-01-01 Markus Steinborn * src/Vlist.c: Fix a regression from prev. patch: The scroll arrows on the page panel did not work any more. * src/FileSel.c: Changed in order to benefit from the changes in Vlist to support large lists. 2009-01-01 Bernhard R. Link * src/Vlist.c, src/Vlist.h, VlistP.h: support large lists (big change!) * src/actions.c, src/callbacks.c, src/main.c, src/misc.c: Changed in order to benefit from the change above. 2008-09-28 Markus Steinborn * src/secsscanf.c: Provide an implementation of strndup named GNU_strndup and adjust the only call. 2008-09-28 Bernhard R. Link * src/file.c (file_assureDirectory): Changed 2nd argument to be const * src/info.c: Fixed one warning * configure.ac: Cleaner ZIO Detection 2008-09-28 Markus Steinborn * configure.ac, src/versionp.h: Bumped version to 3.6.6.90 2008-09-25 Markus Steinborn * configure.ac, src/versionp.h: Bumped version to 3.6.6 * Updated my e-mail address. 2008-09-09 Dr. Werner Fink * configure.ac: Check if the ZIO Library is available. * src/ps.c (psscan): Use the ZIO Library to decompress a file if the ZIO Library is presemt. 2008-09-09 Olaf Kirch * src/secscanf.c: New file providing sec_sscanf with an additional size argument for string arguments. All format specifiers should work as in the standard scanf - except for those writing to a string buffer provided by the caller. These specifiers take an additional argument of type size_t that specifies the size of the buffer. * src/ps.c: Replace all calls (with %s) to sscanf by sec_sscanf. 2008-09-09 Dr. Werner Fink * src/Ghostview.c: Under some circimstances add "-dDELAYSAFER" to the commandline of gs. * src/misc.c (set_new_orientation): Handle the case Widget w is not initialized. * src/misc.c (set_new_pagemedia): likewise * src/musc.c (set_pagemediaButton_label): likewise * src/ps.c: Add include 2008-09-08 Markus Steinborn * src/ps.c (psscan): Code cleanup: Use dup to use a new guaranteed free non-arbitrary number, use open instead of fopen & fileno. 2008-09-02 Bernhard R. Link * src/GhostviewP.h: Changed type of bytes_left from int to gv_off_t. 2008-09-02 Markus Steinborn * src/Ghostview.c, src/Ghostview.h, src/GhostviewP.h, src/callbacks.c, src/file.c, src/misc.c, src/ps.c, src/ps.h, src/zoom.c: Large File Support (LFS) - removed variant that was enabled by the macros HAVE_LFS64. * configure.ac, src/Makefile.am: likewise * src/versionp.h: Updated release month 2008-09-01 Markus Steinborn * src/Ghostview.c, src/Ghostview.h, src/GhostviewP.h, src/callbacks.c, src/file.c, src/misc.c, src/ps.c, src/ps.h, src/zoom.c: Large File Support (LFS) - it has to be enabled by the preprocessor macros HAVE_LFS64 resp. HAVE_OFF_T. * configure.ac, src/Makefile.am: Support setting the macros HAVE_LFS64 resp. HAVE_OFF_T. 2008-08-30 Markus Steinborn * src/ps.c (ps_io_ftell): Changed return type to long * src/ps.c (ps_io_fseek): Changed 2nd argument to long * src/ps.c (FileDataStruct_): Changed type of filepos to long Purpose: At least on x86_64, long files are supported now 2008-08-24 Markus Steinborn * src/info.c: Skip displaying info-popup until gv_infoSkipErrors are sent -- usually gv_infoSkipErrors is 0, but after recognising an encrypted pdf, it is set to 1. * src/callbacks.c (cb_setPassword): Trigger reload of ghostscript by calling "cb_reopen(...)". * src/main.c: Initialize gv_infoSkipErrors with 0 * src/main_globals.h: Declare gv_infoSkipErrors. * src/ps.c (psscan): Set gv_infoSkipErrors to 1 and jump over displaying dsc-parser error. 2008-08-23 Bernhard R. Link * src/callbacks.c (cb_setPassword): New callback for setting password. * src/callbacks.c (cb_cancelPassword): New callback aborting password dialog. * src/callbacks.c (cb_askPassword): New callback Displaying the password dialog. * src/callbacks.h: likewise * src/ps.c (psscan): Use new callback cb_askPassword to query the user for the password. 2008-08-23 Markus Steinborn * doc/gv.texi: Describe new option "--password=PASSWORD". * src/Ghostview.c (StartInterpreter): Pass actual PDF password to ghostscript. * src/gv_message.h: Add description of new "--password=PASSWORD" option. * src/main.c (main): Parse new password-Option from command line * src/main_globals.h: New global variable for the PDF password. * src/ps.c (psscan): Pass actual PDF password to ghostscript. * src/versionp.h: Bump required resource version. * src/gv_misc_res.dat: likewise * src/Makefile.am: Update GV.gsCmdConvPDF * src/gv-update-userconfig.in: remove GV.gsCmdConvPDF iff necessary. 2008-08-10 Markus Steinborn * configure.ac, src/versionp.h: Bump version to 3.6.5.91. * src/resource.c (resource_buildDatabase): Setting resource "gv.arguments" is useless as it is not read. * src/Makefile.am: Append the contents of gv_misc_res.dat to gv-update-userconfig, too. * src/gv-update-userconfig.in: Handling of -n, -N and -s. 2008-08-09 Markus Steinborn * src/resource.c(resource_checkResources): Corrected misspellings in message displayed to the user. * src/gv-update-userconfig.in: "--help", "--usage" as an alias for "-h". "sub compare" fixed for version strings of different length. * doc/gv-update-userconfig.1: Describe options "-h", "--help", "--usage", "-r". s/gv/GNU gv/ according to GNU guidelines. * NEWS, src/versionp.h: Update release date for GNU gv 3.6.5.90 2008-08-02 Markus Steinborn * src/action.c (action_print_pos): Code cleanup * src/callbacks.c (cb_printpos, cb_doPrintPos): likewise 2008-08-02 Thanh Han The * arc/action.c (action_savepos): Handling the new "z"-key for saving positions. * src/action.c (action_print_pos): Handling the new "u"-key for saving positions. * src/actions.h: likewise for the prototypes * src/callbacks.c: New static globals last_psx, last_psy for the last cursor position * src/callbacks.c (cb_printpos): Displaying of popup dialog for entering command to save * src/callbacks.c (cb_doPrintPos): saving the command entered above * src/callbacks.c (cb_savepos): saving the actual position * src/callbacks.c (cb_track): Update last_ps{xy} * src/callbacks.h: Likewise for the prototypes. * src/gv_misc_res.dat: Add handling for Z und U key * src/main.c: Add event handlers for GV_PrintPos and GV_SavePos. Update gv_savepos_filename by resource GV.saveposFIlename * src/main_globals.h: Add Widget "saveposEntry". * src/main_globals.h: Add String gv_savepos_filename (Improvement by Markus Steinborn) * src/misc.c: Set Sensitivity of new "saveposEntry". 2008-08-01 Bernhard R. Link * src/main_resources.h: Remive global variable options * src/esource.c (resource_buildDatabase): Do not call XrmParseCommand to parse an empty option list. It is not needed since the cvs checkin from 2004-12-06 12:52:10 GMT. 2008-08-01 Markus Steinborn * src/gv-update-userconfig: Renamed to src/gv-update-userconfig.in * src/Makefile.am: Built src/gv-update-userconfig from src/gv-update-userconfig.in by appending the default resources * src/gv-update-userconfig.in: Option "-r" to remove all resources from ~/.gv that have their default value * src/gv_misc_res.dat: The return key now scrolls through the whole document vertically. Unlike the space key no horizontal scrolling is performed. 2008-07-31 Bernhard R. Link * doc/gv-update-userconfig.1: Man-page for gv-update-userconfig * doc/Makefile.am: include and install doc/gv-update-userconfig.1 * src/Makefile.am: Use configurable "sysconfdir" for generating src/gv_make_res.dat * src/Aaa.c (aaaClassRec): Initialize the "dummy"-field. * src/Scrollbar.c src/actions.c : Some arguments miss a type. * src/file.c: Include unistd.h as close is used * src/file.c(file_getTmpFilename): a variable "struct stat s" is sometimes not used and therefore need not to be declared in that cases. 2008-07-19 Markus Steinborn * src/Makefile.am: The .ad and .dat files are put into /usr/share/gv (Patch from Orion Poplawski ) * configure.ac: Test for the presence of "mkstemp()" * src/file.c (file_getTmpFilename): Use mkstemp (if available) for getting the temporary filename * src/Ghostview.c, src/Ghostview.h, src/GhostviewP.h, src/main.c, src/main_globals.h, src/resource.c: Add handling of xinerama resource * src/main.c: Use Xinerama to get display resolution if the xinerama resource is set to "On". If it is set to "Auto", let the heuristic from 2008-07-12 decide. If it is set to "off", do not use Xinerama at all. * src/resource.c: More informative error message in case of too old ~/.gv * src/Makefile.am src/gv-update-userconfig: New script for upating the user config. * doc/Makefile.am src/Makefile.am: Out of tree built Build GV outside of src directory (Patch by Bernhard R. Link) * configure.ac: Out of tree build 2008-07-16 Markus Steinborn * src/info.c: Trigger info popup on "ERROR:" and "error:", too. Needed for older gs. 2008-07-12 Markus Steinborn * configure.ac, src/versionp.h: Bump version to 3.6.5.90. * src/main.c, src/paths.h: Heuristically use Xinerama to get display resolution iff the current display size looks like a single monitor (experimental) * src/gv_message.h: Improvement of "--scale" documentation which should have been included in 3.6.4.91, but it has not been. 2008-07-05 Markus Steinborn * configure.ac, src/versionp.h: Bump version to 3.6.5. 2008-06-22 Markus Steinborn * src/options_*.c, src/resource.c: Save GV.version resource to ~/.gv, if GV.version in ~/.gv is missing, assume it to be "gv 3.5.2". 2008-06-21 Markus Steinborn * configure.ac, src/versionp.h: Bump version to 3.6.4.91. 2008-06-18 Markus Steinborn * doc/gv.texi: Update manual * src/gv_message.h: Update usage message * src/main_globals: Add fullscreen_p, presentation_p and ascale_p * src/main.c: Add parsing of --fullscreen and of --scale with a float and --presentation * src/options_gv.c: Include math.h 2008-06-17 Markus Steinborn * src/callbacks.c (cb_setPagemedia): If autoresize is off and any special scale is used, then recalculate the scale. * src/misc.c (show_page): If autoresize is off and any special scale is used, display of new page is required and orientation or Pagemedia differs, then recalculate the scale. 2008-06-15 Markus Steinborn * src/main_globals.h: New globat variable gv_ascale with the arbitraty scale * src/gv_user_res.dat: In gv options, enable input of arbitrary scale * src/main.c: Initialize gv_ascale * src/scale.c (scale_parseScales): Adjust parser for arbitrary scale (symbolic scale factor is -2) * src/misc.c (set_new_scale): Handle arbitrary scale * src/options_gv.c: Handle editing of arbitrary scale * src/callbacks.c(cb_setOrientation): If autoresize is off and any special scale is used, then recalculate the scale. 2008-06-14 Markus Steinborn * src/action.c(action_shellConfigureNotify): If autoresize is turned off and actual scale is "Fit to window" then rescale. * src/gv_user_res.dat: New scale "Fit to window" * src/misc.c (set_new_scale): Handle "Fit to window"-scale * src/scale.c (scale_parseScales): Adjust parser to handle new "Fit to window"-scale (symbolic scale factor is 0.000). * src/action.c, src/gv_user_res.dat, src/misc.c, src/scale.c: some as above for "Fit width to window"-scale (symbolic scale factor is -1.000). 2008-06-13 Markus Steinborn * src/main.c, src/gv_message.h, src/resource.c: Rename infoWarnings to infoErrors, likewise for resource infoVerbose * src/gv_font_res.dat, src/gv_layout_res.dat, src/gv_misc_res.dat: Entries for new setting for infoVerbose on gv options popup * src/options_gv.c: Visual editing of resource infoVerbose 2008-06-08 Markus Steinborn * src/*.c: include ac_config.h first * configure.ac: Define intptr_t as preprocessor macro if necessary 2008-06-07 Markus Steinborn * include inttypes.h only if HAVE_INTTYPES_H is set * src/main_resources.h: Do not use empty array size for initialized array of size 0 -- it makes problems with ISO C89. * configure.ac: added "--with-setenv-code" * src/setenv.[ch]: setenv emulation code * src/Makefile.am: include setenv.c if necessary 2008-06-01 Markus Steinborn * configure.ac, src/versionp.h: Bump version to 3.6.4.90. * src/*: Fix warnings (patch by debian) * doc/Makefile.am: build doc/gv.1 by help2man if required * doc/gv.texi: Document new -widgetless switch (patch by debian) * src/gv_widgetless.dat: Resource for widgetless mode (new file) (patch by debian) * src/gv_message.h: Document new -widgetless switch (patch by debian) * src/resource.c: Handle new -widgetless switch (patch by debian) * src/main_globals: added widgetless_p (patch by debian) * src/main.c: Parsing of "-widgetless" (patch by debian) * src/main.c(main): If no display is availabe, delay the error message until command line options has been parsed. This way, --help, --version and --usage work without having an display * src/Makefile.am: Build and clean gv_widgetless.h * src/config.h: Define FALLBACK_STYLE_2_* as "gv_widgetless.*" * src/resource.c (resource_buildDatabase): Check full pathname for embedded resource, not only the basename. Also embed gv_widletless.dat. * src/Ghostview.c, src/Ghostview.h, src/GhostviewP.h, src/gv_message.h, src/main.c, src/main_globals.h, src/resource.c: Add handling of infoVerbose resource * src/info.c: infoPopup respects infoVerbose-Resource 2008-06-01 Markus Steinborn * ChangeLog: Fixed typo in recent dates * configure.ac, src/versionp.h: Bump version to 3.6.4. 2008-05-23 Markus Steinborn * src/stdc.h: removed (it is non-free) * src/getenv.c: likewise (it's not used in standard configuration, anyway) * src/setenv.c: likewise(it's not used in standard configuration, anyway) * src/setenv.h: likewise(it's not used in standard configuration, anyway) * src/Aaa.h: Do not include stdc.h. (Patch by debian) * src/main.c: likewise (Patch by debian) * src/main.c: Redefine preprocessor macro BITMAP_ARGS (Patch by debian) * src/main_resources.h: Redefine preprocessor macro DECLARE_STRING (Patch by debian) * src/Makefile.am: Remove reference to src/stdc.h src/getenv.c src/setenv.c src/setenv.h * configure.ac: Remove option --enable-setenv-code * INSTALL: Remove description of the option --enable-setenv-code 2008-05-22 Markus Steinborn * src/info.c (cb_popupInfoPopup): Revert returning when calling gs with the `quiet' option (should fix #23199) * src/main.c (main): Reverted Forcing the `XtSetArg' call to include XtNquiet to True * src/file.c (global): Define ENODATA as ENOMSG if ENODATA if undefined. Should fix compiling on GNU/kFreeBSD 2008-05-21 Markus Steinborn * src/ps.c (psscan): Fixed possible uninitialized local variable text (remained unintialized if sscanf failes for some reason) 2008-05-21 Markus Steinborn * src/dialog.c (main): Update call to resource_buildDatabase (Patch from debian) * src/resource.c (resource_buildDatabase): Update signature, fix handling of resources (Patch from debian) * src/resource.c likewise (Patch from debian) * src/magmenu.c (magmenu_a_magMenu): Calculation of position that is not outside the screen (Patch from debian) * src/miscmenu.c (miscmenu_a_miscMenu): likewise (Patch from debian) * src/ps.c (readline): Respect nesting level of DSC headers BeginDocument/EndDocument (Patch from debian) * src/Vlist.c (PaintEntryString): Handle case that international is set (Patch from debian) * src/dialog.c (action_preferDialogPopupButton): Add 2nd XtInstallAccelerators (Patch from debian) * src/FileSel.c (global): Remove string TextField_accelerators (Patch from debian) * src/FileSel.c (Initialize): Add some XtInstallAccelerators (Patch from debian) * src/info.c (makeInfoPopup): likewise * src/options_fs.c (options_fs_create): likewise * src/options_gs.c (options_gs_create): likewise * src/options_gv (options_gv_create): likewise * src/options_setup (options_setup_create): likewise * src/zoom.c (zoom_createZoom): likewise * src/widgets_misc.c (global): Adjust strings LineTextTr and TextTr for the escape key (Patch from debian) * src/FileSel.c (SetPreferredButton): Remove old handling of esc-key (Patch from debian) * src/gv_misc_res.dat: Update resources (Patch from debian) * src/main_resources.h: replace showTitle with titleStyle (Patch from Bernhard R. Link, debian) * src/callbacks.c (cb_showTitle): also set the titlebutton, depending on title_style instead of show_title (Patch from Bernhard R. Link, debian) * src/misc.h (build_label_menu): new prototype (Patch from Bernhard R. Link, debian) * src/misc.c (setup_ghostview): move titlebutton setting code to cb_showTitle (Patch from Bernhard R. Link, debian) * src/options_setup.c: allow setting titleStyle instead of showTitle (Patch from Bernhard R. Link, debian) * src/gv_layout_res.dat: titleStyle instead of showTitle (Patch from Bernhard R. Link, debian) * src/texinfo.tex: document titleStyle (Patch from Bernhard R. Link, debian) 2007-06-28 Jose E. Marchesi * src/ps.c (ps_gettext): Bypass trailing ')' when scanning a postscript string. 2007-06-28 Jose E. Marchesi * NEWS (Notation): Updated for gv 3.6.3 * README: Updated version to 3.6.3 * doc/gv.1: Regenerated for gv 3.6.3 * src/Makefile.am (@echo "GV*dirs): Updated copyright notices to 2007. * configure.ac: Updated version to 3.6.3 * src/main.c (main): Call `resource_buildDatabase' to get the application entire resources database. Then, set that database as the display database. * src/resource.c (resource_buildDatabase): Get the display resources database as a parameter and take care to give it priority over the gv system resources. Return the entire resource database to the caller. 2007-06-27 Jose E. Marchesi * src/Ghostview.c (Input): Send 1023 new line characters to the postscript interpreter. This patch fixes bug #19870. Adapted from http://bugs.ghostscript.com/show_bug.cgi?id=689237 2007-06-25 Jose E. Marchesi * src/misc.c (misc_setPageMarker): Correctly adjust the page window after PAGE-UP and PAGE-DOWN events. (Patch by Markus Steinborn). * src/Ghostview.c (GhostviewIsInterpreterRunning): Doesnt report the presence of a running gs interpreter if `ghostview.disable_start' is true. Patch from Debian. (StartInterpreter): Escape beginning minus characters from filenames. (Patch by Markus Steinborn). * src/Makefile.am (@echo "GV.gsArguments): Add `-dFIXEMEDIA' to the `GV.gsArguments' default resource. (Patch by Markus Steinborn). * src/Ghostview.c (StartInterpreter): Doesnt add the implicit "-g2x2" parameter to ghostscript invocation command line (patch by Markus Steinborn). * src/info.c (cb_popupInfoPopup): Return when calling gs with the `quiet' option (patch by John Bowman). * src/main.c (main): Force the `XtSetArg' call to include XtNquiet to True (patch by John Bowman). * lib/unistd.h (getcwd): New file. * lib/unistd_.h (if !): New file. * lib/Makefile.am: New file. * lib/gettext.h: New file. * lib/getopt_int.h: New file. * lib/getopt_.h: New file. * lib/getopt.c: New file. * lib/getopt1.c: New file. * lib/dummy.c: New file. 2007-03-31 Peter Breitenlohner * src/resource.c (resource_buildDatabase): avoid segfaults when reading ~/.gv as produced by State -> Setup Options -> Save 2007-03-16 Jose E. Marchesi * doc/gv.texi: Fix GVERSION. 2006-07-07 Jose E. Marchesi * src/ps.c: `gettext' function renamed to `ps_gettext' to avoid collision with the `gettext' builtin function. 2006-05-17 Jose E. Marchesi * src/gv_signal.c (signal_setSignalHandlers): Ignore the SIGINT signal. 2005-03-31 Jose E. Marchesi * src/Makefile.am ($(srcdir)/gv_intern_res_unix.dat): Remove quotes from the gs command lines in order to accomodate to the 0000-unchequed Debian patch for quoting filenames. 2005-03-31 Jose E. Marchesi * src/Ghostview.c (StartInterpreter): Added the '-2x2' argument to gs in order to get the correct orientation for landscape files. Patch by John Bowman. * configure.ac: Enable the scrollbar code. Solves bug #11091. * src/main.c (main): use getopt_long_only in order to support old command line arguments style. * doc/gv.texi (Resource files): Typo fixed (Displaying new versions of a document): Reference to VMS removed. (How can I make even more room for the image?): Subst -spartan by --spartan * configure.ac: The signal handler is now enabled by default, following the commentary on configure.ac Typo: enable-signal-handle -> enable-signal-handler * src/ps.c: Strip off the external reference to 'pdf_delaysafer_hack' Revert the delaysafer hack * src/misc.c (misc_changeFile): Strip off directories from the path of the file. Patch by John Bowman. 2005-01-17 Jose E. Marchesi * src/ps.c: idem. * src/main.c: idem. * src/resource.c (resource_buildDatabase): Patch from FreeBSD ports in order to avoid gcc-dependant code: variable declaration only on beginning of blocks. 2004-12-31 Jose E. Marchesi * src/Makefile.am (AM_CFLAGS): Use @X_CFLAGS@ from autoconf 2004-12-29 Gerald Pfeifer * src/file.c (file_fileIsNotUseful): Use EFTYPE instead of ENODATA if the former has been defined. 2004-12-19 Jose E. Marchesi * NEWS (Notation): Upgraded for 3.6.1 2004-12-19 Jose E. Marchesi * README: Upgraded for 3.6.1 2004-12-19 Jose E. Marchesi * configure.ac: Change reference source file on AC_INIT 2004-12-19 Jose E. Marchesi * src/gv_message.h (displayed\n\): Fixed a typo on the help message. * src/gv_misc_res.dat: Changed the Reopen label to Reload for the File menu. * src/Makefile.am ($(srcdir)/gv_intern_res_unix.dat): Fix GV.gsCmdConvPDF in order to work. 2004-12-06 Jose E. Marchesi * src/main.c (main): Process GNU arguments after X initialization 2004-11-11 Jose E. Marchesi * configure.ac: Changed the scratch dir from ~/ to /tmp/ 2004-11-10 Jose E. Marchesi * New ChangeLog gv-3.7.4/depcomp0000755000076400007640000004426712121323352010456 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free # Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU 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 General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gv-3.7.4/Makefile.am0000664000076400007640000000037411735103745011142 00000000000000# Makefile.am for gv/ # # Time-stamp: "07/06/25 19:48:00 jemarch" # # Copyrigh (C) 2004 José E. Marchesi # Process this file with automake to get Makefile.in ACLOCAL_AMFLAGS = -I m4 SUBDIRS = lib src doc EXTRA_DIST = README.I18N README.TRANSLATION