International. You may reach your translation team at the address
`LL@li.org', replacing LL by the two-letter ISO 639 code for your
language. Language codes are *not* the same as the country codes given
-in ISO 3166. The following translation teams exist, as of August 1997:
+in ISO 3166. The following translation teams exist, as of December
+1997:
Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en',
Esperanto `eo', Finnish `fi', French `fr', German `de', Hungarian
==================
Languages are not equally supported in all packages. The following
-matrix shows the current state of internationalization, as of August
+matrix shows the current state of internationalization, as of December
1997. The matrix shows, in regard of each package, for which languages
PO files have been submitted to translation coordination.
- Ready PO files cs da de en es fi fr it ja ko nl no pl pt sl sv
- .-------------------------------------------------.
- bash | [] [] [] | 3
- bison | [] [] [] | 3
- clisp | [] [] [] [] | 4
- cpio | [] [] [] [] [] | 5
- diffutils | [] [] [] [] [] | 5
- enscript | [] [] [] [] [] [] | 6
- fileutils | [] [] [] [] [] [] [] [] [] [] | 10
- findutils | [] [] [] [] [] [] [] [] | 8
- flex | [] [] [] [] | 4
- gcal | [] [] [] [] [] | 5
- gettext | [] [] [] [] [] [] [] [] [] [] | 11
- grep | [] [] [] [] [] [] [] [] [] | 9
- hello | [] [] [] [] [] [] [] [] [] [] | 10
- id-utils | [] [] [] | 3
- indent | [] [] [] [] | 4
- libc | [] [] [] [] [] [] [] | 7
- m4 | [] [] [] [] [] | 5
- make | [] [] [] [] [] [] | 6
- music | [] [] | 2
- ptx | [] [] [] [] [] [] [] [] | 8
- recode | [] [] [] [] [] [] [] [] [] | 9
- sh-utils | [] [] [] [] [] [] [] | 7
- sharutils | [] [] [] [] [] | 5
- tar | [] [] [] [] [] [] [] [] [] [] | 10
- texinfo | [] | 1
- textutils | [] [] [] [] [] [] [] [] [] | 9
- wdiff | [] [] [] [] [] [] [] [] | 8
- `-------------------------------------------------'
- 16 languages cs da de en es fi fr it ja ko nl no pl pt sl sv
- 27 packages 3 2 24 1 17 1 26 2 1 11 20 9 19 7 7 17 167
+ Ready PO files cs da de en es fi fr it ja ko nl no pl pt ru sl sv
+ .----------------------------------------------------.
+ bash | [] [] [] | 3
+ bison | [] [] [] | 3
+ clisp | [] [] [] [] | 4
+ cpio | [] [] [] [] [] [] | 6
+ diffutils | [] [] [] [] [] | 5
+ enscript | [] [] [] [] [] [] | 6
+ fileutils | [] [] [] [] [] [] [] [] [] [] | 10
+ findutils | [] [] [] [] [] [] [] [] [] | 9
+ flex | [] [] [] [] | 4
+ gcal | [] [] [] [] [] | 5
+ gettext | [] [] [] [] [] [] [] [] [] [] [] | 12
+ grep | [] [] [] [] [] [] [] [] [] [] | 10
+ hello | [] [] [] [] [] [] [] [] [] [] [] | 11
+ id-utils | [] [] [] | 3
+ indent | [] [] [] [] [] | 5
+ libc | [] [] [] [] [] [] [] | 7
+ m4 | [] [] [] [] [] [] | 6
+ make | [] [] [] [] [] [] | 6
+ music | [] [] | 2
+ ptx | [] [] [] [] [] [] [] [] | 8
+ recode | [] [] [] [] [] [] [] [] [] | 9
+ sh-utils | [] [] [] [] [] [] [] [] | 8
+ sharutils | [] [] [] [] [] [] | 6
+ tar | [] [] [] [] [] [] [] [] [] [] [] | 11
+ texinfo | [] [] [] | 3
+ textutils | [] [] [] [] [] [] [] [] [] | 9
+ wdiff | [] [] [] [] [] [] [] [] | 8
+ `----------------------------------------------------'
+ 17 languages cs da de en es fi fr it ja ko nl no pl pt ru sl sv
+ 27 packages 6 4 25 1 18 1 26 2 1 12 20 9 19 7 4 7 17 179
Some counters in the preceding matrix are higher than the number of
visible blocks let us expect. This is because a few extra PO files are
lag between the mere existence a PO file and its wide availability in a
distribution.
- If August 1997 seems to be old, you may fetch a more recent copy of
-this `ABOUT-NLS' file on most GNU archive sites.
+ If December 1997 seems to be old, you may fetch a more recent copy
+of this `ABOUT-NLS' file on most GNU archive sites.
+2000-01-08 Lars Gullik Bjønnes <larsbj@lyx.org>
+
+ * src/bufferlist.C (close): don't call insetUnlock if the buffer
+ does not have a BufferView.
+ (unlockInset): ditto + don't access the_locking_inset if the
+ buffer does not have a BufferView.
+
+ * src/LyXView.C (KeyPressMask_raw_callback): add a XSync in
+ certain circumstances so that we don't continue a keyboard
+ operation long after the key was released. Try f.ex. to load a
+ large document, press PageDown for some seconds and then release
+ it. Before this change the document would contine to scroll for
+ some time, with this change it stops imidiatly.
+
+ * src/support/block.h: don't allocate more space than needed. As
+ long as we don't try to write to the arr[x] in a array_type arr[x]
+ it is perfectly ok. (if you write to it you might segfault).
+ added operator value_type*() so that is possible to pass the array
+ to functions expecting a C-pointer.
+
+ * lib/Makefile.am (dist-hook): don't fail completely if unable to
+ cvs.
+
+ * intl/*: updated to gettext 0.10.35, tried to add our own
+ required modifications. Please verify.
+
+ * po/*: updated to gettext 0.10.35, tried to add our own required
+ modifications. Please verify.
+
+ * src/support/lstrings.C (tostr): go at fixing the problem with
+ cxx and stringstream. When stringstream is used return
+ oss.str().c_str() so that problems with lyxstring and basic_string
+ are avoided. Note that the best solution would be for cxx to use
+ basic_string all the way, but it is not conformant yet. (it seems)
+
+ * src/lyx_cb.C + other files: moved several global functions to
+ class BufferView, some have been moved to BufferView.[Ch] others
+ are still located in lyx_cb.C. Code changes because of this. (part
+ of "get rid of current_view project".)
+
+ * src/buffer.C + other files: moved several Buffer functions to
+ class BufferView, the functions are still present in buffer.C.
+ Code changes because of this.
+
+ * config/lcmessage.m4: updated to most recent. used when creating
+ acinclude.m4.
+
+ * config/progtest.m4: updated to most recent. used when creating
+ acinclude.m4.
+
+ * config/gettext.m4: updated to most recent. applied patch for
+ tmplinguas.
+
+ * config/gettext.m4.patch: new file that shows what changes we
+ have done to the local copy of gettext.m4.
+
+ * config/libtool.m4: new file, used in creation of acinclude.m4
+
+ * config/lyxinclude.m4: new file, this is the lyx created m4
+ macros, used in making acinclude.m4.
+
+ * autogen.sh: GNU m4 discovered as a separate task not as part of
+ the lib/configure creation.
+ Generate acinlucde from files in config. Actually cat
+ lyxinclude.m4, libtool.m4 and gettext.m4 together. This makes it
+ easier to upgrade .m4 files that really are external.
+
+ * src/Spacing.h: moved using std::istringstream to right after
+ <sstream>. This should fix the problem seen with some compilers.
+
2000-01-06 Lars Gullik Bjønnes <larsbj@lyx.org>
* src/lyx_cb.C: began some work to remove the dependency a lot of
SUBDIRS = intl po src lib
EXTRA_DIST = ANNOUNCE OLD-CHANGES INSTALL.OS2 INSTALL.autoconf README.OS2 \
- UPGRADING lyx.man \
+ UPGRADING lyx.man acconfig.h \
config development forms images
ETAGS_ARGS = --c++
man_MANS = lyx.1
case $gxx_version in
2.7*) CXXFLAGS="$lyx_opt";;
2.95.1) CXXFLAGS="-g $lyx_opt -fpermissive -fno-rtti";;
- 2.95.*) CXXFLAGS="-g $lyx_opt -fno-rtti";;
+ 2.95.*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
*) CXXFLAGS="-g $lyx_opt -fno-exceptions -fno-rtti";;
esac
else
AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG5,($ac_cv_func_select_arg5))
])
-### BEGIN libtool.m4
## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
## Copyright (C) 1996-1999 Free Software Foundation, Inc.
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
dnl This is just to silence aclocal about the macro not being used
ifelse([AC_DISABLE_FAST_INSTALL])dnl
-
-### END libtool.m4
-
# Macro to add for using GNU gettext.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
#
else
AC_MSG_CHECKING(for catalogs to be installed)
NEW_LINGUAS=
-dnl ============== Fix is here! =======================
+dnl ============== Fix is here! ======================
dnl Some sh do not like substitution in bounds of for loops
-dnl for lang in ${LINGUAS=$ALL_LINGUAS}; do
+dnl for lang in ${LINGUAS=$ALL_LINGUAS}; do
tmplinguas=${LINGUAS=$ALL_LINGUAS}
for lang in ${tmplinguas}; do
+dnl ==== end of fix
case "$ALL_LINGUAS" in
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
esac
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
< $srcdir/po/POTFILES.in > po/POTFILES
])
+# Check whether LC_MESSAGES is available in <locale.h>.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+AC_DEFUN(AM_LC_MESSAGES,
+ [if test $ac_cv_header_locale_h = yes; then
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE(HAVE_LC_MESSAGES)
+ fi
+ fi])
+# Search path for a program which passes the given test.
+# Ulrich Drepper <drepper@cygnus.com>, 1996.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN(AM_PATH_PROG_WITH_TEST,
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+ /*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test -n "[$]$1"; then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
AUTOHEADER=autoheader
AUTOMAKE="automake -a -c --foreign"
AUTOCONF=autoconf
+GNUM4=
+
+echo -n "Locating GNU m4..."
+for prog in $M4 gm4 gnum4 m4 ; do
+ case `$prog --version 2>&1` in
+ *GNU*) ok=yes
+ GNUM4=`type -path $prog`
+ echo "found: $GNUM4"
+ break ;;
+ *) ;;
+ esac
+done
+if test x$ok = xno ; then
+ echo "not found."
+fi
+
+# Generate acinclude.m4
+echo -n "Generate acinclude.m4..."
+rm -rf acinclude.m4
+touch acinclude.m4
+for fil in config/lyxinclude.m4 config/libtool.m4 config/gettext.m4 config/lcmessage.m4 config/progtest.m4 ; do
+ cat $fil >> acinclude.m4
+done
+echo "done."
# Generate the Makefiles and configure files
if ( aclocal --version ) </dev/null > /dev/null 2>&1; then
- echo "Building macros."
+ echo -n "Building macros..."
$ACLOCAL ; (cd lib/reLyX; $ACLOCAL )
+ echo "done."
else
echo "aclocal not found -- aborting"
exit
fi
if ( autoheader --version ) </dev/null > /dev/null 2>&1; then
- echo "Building config header template"
+ echo -n "Building config header template..."
$AUTOHEADER
+ echo "done."
else
echo "autoheader not found -- aborting"
exit
fi
if ( $AUTOMAKE --version ) </dev/null > /dev/null 2>&1; then
- echo "Building Makefile templates"
+ echo -n "Building Makefile templates..."
$AUTOMAKE ; (cd lib/reLyX ; $AUTOMAKE )
+ echo "done."
else
echo "automake not found -- aborting"
exit
fi
if ( $AUTOCONF --version ) </dev/null > /dev/null 2>&1; then
- echo "Building configure"
+ echo -n "Building configure..."
$AUTOCONF ; ( cd lib/reLyX ; $AUTOCONF )
+ echo "done."
echo 'run "./configure ; make"'
else
echo "autoconf not found -- aborting"
exit
fi
-# Autogenerate lib/configure.m4. We need GNU m4 for that and thus have
-# to try several ones.
-ok=no
-#for prog in $M4 gm4 gnum4 m4 ; do
-# case `$prog --help < /dev/null 2>&1 | grep traditional` in
-# *traditional*) echo "Building lib/configure"
-# rm -f lib/configure
-# $prog lib/configure.m4 >lib/configure
-# chmod a+x lib/configure
-# ok=yes
-# break ;;
-# *) ;;
-# esac
-#done
-# Why not use --version ? (Lgb)
-for prog in $M4 gm4 gnum4 m4 ; do
- case `$prog --version 2>&1` in
- *GNU*) echo "Building lib/configure"
- rm -f lib/configure
- $prog lib/configure.m4 >lib/configure
- chmod a+x lib/configure
- ok=yes
- break ;;
- *) ;;
- esac
-done
-if test $ok = no ; then
- echo "GNU m4 not found -- aborting"
+# Autogenerate lib/configure.m4.
+if test x$GNUM4 != x ; then
+ echo -n "Building lib/configure ..."
+ rm -f lib/configure
+ $GNUM4 lib/configure.m4 > lib/configure
+ chmod a+x lib/configure
+ echo "done."
+else
+ echo "No GNU m4. Impossible to build lib/configure -- aborting"
exit
fi
-echo "Creating POTFILES.in..."
+echo -n "Creating POTFILES.in..."
cat <<EOF > tmppot
#
# This file is automatically generated by autogen.sh. This command was
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
+# Free Software Foundation, Inc.
#
# 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
# Written by Per Bothner <bothner@cygnus.com>.
# The master version of this file is at the FSF in /home/gd/gnu/lib.
+# Please send patches to <autoconf-patches@gnu.org>.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
# (but try to keep the structure clean).
#
+# Use $HOST_CC if defined. $CC may point to a cross-compiler
+if test x"$CC_FOR_BUILD" = x; then
+ if test x"$HOST_CC" != x; then
+ CC_FOR_BUILD="$HOST_CC"
+ else
+ if test x"$CC" != x; then
+ CC_FOR_BUILD="$CC"
+ else
+ CC_FOR_BUILD=cc
+ fi
+ fi
+fi
+
+
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 8/24/94.)
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
+dummy=dummy-$$
+trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
# Note: order is significant - the case branches are not exclusive.
# 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.
- cat <<EOF >dummy.s
+ cat <<EOF >$dummy.s
.globl main
.ent main
main:
ret \$31,(\$26),1
.end main
EOF
- ${CC-cc} dummy.s -o dummy 2>/dev/null
+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
if test "$?" = 0 ; then
- ./dummy
+ ./$dummy
case "$?" in
7)
UNAME_MACHINE="alpha"
;;
esac
fi
- rm -f dummy.s dummy
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
+ rm -f $dummy.s $dummy
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit 0 ;;
+ 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 0 ;;
21064:Windows_NT:50:3)
echo alpha-dec-winnt3.5
wgrisc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit 0 ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit 0;;
SR2?01:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
exit 0;;
- Pyramid*:OSx*:*:*|MIS*:OSx*:*:*|MIS*:SMP_DC-OSx*:*:*)
+ 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
echo pyramid-pyramid-bsd
fi
exit 0 ;;
- NILE:*:*:dcosx)
+ NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
sun4H:SunOS:5.*:*)
atari*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
+ # 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 0 ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit 0 ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit 0 ;;
sun3*:NetBSD:*:*)
echo m68k-sun-netbsd${UNAME_RELEASE}
exit 0 ;;
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix${UNAME_RELEASE}
exit 0 ;;
- 2020:CLIX:*:*)
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
echo clipper-intergraph-clix${UNAME_RELEASE}
exit 0 ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
- sed 's/^ //' << EOF >dummy.c
- int main (argc, argv) int argc; char **argv; {
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+ 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);
exit (-1);
}
EOF
- ${CC-cc} dummy.c -o dummy \
- && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
- && rm dummy.c dummy && exit 0
- rm -f dummy.c dummy
+ $CC_FOR_BUILD $dummy.c -o $dummy \
+ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+ && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;;
Night_Hawk:Power_UNIX:*:*)
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
- -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
+ 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
+ else
echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
fi
- else echo i586-dg-dgux${UNAME_RELEASE}
- fi
exit 0 ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
exit 0 ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- sed 's/^ //' << EOF >dummy.c
+ sed 's/^ //' << EOF >$dummy.c
#include <sys/systemcfg.h>
main()
exit(0);
}
EOF
- ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
- rm -f dummy.c dummy
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
case "${UNAME_MACHINE}" in
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
- 9000/6?? | 9000/7?? | 9000/80[24] | 9000/8?[13679] | 9000/892 )
- sed 's/^ //' << EOF >dummy.c
+ 9000/[678][0-9][0-9])
+ sed 's/^ //' << EOF >$dummy.c
#include <stdlib.h>
#include <unistd.h>
-
+
int main ()
{
#if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS);
- #endif
+ #endif
long cpu = sysconf (_SC_CPU_VERSION);
-
- switch (cpu)
+
+ 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:
+ case CPU_PA_RISC2_0:
#if defined(_SC_KERNEL_BITS)
- switch (bits)
+ switch (bits)
{
case 64: puts ("hppa2.0w"); break;
case 32: puts ("hppa2.0n"); break;
} break;
#else /* !defined(_SC_KERNEL_BITS) */
puts ("hppa2.0"); break;
- #endif
+ #endif
default: puts ("hppa1.0"); break;
}
exit (0);
}
EOF
- (${CC-cc} dummy.c -o dummy 2>/dev/null ) && HP_ARCH=`./dummy`
- rm -f dummy.c dummy
+ (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
+ rm -f $dummy.c $dummy
esac
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
3050*:HI-UX:*:*)
- sed 's/^ //' << EOF >dummy.c
+ sed 's/^ //' << EOF >$dummy.c
#include <unistd.h>
int
main ()
exit (0);
}
EOF
- ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
- rm -f dummy.c dummy
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
echo unknown-hitachi-hiuxwe2
exit 0 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
exit 0 ;;
+ *9??*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit 0 ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
echo hppa1.1-hp-osf
exit 0 ;;
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
exit 0 ;;
+ hppa*:OpenBSD:*:*)
+ echo hppa-unknown-openbsd
+ exit 0 ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit 0 ;;
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE}
exit 0 ;;
+ CRAY*T3E:*:*:*)
+ echo alpha-cray-unicosmk${UNAME_RELEASE}
+ exit 0 ;;
CRAY-2:*:*:*)
echo cray2-cray-unicos
exit 0 ;;
F300:UNIX_System_V:*:*)
- FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
+ i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit 0 ;;
sparc*:BSD/OS:*:*)
echo sparc-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
- i?86:BSD/386:*:* | *:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
*:FreeBSD:*:*)
+ if test -x /usr/bin/objformat; then
+ if test "elf" = "`/usr/bin/objformat`"; then
+ echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
+ exit 0
+ fi
+ fi
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
*:NetBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
exit 0 ;;
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin32
+ echo ${UNAME_MACHINE}-pc-cygwin
exit 0 ;;
i*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit 0 ;;
+ 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 i386-pc-interix
+ exit 0 ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit 0 ;;
p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin32
+ echo powerpcle-unknown-cygwin
exit 0 ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;
*:Linux:*:*)
- # uname on the ARM produces all sorts of strangeness, and we need to
- # filter it out.
- case "$UNAME_MACHINE" in
- arm* | sa110*) UNAME_MACHINE="arm" ;;
- esac
# The BFD linker knows what the default object file format is, so
- # first see if it will tell us.
- ld_help_string=`ld --help 2>&1`
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ ld_help_string=`cd /; ld --help 2>&1`
ld_supported_emulations=`echo $ld_help_string \
| sed -ne '/supported emulations:/!d
s/[ ][ ]*/ /g
s/ .*//
p'`
case "$ld_supported_emulations" in
- i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
- i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
- sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
- armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
- m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
- elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
+ *ia64)
+ echo "${UNAME_MACHINE}-unknown-linux"
+ exit 0
+ ;;
+ i?86linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit 0
+ ;;
+ i?86coff)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ exit 0
+ ;;
+ sparclinux)
+ echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
+ exit 0
+ ;;
+ armlinux)
+ echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
+ exit 0
+ ;;
+ elf32arm*)
+ echo "${UNAME_MACHINE}-unknown-linux-gnu"
+ exit 0
+ ;;
+ armelf_linux*)
+ echo "${UNAME_MACHINE}-unknown-linux-gnu"
+ exit 0
+ ;;
+ m68klinux)
+ echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
+ exit 0
+ ;;
+ elf32ppc)
+ # Determine Lib Version
+ cat >$dummy.c <<EOF
+#include <features.h>
+#if defined(__GLIBC__)
+extern char __libc_version[];
+extern char __libc_release[];
+#endif
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+#if defined(__GLIBC__)
+ printf("%s %s\n", __libc_version, __libc_release);
+#else
+ printf("unkown\n");
+#endif
+ return 0;
+}
+EOF
+ LIBC=""
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./$dummy | grep 1\.99 > /dev/null
+ if test "$?" = 0 ; then
+ LIBC="libc1"
+ fi
+ fi
+ rm -f $dummy.c $dummy
+ echo powerpc-unknown-linux-gnu${LIBC}
+ exit 0
+ ;;
esac
if test "${UNAME_MACHINE}" = "alpha" ; then
- sed 's/^ //' <<EOF >dummy.s
+ sed 's/^ //' <<EOF >$dummy.s
.globl main
.ent main
main:
.end main
EOF
LIBC=""
- ${CC-cc} dummy.s -o dummy 2>/dev/null
+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
if test "$?" = 0 ; then
- ./dummy
+ ./$dummy
case "$?" in
7)
UNAME_MACHINE="alpha"
16)
UNAME_MACHINE="alphaev6"
;;
- esac
+ esac
- objdump --private-headers dummy | \
+ objdump --private-headers $dummy | \
grep ld.so.1 > /dev/null
if test "$?" = 0 ; then
LIBC="libc1"
fi
- fi
- rm -f dummy.s dummy
+ fi
+ rm -f $dummy.s $dummy
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
elif test "${UNAME_MACHINE}" = "mips" ; then
- cat >dummy.c <<EOF
-main(argc, argv)
- int argc;
- char *argv[];
-{
+ cat >$dummy.c <<EOF
+#ifdef __cplusplus
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
#ifdef __MIPSEB__
printf ("%s-unknown-linux-gnu\n", argv[1]);
#endif
return 0;
}
EOF
- ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
- rm -f dummy.c dummy
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
else
# Either a pre-BFD a.out linker (linux-gnuoldld)
# or one that does not give us useful --help.
;;
esac
# Determine whether the default compiler is a.out or elf
- cat >dummy.c <<EOF
+ cat >$dummy.c <<EOF
#include <features.h>
-main(argc, argv)
- int argc;
- char *argv[];
-{
+#ifdef __cplusplus
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
return 0;
}
EOF
- ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
- rm -f dummy.c dummy
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
fi ;;
# 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 ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit 0 ;;
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_RELEASE}
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit 0 ;;
+ i?86:*:5:7*)
+ # Fixed at (any) Pentium or better
+ UNAME_MACHINE=i586
+ if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
+ echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
fi
exit 0 ;;
i?86:*:3.2:*)
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
+ (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit 0 ;;
- i?86:UnixWare:*:*)
- if /bin/uname -X 2>/dev/null >/dev/null ; then
- (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
- && UNAME_MACHINE=i586
- fi
- echo ${UNAME_MACHINE}-unixware-${UNAME_RELEASE}-${UNAME_VERSION}
- exit 0 ;;
pc:*:*:*)
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i386.
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit 0 ;;
- i?86:LynxOS:2.*:*)
+ i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
TSUNAMI:LynxOS:2.*:*)
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
exit 0 ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
exit 0 ;;
news*:NEWS-OS:*:6*)
echo mips-sony-newsos6
exit 0 ;;
- R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*)
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
else
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
exit 0 ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:QNX:*:4*)
+ echo i386-qnx-qnx${UNAME_VERSION}
+ exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-cat >dummy.c <<EOF
+cat >$dummy.c <<EOF
#ifdef _SEQUENT_
# include <sys/types.h>
# include <sys/utsname.h>
#endif
int version;
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
exit (0);
#endif
}
EOF
-${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
-rm -f dummy.c dummy
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
+rm -f $dummy.c $dummy
# Apollos put the system type in the environment.
#! /bin/sh
# Configuration validation subroutine script, version 1.1.
-# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc.
+# Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
# 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.
os=
basic_machine=$1
;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
-hiux*)
os=-hiuxwe2
;;
-sco5)
- os=sco3.2v5
+ os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco4)
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/'`
-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.
- tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
+ tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
- | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 | hppa2.0 \
- | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
- | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
- | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
- | mipstx39 | mipstx39el | armv[34][lb] \
- | sparc | sparclet | sparclite | sparc64 | v850)
+ | 580 | i960 | h8300 \
+ | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
+ | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
+ | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
+ | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
+ | mips64orion | mips64orionel | mipstx39 | mipstx39el \
+ | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
+ | mips64vr5000 | miprs64vr5000el | mcore \
+ | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
+ | thumb | d10v | fr30)
basic_machine=$basic_machine-unknown
;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
+ ;;
+
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
exit 1
;;
# Recognize the basic CPU types with company name.
- vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
+ # FIXME: clean up the formatting here.
+ vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
- | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
- | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* \
- | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
- | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
+ | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
+ | xmp-* | ymp-* \
+ | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
+ | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
+ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
+ | clipper-* | orion-* \
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
- | sparc64-* | mips64-* | mipsel-* | armv[34][lb]-*\
- | mips64el-* | mips64orion-* | mips64orionel-* \
- | mipstx39-* | mipstx39el-* \
- | f301-*)
+ | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
+ | mips64el-* | mips64orion-* | mips64orionel-* \
+ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
+ | mipstx39-* | mipstx39el-* | mcore-* \
+ | f301-* | armv*-* | t3e-* \
+ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
+ | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* )
;;
# 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
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
alliant | fx80)
basic_machine=fx80-alliant
;;
basic_machine=m68k-apollo
os=-sysv
;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
aux)
basic_machine=m68k-apple
os=-aux
encore | umax | mmax)
basic_machine=ns32k-encore
;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
fx2800)
basic_machine=i860-alliant
;;
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
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
;;
- hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
+ 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])
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
- os=-mvs
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i[34567]86v32)
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
+ ;;
+ i386-go32 | go32)
+ basic_machine=i386-unknown
+ os=-go32
+ ;;
+ i386-mingw32 | mingw32)
+ basic_machine=i386-unknown
+ os=-mingw32
+ ;;
+ i386-qnx | qnx)
+ basic_machine=i386-qnx
+ ;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
miniframe)
basic_machine=m68000-convergent
;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
mipsel*-linux*)
basic_machine=mipsel-unknown
os=-linux-gnu
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ msdos)
+ basic_machine=i386-unknown
+ os=-msdos
+ ;;
+ 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
basic_machine=mips-sony
os=-newsos
;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
next | m*-next )
basic_machine=m68k-next
case $os in
basic_machine=i960-intel
os=-nindy
;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
np1)
basic_machine=np1-gould
;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
pa-hitachi)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
- pentium | p5 | k5 | nexen)
+ pentium | p5 | k5 | k6 | nexen)
basic_machine=i586-pc
;;
- pentiumpro | p6 | k6 | 6x86)
+ pentiumpro | p6 | 6x86)
basic_machine=i686-pc
;;
pentiumii | pentium2)
basic_machine=i786-pc
;;
- pentium-* | p5-* | k5-* | nexen-*)
+ pentium-* | p5-* | k5-* | k6-* | nexen-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- pentiumpro-* | p6-* | k6-* | 6x86-*)
+ pentiumpro-* | p6-* | 6x86-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-*)
ps2)
basic_machine=i386-ibm
;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
rm[46]00)
basic_machine=mips-siemens
;;
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
sequent)
basic_machine=i386-sequent
;;
basic_machine=sh-hitachi
os=-hms
;;
+ sparclite-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
;;
basic_machine=i386-sequent
os=-dynix
;;
+ t3e)
+ basic_machine=t3e-cray
+ os=-unicos
+ ;;
tx39)
basic_machine=mipstx39-unknown
;;
basic_machine=a29k-nyu
os=-sym1
;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
vaxv)
basic_machine=vax-dec
os=-sysv
basic_machine=a29k-wrs
os=-vxworks
;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
xmp)
basic_machine=xmp-cray
os=-unicos
xps | xps100)
basic_machine=xps100-honeywell
;;
+ z8k-*-coff)
+ basic_machine=z8k-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
+ ;;
mips)
if [ x$os = x-linux-gnu ]; then
basic_machine=mips-unknown
we32k)
basic_machine=we32k-att
;;
- sparc)
+ sparc | sparcv9)
basic_machine=sparc-sun
;;
cydra)
orion105)
basic_machine=clipper-highlevel
;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ c4x*)
+ basic_machine=c4x-none
+ os=-coff
+ ;;
*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
+ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -uxpv* | -beos*)
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+ | -macos* | -mpw* | -magic* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
-sunos6*)
os=`echo $os | sed -e 's|sunos6|solaris3|'`
;;
+ -opened*)
+ os=-openedition
+ ;;
-osfrose*)
os=-osfrose
;;
-acis*)
os=-aos
;;
+ -386bsd)
+ os=-bsd
+ ;;
-ctix* | -uts*)
os=-sysv
;;
-oss*)
os=-sysv3
;;
+ -qnx)
+ os=-qnx4
+ ;;
-svr4)
os=-sysv4
;;
# This must come after -sysvr4.
-sysv*)
;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
-xenix)
os=-xenix
;;
+ -*mint | -*MiNT)
+ os=-mint
+ ;;
-none)
;;
*)
*-acorn)
os=-riscix1.2
;;
+ arm*-rebel)
+ os=-linux
+ ;;
arm*-semi)
os=-aout
;;
# default.
# os=-sunos4
;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
*-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3
;;
*-ibm)
os=-aix
;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
*-hp)
os=-hpux
;;
f301-fujitsu)
os=-uxpv
;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
*)
os=-none
;;
-aix*)
vendor=ibm
;;
+ -beos*)
+ vendor=be
+ ;;
-hpux*)
vendor=hp
;;
+ -mpeix*)
+ vendor=hp
+ ;;
-hiux*)
vendor=hitachi
;;
-genix*)
vendor=ns
;;
- -mvs*)
+ -mvs* | -opened*)
vendor=ibm
;;
-ptx*)
-aux*)
vendor=apple
;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -*MiNT)
+ vendor=atari
+ ;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
# Macro to add for using GNU gettext.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
-# serial 3
+# serial 5
AC_DEFUN(AM_WITH_NLS,
[AC_MSG_CHECKING([whether NLS is requested])
if test "$gt_cv_func_gettext_libc" != "yes"; then
AC_CHECK_LIB(intl, bindtextdomain,
- [LIBS="-lintl $LIBS"
- AC_CACHE_CHECK([for gettext in libintl],
+ [AC_CACHE_CHECK([for gettext in libintl],
gt_cv_func_gettext_libintl,
- [AC_TRY_LINK([], [return (int) gettext ("")],
- gt_cv_func_gettext_libintl=yes,
- gt_cv_func_gettext_libintl=no)])])
+ [AC_CHECK_LIB(intl, gettext,
+ gt_cv_func_gettext_libintl=yes,
+ gt_cv_func_gettext_libintl=no)],
+ gt_cv_func_gettext_libintl=no)])
fi
if test "$gt_cv_func_gettext_libc" = "yes" \
: ;
else
AC_MSG_RESULT(
- [found xgettext programs is not GNU xgettext; ignore it])
+ [found xgettext program is not GNU xgettext; ignore it])
XGETTEXT=":"
fi
fi
nls_cv_header_intl=intl/libintl.h
nls_cv_header_libgt=intl/libgettext.h
fi
+ AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
+ AC_OUTPUT_COMMANDS(
+ [case "$CONFIG_FILES" in *po/Makefile.in*)
+ sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+ esac])
+
# If this is used in GNU gettext we have to set USE_NLS to `yes'
# because some of the sources are only built for this goal.
AC_REQUIRE([AC_FUNC_MMAP])dnl
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
-unistd.h values.h sys/param.h])
+unistd.h sys/param.h])
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
-__argz_count __argz_stringify __argz_next])
+strdup __argz_count __argz_stringify __argz_next])
if test "${ac_cv_func_stpcpy+set}" != "set"; then
AC_CHECK_FUNCS(stpcpy)
else
AC_MSG_CHECKING(for catalogs to be installed)
NEW_LINGUAS=
- for lang in ${LINGUAS=$ALL_LINGUAS}; do
+dnl ============== Fix is here! ======================
+dnl Some sh do not like substitution in bounds of for loops
+dnl for lang in ${LINGUAS=$ALL_LINGUAS}; do
+ tmplinguas=${LINGUAS=$ALL_LINGUAS}
+ for lang in ${tmplinguas}; do
+dnl ==== end of fix
case "$ALL_LINGUAS" in
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
esac
fi
fi
+ dnl The reference to <locale.h> in the installed <libintl.h> file
+ dnl must be resolved because we cannot expect the users of this
+ dnl to define HAVE_LOCALE_H.
+ if test $ac_cv_header_locale_h = yes; then
+ INCLUDE_LOCALE_H="#include <locale.h>"
+ else
+ INCLUDE_LOCALE_H="\
+/* The system does not provide the header <locale.h>. Take care yourself. */"
+ fi
+ AC_SUBST(INCLUDE_LOCALE_H)
+
dnl Determine which catalog format we have (if any is needed)
dnl For now we know about two different formats:
dnl Linux libc-5 and the normal X/Open format
# Check whether LC_MESSAGES is available in <locale.h>.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
# serial 1
reload_cmds='$LD$reload_flag -o $output$reload_objs'
echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
# PORTME Some linkers may need a different reload flag.
-if [ x$with_gnu_ld = xyes ] ; then
-reload_flag='-Ur'
-else
reload_flag='-r'
-fi
echo "$ac_t$reload_flag" 1>&6
test -n "$reload_flag" && reload_flag=" $reload_flag"
# Search path for a program which passes the given test.
# Ulrich Drepper <drepper@cygnus.com>, 1996.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
# serial 1
dist-hook:
cd ${distdir} ; rm -rf `find . -name \*CVS\*` ; \
rm -rf doc/BUGS.lyx ; \
- cvs -Q export -r HEAD -d doc lyxdoc
+ { cvs -Q export -r HEAD -d doc lyxdoc || \
+ echo "WARNING: Unable to get LyX Documentation from CVS!" ; true ; }
# Makefile for program source directory in GNU NLS utilities package.
-# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
#
-# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# This file file be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
PACKAGE = @PACKAGE@
VERSION = @VERSION@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
-INCLUDES = -I../src -I$(top_srcdir)/intl
+INCLUDES = -I.. -I$(top_srcdir)/intl
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
all: all-@USE_NLS@
-all-yes: $(srcdir)/cat-id-tbl.c $(CATALOGS)
+all-yes: cat-id-tbl.c $(CATALOGS)
all-no:
$(srcdir)/$(PACKAGE).pot: $(POTFILES)
$(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
--add-comments --keyword=_ --keyword=N_ \
- --files-from=$(srcdir)/POTFILES.in
- rm -f $(srcdir)/$(PACKAGE).pot
- mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
+ --files-from=$(srcdir)/POTFILES.in \
+ && test ! -f $(PACKAGE).po \
+ || ( rm -f $(srcdir)/$(PACKAGE).pot \
+ && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
-$(srcdir)/cat-id-tbl.c: $(srcdir)/stamp-cat-id; @:
-$(srcdir)/stamp-cat-id: $(srcdir)/$(PACKAGE).pot
+$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
+$(srcdir)/stamp-cat-id: $(PACKAGE).pot
rm -f cat-id-tbl.tmp
sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
| sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
- if test -r $(MKINSTALLDIRS); then \
+ if test -r "$(MKINSTALLDIRS)"; then \
$(MKINSTALLDIRS) $(datadir); \
else \
- $(top_srcdir)/mkinstalldirs $(datadir); \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $(datadir); \
fi
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
esac; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
dir=$$destdir/$$lang/LC_MESSAGES; \
- if test -r $(MKINSTALLDIRS); then \
+ if test -r "$(MKINSTALLDIRS)"; then \
$(MKINSTALLDIRS) $$dir; \
else \
- $(top_srcdir)/mkinstalldirs $$dir; \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
fi; \
if test -r $$cat; then \
$(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
fi; \
done
if test "$(PACKAGE)" = "gettext"; then \
- if test -r $(MKINSTALLDIRS); then \
+ if test -r "$(MKINSTALLDIRS)"; then \
$(MKINSTALLDIRS) $(gettextsrcdir); \
else \
- $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
fi; \
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
$(gettextsrcdir)/Makefile.in.in; \
extern bool input_prohibited;
extern bool selection_possible;
extern char ascii_type;
-extern int UnlockInset(UpdatableInset * inset);
-extern void ToggleFloat();
+//extern int UnlockInset(UpdatableInset * inset);
extern void MenuPasteSelection(char at);
extern InsetUpdateStruct * InsetUpdateList;
extern void UpdateInsetUpdateList();
button);
return 0;
} else {
- UnlockInset(the_locking_inset);
+ unlockInset(the_locking_inset);
}
}
}
}
if (hit == true) {
- ToggleFloat();
+ toggleFloat();
selection_possible = false;
return 0;
}
&& y + screen_first < text->cursor.y -
text->cursor.row->baseline
+ font.maxAscent() * 1.2 + font.maxDescent() * 1.2) {
- ToggleFloat();
+ toggleFloat();
selection_possible = false;
return 0;
}
#include FORMS_H_LOCATION
#include "BackStack.h"
#include "lyxtext.h"
-
+#include "LaTeX.h"
class LyXView;
class Buffer;
void insetSleep();
///
void insetWakeup();
+ ///
+ void replaceWord(string const & replacestring);
+ ///
+ void endOfSpellCheck();
+ ///
+ void selectLastWord();
+ ///
+ char * nextWord(float & value);
+ ///
+ void insertCorrectQuote();
+ ///
+ void gotoNote();
+ ///
+ bool gotoLabel(string const & label);
+ ///
+ void paste();
+ ///
+ void cut();
+ ///
+ void copy();
+ ///
+ void pasteEnvironment();
+ ///
+ void copyEnvironment();
+ ///
+ void hfill();
+ ///
+ void protectedBlank();
+ ///
+ void newline();
+ ///
+ void menuSeparator();
+ ///
+ void endOfSentenceDot();
+ ///
+ void ldots();
+ ///
+ void hyphenationPoint();
+ ///
+ void menuUndo();
+ ///
+ void menuRedo();
+ ///
+ void toggleFloat();
+ ///
+ void openStuff();
+ ///
+ void insertNote();
+ ///
+ void allFloats(char flag, char figmar);
+ /// removes all autodeletable insets
+ bool removeAutoInsets();
+ ///
+ void insertErrors(TeXErrors & terr);
+ ///
+ void setCursorFromRow(int row);
+ /** Insert an inset into the buffer
+ Insert inset into buffer, placing it in a layout of lout,
+ if no_table make sure that it doesn't end up in a table. */
+ void insertInset(Inset * inset, string const & lout = string(),
+ bool no_table = false);
+ /// open and lock an updatable inset
+ void open_new_inset(UpdatableInset * new_inset);
+ /// Inserts a lyx file at cursor position. Returns false if it fails.
+ bool insertLyXFile(string const & file);
+ ///
+ int lockInset(UpdatableInset * inset);
+ ///
+ void showLockedInsetCursor(long x, long y, int asc, int desc);
+ ///
+ void hideLockedInsetCursor(long x, long y, int asc, int desc);
+ ///
+ void fitLockedInsetCursor(long x, long y, int asc, int desc);
+ ///
+ int unlockInset(UpdatableInset * inset);
+ ///
+ void lockedInsetStoreUndo(Undo::undo_kind kind);
private:
/// Update pixmap of screen
void updateScreen();
#pragma implementation
#endif
+#include <sys/time.h>
+#include <unistd.h>
+
#include "LyXView.h"
#include "lyx_main.h"
#include "lyxlookup.h"
LyXView * view = static_cast<LyXView*>(fl->u_vdata);
int retval = 0; // 0 means XForms should have a look at this event
+#define USE_XSYNC 1
+#ifdef USE_XSYNC
+ XKeyEvent * xke = static_cast<XKeyEvent*>(xev);
+ static Time last_time_pressed = 0;
+ static Time last_time_released = 0;
+ static unsigned int last_key_pressed = 0;
+ static unsigned int last_key_released = 0;
+ static unsigned int last_state_pressed = 0;
+ static unsigned int last_state_released = 0;
+#endif
// funny. Even though the raw_callback is registered with KeyPressMask,
// also KeyRelease-events are passed through:-(
// [It seems that XForms puts them in pairs... (JMarc)]
if (static_cast<XEvent*>(xev)->type == KeyPress
&& view->bufferview->getWorkArea()->focus
- && view->bufferview->getWorkArea()->active)
+ && view->bufferview->getWorkArea()->active) {
+#ifdef USE_XSYNC
+ last_time_pressed = xke->time;
+ last_key_pressed = xke->keycode;
+ last_state_pressed = xke->state;
+#endif
retval = view->getLyXFunc()
->processKeyEvent(static_cast<XEvent*>(xev));
+ }
+#ifdef USE_XSYNC
+ else if (static_cast<XEvent*>(xev)->type == KeyRelease
+ && view->bufferview->getWorkArea()->focus
+ && view->bufferview->getWorkArea()->active) {
+ last_time_released = xke->time;
+ last_key_released = xke->keycode;
+ last_state_released = xke->state;
+ }
+
+ if (last_key_released == last_key_pressed
+ && last_state_released == last_state_pressed
+ && last_time_released == last_time_pressed) {
+ // When the diff between last_time_released and
+ // last_time_pressed is 0, that sinifies an autoreapeat
+ // at least on my system. It like some feedback from
+ // others, especially from user running LyX remote.
+ //lyxerr << "Syncing - purging X events." << endl;
+ XSync(fl_get_display(), 1);
+ // This purge make f.ex. scrolling stop imidiatly when
+ // releaseing the PageDown button. The question is if this
+ // purging of XEvents can cause any harm...after some testing
+ // I can see no problems, but I'd like other reports too.
+ }
+#endif
return retval;
}
#ifdef HAVE_SSTREAM
#include <sstream>
+using std::istringstream;
#else
#include <strstream>
#endif
-using std::istringstream;
#include "support/LOstream.h"
}
-// candidate for move to BufferView
// Inserts a file into current document
-bool Buffer::insertLyXFile(string const & filen)
+bool BufferView::insertLyXFile(string const & filen)
//
// (c) CHT Software Service GmbH
// Uwe C. Schroeder
return false;
}
- users->beforeChange();
+ beforeChange();
ifstream ifs(fname.c_str());
if (!ifs) {
if (c == '#') {
lyxerr.debug() << "Will insert file with header" << endl;
- res = readFile(lex, users->text->cursor.par);
+ res = buffer()->readFile(lex, text->cursor.par);
} else {
lyxerr.debug() << "Will insert file without header" << endl;
- res = readLyXformat2(lex, users->text->cursor.par);
+ res = buffer()->readLyXformat2(lex, text->cursor.par);
}
resize();
void Buffer::sgmlOpenTag(ostream & os, int depth,
string const & latexname) const
{
-#if 0
- static char const * space[] = {
- " "," ", " ", " ", " ", " ",
- " ",
- " ", " ", " ",
- " "};
- os << space[depth] << "<" << latexname << ">\n";
-#endif
os << string(depth, ' ') << "<" << latexname << ">\n";
}
void Buffer::sgmlCloseTag(ostream & os, int depth,
string const & latexname) const
{
-#if 0
- static char * space[] = {" ", " ", " ", " ", " ",
- " ", " ", " ",
- " ", " ", " "};
-
- os << space[depth] << "</" << latexname << ">\n";
-#endif
os << string(depth, ' ') << "</" << latexname << ">\n";
}
}
}
- /* environment tag closing */
+ // environment tag closing
for( ; depth > par->depth; --depth) {
sgmlCloseTag(ofs, depth, environment_stack[depth]);
environment_stack[depth].clear();
}
- /* write opening SGML tags */
+ // write opening SGML tags
switch(style.latextype) {
case LATEX_PARAGRAPH:
if(depth == par->depth
}
-// candidate for move to BufferView
-bool Buffer::removeAutoInsets()
+bool BufferView::removeAutoInsets()
{
- LyXParagraph * par = paragraph;
+ LyXParagraph * par = buffer()->paragraph;
- LyXCursor cursor = users->text->cursor;
+ LyXCursor cursor = text->cursor;
LyXCursor tmpcursor = cursor;
cursor.par = tmpcursor.par->ParFromPos(tmpcursor.pos);
cursor.pos = tmpcursor.par->PositionInParFromPos(tmpcursor.pos);
if (par->AutoDeleteInsets()){
a = true;
if (par->footnoteflag != LyXParagraph::CLOSED_FOOTNOTE){
- /* this is possible now, since SetCursor takes
- care about footnotes */
- users->text->SetCursorIntern(par, 0);
- users->text->RedoParagraphs(users->text->cursor, users->text->cursor.par->Next());
- users->text->FullRebreak();
+ // this is possible now, since SetCursor takes
+ // care about footnotes
+ text->SetCursorIntern(par, 0);
+ text->RedoParagraphs(text->cursor,
+ text->cursor.par->Next());
+ text->FullRebreak();
}
}
par = par->next;
}
- /* avoid forbidden cursor positions caused by error removing */
+ // avoid forbidden cursor positions caused by error removing
if (cursor.pos > cursor.par->Last())
cursor.pos = cursor.par->Last();
- users->text->SetCursorIntern(cursor.par, cursor.pos);
+ text->SetCursorIntern(cursor.par, cursor.pos);
return a;
}
users->owner()->getMiniBuffer()->Set(_("Running LaTeX..."));
// Remove all error insets
- bool a = removeAutoInsets();
+ bool a = users->removeAutoInsets();
// Always generate the LaTeX file
makeLaTeXFile(name, org_path, false);
} else if ((res & LaTeX::ERRORS)) {
users->owner()->getMiniBuffer()->Set(_("Done"));
// Insert all errors as errors boxes
- insertErrors(terr);
+ users->insertErrors(terr);
// Dvi should also be kept dirty if the latex run
// ends up with errors. However it should be possible
users->owner()->getMiniBuffer()->Set(_("Running Literate..."));
// Remove all error insets
- bool a = removeAutoInsets();
+ bool a = users->removeAutoInsets();
// generate the Literate file if necessary
if (!isDviClean() || a) {
} else if ((res & Literate::ERRORS)) {
users->owner()->getMiniBuffer()->Set(_("Done"));
// Insert all errors as errors boxes
- insertErrors(terr);
+ users->insertErrors(terr);
// Dvi should also be kept dirty if the latex run
// ends up with errors. However it should be possible
users->owner()->getMiniBuffer()->Set(_("Building Program..."));
// Remove all error insets
- bool a = removeAutoInsets();
+ bool a = users->removeAutoInsets();
// generate the LaTeX file if necessary
if (!isNwClean() || a) {
} else if ((res & Literate::ERRORS)) {
users->owner()->getMiniBuffer()->Set(_("Done"));
// Insert all errors as errors boxes
- insertErrors(terr);
+ users->insertErrors(terr);
// Literate files should also be kept dirty if the literate
// command run ends up with errors.
users->owner()->getMiniBuffer()->Set(_("Running chktex..."));
// Remove all error insets
- bool a = removeAutoInsets();
+ bool a = users->removeAutoInsets();
// Generate the LaTeX file if neccessary
if (!isDviClean() || a) {
_("Could not run with file:"), name);
} else if (res > 0) {
// Insert all errors as errors boxes
- insertErrors(terr);
+ users->insertErrors(terr);
}
// if we removed error insets before we ran chktex or if we inserted
}
-extern void AllFloats(char, char);
-
-
-// candidate for move to BufferView
-void Buffer::insertErrors(TeXErrors & terr)
+void BufferView::insertErrors(TeXErrors & terr)
{
// Save the cursor position
- LyXCursor cursor = users->text->cursor;
+ LyXCursor cursor = text->cursor;
// This is drastic, but it's the only fix, I could find. (Asger)
- AllFloats(1, 0);
- AllFloats(1, 1);
+ allFloats(1, 0);
+ allFloats(1, 1);
for (TeXErrors::Errors::const_iterator cit = terr.begin();
cit != terr.end();
int tmpid = -1;
int tmppos = -1;
- texrow.getIdFromRow(errorrow, tmpid, tmppos);
+ buffer()->texrow.getIdFromRow(errorrow, tmpid, tmppos);
LyXParagraph * texrowpar = 0;
if (tmpid == -1) {
- texrowpar = users->text->FirstParagraph();
+ texrowpar = text->FirstParagraph();
tmppos = 0;
} else {
- texrowpar = users->text->GetParFromID(tmpid);
+ texrowpar = text->GetParFromID(tmpid);
}
if (texrowpar == 0)
continue;
InsetError * new_inset = new InsetError(msgtxt);
- users->text->SetCursorIntern(texrowpar, tmppos);
- users->text->InsertInset(new_inset);
- users->text->FullRebreak();
+ text->SetCursorIntern(texrowpar, tmppos);
+ text->InsertInset(new_inset);
+ text->FullRebreak();
}
// Restore the cursor position
- users->text->SetCursorIntern(cursor.par, cursor.pos);
+ text->SetCursorIntern(cursor.par, cursor.pos);
}
-// candidate for move to BufferView
-void Buffer::setCursorFromRow (int row)
+void BufferView::setCursorFromRow(int row)
{
int tmpid = -1;
int tmppos = -1;
- texrow.getIdFromRow(row, tmpid, tmppos);
+ buffer()->texrow.getIdFromRow(row, tmpid, tmppos);
LyXParagraph * texrowpar;
if (tmpid == -1) {
- texrowpar = users->text->FirstParagraph();
+ texrowpar = text->FirstParagraph();
tmppos = 0;
} else {
- texrowpar = users->text->GetParFromID(tmpid);
+ texrowpar = text->GetParFromID(tmpid);
}
- users->text->SetCursor(texrowpar, tmppos);
+ text->SetCursor(texrowpar, tmppos);
}
#endif
-// candidate for move to BufferView
-void Buffer::insertInset(Inset * inset, string const & lout,
+void BufferView::insertInset(Inset * inset, string const & lout,
bool no_table)
{
// check for table/list in tables
- if (no_table && users->text->cursor.par->table){
+ if (no_table && text->cursor.par->table){
WriteAlert(_("Impossible Operation!"),
_("Cannot insert table/list in table."),
_("Sorry."));
return;
}
// not quite sure if we want this...
- users->text->SetCursorParUndo();
- users->text->FreezeUndo();
+ text->SetCursorParUndo();
+ text->FreezeUndo();
- users->beforeChange();
+ beforeChange();
if (!lout.empty()) {
- users->update(-2);
- users->text->BreakParagraph();
- users->update(-1);
+ update(-2);
+ text->BreakParagraph();
+ update(-1);
- if (users->text->cursor.par->Last()) {
- users->text->CursorLeft();
+ if (text->cursor.par->Last()) {
+ text->CursorLeft();
- users->text->BreakParagraph();
- users->update(-1);
+ text->BreakParagraph();
+ update(-1);
}
- int lay = textclasslist.NumberOfLayout(params.textclass,
+ int lay = textclasslist.NumberOfLayout(buffer()->params.textclass,
lout).second;
if (lay == -1) // layout not found
// use default layout "Standard" (0)
lay = 0;
- users->text->SetLayout(lay);
+ text->SetLayout(lay);
- users->text->SetParagraph(0, 0,
+ text->SetParagraph(0, 0,
0, 0,
VSpace(VSpace::NONE), VSpace(VSpace::NONE),
LYX_ALIGN_LAYOUT,
string(),
0);
- users->update(-1);
+ update(-1);
- users->text->current_font.setLatex(LyXFont::OFF);
+ text->current_font.setLatex(LyXFont::OFF);
}
- users->text->InsertInset(inset);
- users->update(-1);
+ text->InsertInset(inset);
+ update(-1);
- users->text->UnFreezeUndo();
+ text->UnFreezeUndo();
}
// Open and lock an updatable inset
-// candidate for move to BufferView
-void Buffer::open_new_inset(UpdatableInset * new_inset)
+void BufferView::open_new_inset(UpdatableInset * new_inset)
{
- users->beforeChange();
- users->text->FinishUndo();
+ beforeChange();
+ text->FinishUndo();
insertInset(new_inset);
- users->text->CursorLeft();
- users->update(1);
+ text->CursorLeft();
+ update(1);
new_inset->Edit(0, 0);
}
-/* This function should be in Buffer because it's a buffer's property (ale) */
+// This function should be in Buffer because it's a buffer's property (ale)
string Buffer::getIncludeonlyList(char delim)
{
string lst;
}
-/* This is also a buffer property (ale) */
+// This is also a buffer property (ale)
string Buffer::getReferenceList(char delim)
{
/// if this is a child document and the parent is already loaded
}
-/* This is also a buffer property (ale) */
+// This is also a buffer property (ale)
string Buffer::getBibkeyList(char delim)
{
/// if this is a child document and the parent is already loaded
}
-// candidate for move to BufferView
/* This is also a buffer property (ale) */
// Not so sure about that. a goto Label function can not be buffer local, just
// think how this will work in a multiwindo/buffer environment, all the
// cursors in all the views showing this buffer will move. (Lgb)
// OK, then no cursor action should be allowed in buffer. (ale)
-bool Buffer::gotoLabel(string const & label)
+bool BufferView::gotoLabel(string const & label)
{
- LyXParagraph * par = paragraph;
+ LyXParagraph * par = buffer()->paragraph;
LyXParagraph::size_type pos;
Inset * inset;
while (par) {
while ((inset = par->ReturnNextInsetPointer(pos))){
for (int i = 0; i < inset->GetNumberOfLabels(); i++) {
if (label == inset->getLabel(i)) {
- users->beforeChange();
- users->text->SetCursor(par, pos);
- users->text->sel_cursor = users->text->cursor;
- users->update(0);
+ beforeChange();
+ text->SetCursor(par, pos);
+ text->sel_cursor = text->cursor;
+ update(0);
return true;
}
}
}
}
-void Buffer::Dispatch(const string & command)
+
+void Buffer::Dispatch(string const & command)
{
// Split command string into command and argument
string cmd, line = frontStrip(command);
Dispatch(lyxaction.LookupFunc(cmd.c_str()), arg.c_str());
}
-void Buffer::Dispatch(int action, const string & argument)
+
+void Buffer::Dispatch(int action, string const & argument)
{
switch (action) {
case LFUN_EXPORT:
break;
} // end of switch
-
}
}
/// Open and lock an updatable inset
- void open_new_inset(UpdatableInset *);
+ //void open_new_inset(UpdatableInset *);
///
void loadAutoSaveFile();
bool readLyXformat2(LyXLex &, LyXParagraph * par = 0);
/// Inserts a lyx file at cursor position. Returns false if it fails.
- bool insertLyXFile(string const & filename);
+ //bool insertLyXFile(string const & filename);
/// Write file. Returns false if unsuccesful.
bool writeFile(string const &, bool);
/** Insert an inset into the buffer
Insert inset into buffer, placing it in a layout of lout,
if no_table make sure that it doesn't end up in a table. */
- void insertInset(Inset *, string const & lout = string(),
- bool no_table = false);
+ //void insertInset(Inset *, string const & lout = string(),
+ // bool no_table = false);
///
- void setCursorFromRow (int);
+ //void setCursorFromRow (int);
///
string getIncludeonlyList(char delim = ',');
///
string getBibkeyList(char delim = '|');
///
- bool gotoLabel(string const &);
+ //bool gotoLabel(string const &);
/// removes all autodeletable insets
- bool removeAutoInsets();
+ //bool removeAutoInsets();
/** This will clearly have to change later. Later we can have more
than one user per buffer. */
doing a 'nice' LaTeX file */
bool niceFile;
+ /// Used when typesetting to place errorboxes.
+ TexRow texrow;
private:
///
- void insertErrors(TeXErrors &);
+ //void insertErrors(TeXErrors &);
///
void linuxDocHandleFootnote(ostream & os,
*/
BufferView * users;
- /// Used when typesetting to place errorboxes.
- TexRow texrow;
};
bool BufferList::close(Buffer * buf)
{
- buf->getUser()->insetUnlock();
+ if (buf->getUser()) buf->getUser()->insetUnlock();
if (buf->paragraph && !buf->isLyxClean() && !quitting) {
ProhibitInput();
if (!inset) return 1;
for(BufferStorage::iterator it = bstore.begin();
it != bstore.end(); ++it) {
- if ((*it)->getUser()->the_locking_inset == inset) {
+ if ((*it)->getUser()
+ && (*it)->getUser()->the_locking_inset == inset) {
(*it)->getUser()->insetUnlock();
return 0;
}
void InsetRef::gotoLabel()
{
if (master) {
- master->gotoLabel(getContents());
+ master->getUser()->gotoLabel(getContents());
}
}
#endif
// away. Definitely not the best solution, but I think it sorta works.
bool toggleall = true;
-void InsertCorrectQuote();
-
-
/*
This is the inset locking stuff needed for mathed --------------------
/* these functions return 1 if an error occured,
otherwise 0 */
// Now they work only for updatable insets. [Alejandro 080596]
-int LockInset(UpdatableInset * inset);
+//int LockInset(UpdatableInset * inset);
void ToggleLockedInsetCursor(long x, long y, int asc, int desc);
-void FitLockedInsetCursor(long x, long y, int asc, int desc);
-int UnlockInset(UpdatableInset * inset);
-void LockedInsetStoreUndo(Undo::undo_kind kind);
+//void FitLockedInsetCursor(long x, long y, int asc, int desc);
+//int UnlockInset(UpdatableInset * inset);
+//void LockedInsetStoreUndo(Undo::undo_kind kind);
/* this is for asyncron updating. UpdateInsetUpdateList will be called
automatically from LyX. Just insert the Inset into the Updatelist */
/* some function prototypes */
-void GotoNote();
-void OpenStuff();
-void ToggleFloat();
-void MenuUndo();
-void MenuRedo();
-void HyphenationPoint();
-void MenuSeparator();
-void HFill();
-void Newline();
-void ProtectedBlank();
-void CopyCB();
int RunLinuxDoc(int, string const &);
int RunDocBook(int, string const &);
void MenuWrite(Buffer * buf);
if (!label.empty()) {
InsetLabel * new_inset = new InsetLabel;
new_inset->setContents(label);
- current_view->buffer()->insertInset(new_inset);
+ current_view->insertInset(new_inset);
}
AllowInput();
}
}
-// candidate for move to BufferView
-void AllFloats(char flag, char figmar)
+void BufferView::allFloats(char flag, char figmar)
{
- if (!current_view->available())
- return;
+ if (!available()) return;
- LyXCursor cursor = current_view->text->cursor;
+ LyXCursor cursor = text->cursor;
if (!flag && cursor.par->footnoteflag != LyXParagraph::NO_FOOTNOTE
&& ((figmar
&& cursor.par->footnotekind != LyXParagraph::WIDE_FIG
&& cursor.par->footnotekind != LyXParagraph::WIDE_TAB
&& cursor.par->footnotekind != LyXParagraph::ALGORITHM)))
- ToggleFloat();
+ toggleFloat();
else
- current_view->beforeChange();
+ beforeChange();
LyXCursor tmpcursor = cursor;
cursor.par = tmpcursor.par->ParFromPos(tmpcursor.pos);
cursor.pos = tmpcursor.par->PositionInParFromPos(tmpcursor.pos);
- LyXParagraph *par = current_view->buffer()->paragraph;
+ LyXParagraph *par = buffer()->paragraph;
while (par) {
if (flag) {
if (par->footnoteflag == LyXParagraph::CLOSED_FOOTNOTE
if (par->previous
&& par->previous->footnoteflag !=
LyXParagraph::CLOSED_FOOTNOTE){ /* should be */
- current_view->text
- ->SetCursorIntern(par
- ->previous,
- 0);
- current_view->text->OpenFootnote();
+ text->SetCursorIntern(par->previous,
+ 0);
+ text->OpenFootnote();
}
}
}
)
)
) {
- current_view->text->SetCursorIntern(par, 0);
- current_view->text->CloseFootnote();
+ text->SetCursorIntern(par, 0);
+ text->CloseFootnote();
}
}
par = par->next;
}
- current_view->text->SetCursorIntern(cursor.par, cursor.pos);
- current_view->redraw();
- current_view->fitCursor();
- current_view->updateScrollbar();
+ text->SetCursorIntern(cursor.par, cursor.pos);
+ redraw();
+ fitCursor();
+ updateScrollbar();
}
}
-// candidate for move to BufferView
-void NoteCB()
+void BufferView::insertNote()
{
InsetInfo * new_inset = new InsetInfo();
- current_view->buffer()->insertInset(new_inset);
+ insertInset(new_inset);
new_inset->Edit(0, 0);
}
-// candidate for move to BufferView
-void OpenStuff()
+void BufferView::openStuff()
{
- if (current_view->available()) {
- current_view->owner()->getMiniBuffer()->Set(_("Open/Close..."));
- current_view->getScreen()->HideCursor();
- current_view->beforeChange();
- current_view->update(-2);
- current_view->text->OpenStuff();
- current_view->update(0);
+ if (available()) {
+ owner()->getMiniBuffer()->Set(_("Open/Close..."));
+ getScreen()->HideCursor();
+ beforeChange();
+ update(-2);
+ text->OpenStuff();
+ update(0);
}
}
-// candidate for move to BufferView
-void ToggleFloat()
+void BufferView::toggleFloat()
{
- if (current_view->available()) {
- current_view->owner()->getMiniBuffer()->Set(_("Open/Close..."));
- current_view->getScreen()->HideCursor();
- current_view->beforeChange();
- current_view->update(-2);
- current_view->text->ToggleFootnote();
- current_view->update(0);
+ if (available()) {
+ owner()->getMiniBuffer()->Set(_("Open/Close..."));
+ getScreen()->HideCursor();
+ beforeChange();
+ update(-2);
+ text->ToggleFootnote();
+ update(0);
}
}
-// candidate for move to BufferView
-void MenuUndo()
+void BufferView::menuUndo()
{
-/* if (current_view->buffer()->the_locking_inset) {
- current_view->owner()->getMiniBuffer()->Set(_("Undo not yet supported in math mode"));
- return;
- }*/
-
- if (current_view->available()) {
- current_view->owner()->getMiniBuffer()->Set(_("Undo"));
- current_view->getScreen()->HideCursor();
- current_view->beforeChange();
- current_view->update(-2);
- if (!current_view->text->TextUndo())
- current_view->owner()->getMiniBuffer()->Set(_("No further undo information"));
+ if (available()) {
+ owner()->getMiniBuffer()->Set(_("Undo"));
+ getScreen()->HideCursor();
+ beforeChange();
+ update(-2);
+ if (!text->TextUndo())
+ owner()->getMiniBuffer()->Set(_("No further undo information"));
else
- current_view->update(-1);
+ update(-1);
}
}
-// candidate for move to BufferView
-void MenuRedo()
+void BufferView::menuRedo()
{
- if (current_view->the_locking_inset) {
- current_view->owner()->getMiniBuffer()->Set(_("Redo not yet supported in math mode"));
+ if (the_locking_inset) {
+ owner()->getMiniBuffer()->Set(_("Redo not yet supported in math mode"));
return;
}
- if (current_view->available()) {
- current_view->owner()->getMiniBuffer()->Set(_("Redo"));
- current_view->getScreen()->HideCursor();
- current_view->beforeChange();
- current_view->update(-2);
- if (!current_view->text->TextRedo())
- current_view->owner()->getMiniBuffer()->Set(_("No further redo information"));
+ if (available()) {
+ owner()->getMiniBuffer()->Set(_("Redo"));
+ getScreen()->HideCursor();
+ beforeChange();
+ update(-2);
+ if (!text->TextRedo())
+ owner()->getMiniBuffer()->Set(_("No further redo information"));
else
- current_view->update(-1);
+ update(-1);
}
}
-// candidate for move to BufferView
-void HyphenationPoint()
+void BufferView::hyphenationPoint()
{
- if (current_view->available()) {
- current_view->getScreen()->HideCursor();
- current_view->update(-2);
+ if (available()) {
+ getScreen()->HideCursor();
+ update(-2);
InsetSpecialChar * new_inset =
new InsetSpecialChar(InsetSpecialChar::HYPHENATION);
- current_view->buffer()->insertInset(new_inset);
+ insertInset(new_inset);
}
}
-// candidate for move to BufferView
-void Ldots()
+void BufferView::ldots()
{
- if (current_view->available()) {
- current_view->getScreen()->HideCursor();
- current_view->update(-2);
+ if (available()) {
+ getScreen()->HideCursor();
+ update(-2);
InsetSpecialChar * new_inset =
new InsetSpecialChar(InsetSpecialChar::LDOTS);
- current_view->buffer()->insertInset(new_inset);
+ insertInset(new_inset);
}
}
-// candidate for move to BufferView
-void EndOfSentenceDot()
+void BufferView::endOfSentenceDot()
{
- if (current_view->available()) {
- current_view->getScreen()->HideCursor();
- current_view->update(-2);
+ if (available()) {
+ getScreen()->HideCursor();
+ update(-2);
InsetSpecialChar * new_inset =
new InsetSpecialChar(InsetSpecialChar::END_OF_SENTENCE);
- current_view->buffer()->insertInset(new_inset);
+ insertInset(new_inset);
}
}
-// candidate for move to BufferView
-void MenuSeparator()
+void BufferView::menuSeparator()
{
- if (current_view->available()) {
- current_view->getScreen()->HideCursor();
- current_view->update(-2);
+ if (available()) {
+ getScreen()->HideCursor();
+ update(-2);
InsetSpecialChar * new_inset =
new InsetSpecialChar(InsetSpecialChar::MENU_SEPARATOR);
- current_view->buffer()->insertInset(new_inset);
+ insertInset(new_inset);
}
}
-// candidate for move to BufferView
-void Newline()
+void BufferView::newline()
{
- if (current_view->available()) {
- current_view->getScreen()->HideCursor();
- current_view->update(-2);
- current_view->text->InsertChar(LyXParagraph::META_NEWLINE);
- current_view->update(-1);
+ if (available()) {
+ getScreen()->HideCursor();
+ update(-2);
+ text->InsertChar(LyXParagraph::META_NEWLINE);
+ update(-1);
}
}
-// candidate for move to BufferView
-void ProtectedBlank()
+void BufferView::protectedBlank()
{
- if (current_view->available()) {
- current_view->getScreen()->HideCursor();
- current_view->update(-2);
- current_view->text->InsertChar(LyXParagraph::META_PROTECTED_SEPARATOR);
- current_view->update(-1);
+ if (available()) {
+ getScreen()->HideCursor();
+ update(-2);
+ text->InsertChar(LyXParagraph::META_PROTECTED_SEPARATOR);
+ update(-1);
}
}
-// candidate for move to BufferView
-void HFill()
+void BufferView::hfill()
{
- if (current_view->available()) {
- current_view->getScreen()->HideCursor();
- current_view->update(-2);
- current_view->text->InsertChar(LyXParagraph::META_HFILL);
- current_view->update(-1);
+ if (available()) {
+ getScreen()->HideCursor();
+ update(-2);
+ text->InsertChar(LyXParagraph::META_HFILL);
+ update(-1);
}
}
current_view->text->ToggleFree(font, toggleall);
current_view->update(1);
}
- // removed since it overrides the ToggleFree Message about the style
- // Since Styles are more "High Level" than raw fonts I think the user
- // prefers it like this Matthias
- // FontStateShowCB( 0, 0 );
}
}
-// candidate for move to BufferView
-void CopyEnvironmentCB()
+void BufferView::copyEnvironment()
{
- if (current_view->available()) {
- current_view->text->copyEnvironmentType();
- /* clear the selection, even if mark_set */
- current_view->getScreen()->ToggleSelection();
- current_view->text->ClearSelection();
- current_view->update(-2);
- current_view->owner()->getMiniBuffer()->Set(_("Paragraph environment type copied"));
+ if (available()) {
+ text->copyEnvironmentType();
+ // clear the selection, even if mark_set
+ getScreen()->ToggleSelection();
+ text->ClearSelection();
+ update(-2);
+ owner()->getMiniBuffer()->Set(_("Paragraph environment type copied"));
}
}
-// candidate for move to BufferView
-void PasteEnvironmentCB()
+void BufferView::pasteEnvironment()
{
- if (current_view->available()) {
- current_view->text->pasteEnvironmentType();
- current_view->owner()->getMiniBuffer()->Set(_("Paragraph environment type set"));
- current_view->update(1);
+ if (available()) {
+ text->pasteEnvironmentType();
+ owner()->getMiniBuffer()->Set(_("Paragraph environment type set"));
+ update(1);
}
}
-// candidate for move to BufferView
-void CopyCB()
+void BufferView::copy()
{
- if (current_view->available()) {
- current_view->text->CopySelection();
- /* clear the selection, even if mark_set */
- current_view->getScreen()->ToggleSelection();
- current_view->text->ClearSelection();
- current_view->update(-2);
- current_view->owner()->getMiniBuffer()->Set(_("Copy"));
+ if (available()) {
+ text->CopySelection();
+ // clear the selection, even if mark_set
+ getScreen()->ToggleSelection();
+ text->ClearSelection();
+ update(-2);
+ owner()->getMiniBuffer()->Set(_("Copy"));
}
}
-// candidate for move to BufferView
-void CutCB()
+void BufferView::cut()
{
- if (current_view->available()) {
- current_view->getScreen()->HideCursor();
- current_view->update(-2);
- current_view->text->CutSelection();
- current_view->update(1);
- current_view->owner()->getMiniBuffer()->Set(_("Cut"));
+ if (available()) {
+ getScreen()->HideCursor();
+ update(-2);
+ text->CutSelection();
+ update(1);
+ owner()->getMiniBuffer()->Set(_("Cut"));
}
}
-// candidate for move to BufferView
-void PasteCB()
+void BufferView::paste()
{
- if (!current_view->available()) return;
+ if (!available()) return;
- current_view->owner()->getMiniBuffer()->Set(_("Paste"));
- current_view->getScreen()->HideCursor();
- /* clear the selection */
- current_view->getScreen()->ToggleSelection();
- current_view->text->ClearSelection();
- current_view->update(-2);
+ owner()->getMiniBuffer()->Set(_("Paste"));
+ getScreen()->HideCursor();
+ // clear the selection
+ getScreen()->ToggleSelection();
+ text->ClearSelection();
+ update(-2);
- /* paste */
- current_view->text->PasteSelection();
- current_view->update(1);
+ // paste
+ text->PasteSelection();
+ update(1);
- /* clear the selection */
- current_view->getScreen()->ToggleSelection();
- current_view->text->ClearSelection();
- current_view->update(-2);
+ // clear the selection
+ getScreen()->ToggleSelection();
+ text->ClearSelection();
+ update(-2);
}
}
-// candidate for move to BufferView
-void GotoNote()
+void BufferView::gotoNote()
{
- if (!current_view->getScreen())
- return;
+ if (!getScreen()) return;
- current_view->getScreen()->HideCursor();
- current_view->beforeChange();
- current_view->update(-2);
+ getScreen()->HideCursor();
+ beforeChange();
+ update(-2);
LyXCursor tmp;
- if (!current_view->text->GotoNextNote()) {
- if (current_view->text->cursor.pos
- || current_view->text->cursor.par !=
- current_view->text->FirstParagraph())
- {
- tmp = current_view->text->cursor;
- current_view->text->cursor.par =
- current_view->text->FirstParagraph();
- current_view->text->cursor.pos = 0;
- if (!current_view->text->GotoNextNote()) {
- current_view->text->cursor = tmp;
- current_view->owner()->getMiniBuffer()->Set(_("No more notes"));
+ if (!text->GotoNextNote()) {
+ if (text->cursor.pos
+ || text->cursor.par != text->FirstParagraph()) {
+ tmp = text->cursor;
+ text->cursor.par = text->FirstParagraph();
+ text->cursor.pos = 0;
+ if (!text->GotoNextNote()) {
+ text->cursor = tmp;
+ owner()->getMiniBuffer()->Set(_("No more notes"));
LyXBell();
}
} else {
- current_view->owner()->getMiniBuffer()->Set(_("No more notes"));
+ owner()->getMiniBuffer()->Set(_("No more notes"));
LyXBell();
}
}
- current_view->update(0);
- current_view->text->sel_cursor =
- current_view->text->cursor;
+ update(0);
+ text->sel_cursor = text->cursor;
}
-// candidate for move to BufferView
-void InsertCorrectQuote()
+void BufferView::insertCorrectQuote()
{
- Buffer * cbuffer = current_view->buffer();
char c;
- if (current_view->text->cursor.pos )
- c = current_view->text->cursor.par->GetChar(current_view->text->cursor.pos - 1);
+ if (text->cursor.pos)
+ c = text->cursor.par->GetChar(text->cursor.pos - 1);
else
c = ' ';
- cbuffer->insertInset(new InsetQuotes(c, cbuffer->params));
+ insertInset(new InsetQuotes(c, buffer()->params));
}
if (fl_get_button(fd_form_figure->radio_inline)
|| current_view->text->cursor.par->table) {
InsetFig * new_inset = new InsetFig(100, 20, buffer);
- buffer->insertInset(new_inset);
+ current_view->insertInset(new_inset);
current_view->owner()->getMiniBuffer()->Set(_("Figure inserted"));
new_inset->Edit(0, 0);
return;
current_view->update(-1);
Inset * new_inset = new InsetFig(100, 100, buffer);
- buffer->insertInset(new_inset);
+ current_view->insertInset(new_inset);
new_inset->Edit(0, 0);
current_view->update(0);
current_view->owner()->getMiniBuffer()->Set(_("Figure inserted"));
}
-// candidate for move to BufferView
/* these functions are for the spellchecker */
-char * NextWord(float & value)
+char * BufferView::nextWord(float & value)
{
- if (!current_view->available()){
+ if (!available()) {
value = 1;
return 0;
}
- char * string = current_view->text->SelectNextWord(value);
+ char * string = text->SelectNextWord(value);
return string;
}
-// candidate for move to BufferView
-void SelectLastWord()
+void BufferView::selectLastWord()
{
- if (!current_view->available())
- return;
+ if (!available()) return;
- current_view->getScreen()->HideCursor();
- current_view->beforeChange();
- current_view->text->SelectSelectedWord();
- current_view->getScreen()->ToggleSelection(false);
- current_view->update(0);
+ getScreen()->HideCursor();
+ beforeChange();
+ text->SelectSelectedWord();
+ getScreen()->ToggleSelection(false);
+ update(0);
}
-// candidate for move to BufferView
-void EndOfSpellCheck()
+void BufferView::endOfSpellCheck()
{
- if (!current_view->available())
- return;
+ if (!available()) return;
- current_view->getScreen()->HideCursor();
- current_view->beforeChange();
- current_view->text->SelectSelectedWord();
- current_view->text->ClearSelection();
- current_view->update(0);
+ getScreen()->HideCursor();
+ beforeChange();
+ text->SelectSelectedWord();
+ text->ClearSelection();
+ update(0);
}
-// candidate for move to BufferView
-void ReplaceWord(string const & replacestring)
+void BufferView::replaceWord(string const & replacestring)
{
- if (!current_view->getScreen())
- return;
+ if (!getScreen()) return;
- current_view->getScreen()->HideCursor();
- current_view->update(-2);
+ getScreen()->HideCursor();
+ update(-2);
/* clear the selection (if there is any) */
- current_view->getScreen()->ToggleSelection(false);
- current_view->update(-2);
+ getScreen()->ToggleSelection(false);
+ update(-2);
/* clear the selection (if there is any) */
- current_view->getScreen()->ToggleSelection(false);
- current_view->text->
- ReplaceSelectionWithString(replacestring.c_str());
+ getScreen()->ToggleSelection(false);
+ text->ReplaceSelectionWithString(replacestring.c_str());
- current_view->text->SetSelectionOverString(replacestring.c_str());
+ text->SetSelectionOverString(replacestring.c_str());
// Go back so that replacement string is also spellchecked
for (string::size_type i = 0; i < replacestring.length() + 1; ++i) {
- current_view->text->CursorLeftIntern();
+ text->CursorLeftIntern();
}
- current_view->update(1);
+ update(1);
}
// End of spellchecker stuff
Inset * new_inset =
new InsetRef(t, current_view->buffer());
- current_view->buffer()->insertInset(new_inset);
+ current_view->insertInset(new_inset);
}
}
-// candidate for move to BufferView
/* these functions return 1 if an error occured,
otherwise 0 */
-int LockInset(UpdatableInset * inset)
+int BufferView::lockInset(UpdatableInset * inset)
{
- if (!current_view->the_locking_inset && inset){
- current_view->the_locking_inset = inset;
+ if (!the_locking_inset && inset){
+ the_locking_inset = inset;
return 0;
}
return 1;
}
-// candidate for move to BufferView
-void ShowLockedInsetCursor(long x, long y, int asc, int desc)
+void BufferView::showLockedInsetCursor(long x, long y, int asc, int desc)
{
- if (current_view->the_locking_inset &&
- current_view->getScreen()){
- y += current_view->text->cursor.y;
- current_view->getScreen()->ShowManualCursor(x, y,
- asc, desc);
+ if (the_locking_inset && getScreen()) {
+ y += text->cursor.y;
+ getScreen()->ShowManualCursor(x, y,
+ asc, desc);
}
}
-// candidate for move to BufferView
-void HideLockedInsetCursor(long x, long y, int asc, int desc)
+void BufferView::hideLockedInsetCursor(long x, long y, int asc, int desc)
{
- if (current_view->the_locking_inset &&
- current_view->getScreen()){
- y += current_view->text->cursor.y;
- current_view->getScreen()->HideManualCursor(x, y,
- asc, desc);
+ if (the_locking_inset && getScreen()) {
+ y += text->cursor.y;
+ getScreen()->HideManualCursor(x, y,
+ asc, desc);
}
}
-// candidate for move to BufferView
-void FitLockedInsetCursor(long x, long y, int asc, int desc)
+void BufferView::fitLockedInsetCursor(long x, long y, int asc, int desc)
{
- if (current_view->the_locking_inset &&
- current_view->getScreen()){
- y += current_view->text->cursor.y;
- if (current_view->getScreen()->FitManualCursor(x, y, asc, desc))
- current_view->updateScrollbar();
+ if (the_locking_inset && getScreen()){
+ y += text->cursor.y;
+ if (getScreen()->FitManualCursor(x, y, asc, desc))
+ updateScrollbar();
}
}
-// candidate for move to BufferView
-int UnlockInset(UpdatableInset * inset)
+int BufferView::unlockInset(UpdatableInset * inset)
{
- if (inset &&
- current_view->the_locking_inset == inset){
+ if (inset && the_locking_inset == inset) {
inset->InsetUnlock();
- current_view->the_locking_inset = 0;
- current_view->text->FinishUndo();
+ the_locking_inset = 0;
+ text->FinishUndo();
return 0;
}
return bufferlist.unlockInset(inset);
}
-// candidate for move to BufferView
-void LockedInsetStoreUndo(Undo::undo_kind kind)
+void BufferView::lockedInsetStoreUndo(Undo::undo_kind kind)
{
- if (!current_view->the_locking_inset)
+ if (!the_locking_inset)
return; // shouldn't happen
if (kind == Undo::EDIT) // in this case insets would not be stored!
kind = Undo::FINISH;
- current_view->text->SetUndo(kind,
- current_view->text->cursor.par->
- ParFromPos(current_view->text->cursor.pos)->previous,
- current_view->text->cursor.par->
- ParFromPos(current_view->text->cursor.pos)->next);
+ text->SetUndo(kind,
+ text->cursor.par->
+ ParFromPos(text->cursor.pos)->previous,
+ text->cursor.par->
+ ParFromPos(text->cursor.pos)->next);
}
///
extern void FreeCB();
///
-extern void CutCB();
-///
-extern void PasteCB();
-///
-extern void CopyCB();
-///
-extern void NoteCB();
-///
extern void HtmlUrlCB();
///
extern void UrlCB();
///
struct InsetUpdateStruct {
///
- Inset* inset;
+ Inset * inset;
///
- InsetUpdateStruct* next;
+ InsetUpdateStruct * next;
};
#endif
extern void AutoSave();
extern void MenuSearch();
-extern void CopyCB();
-extern void CopyEnvironmentCB();
-extern void PasteEnvironmentCB();
-extern void GotoNote();
-extern void NoteCB();
-extern void OpenStuff();
-extern void HyphenationPoint();
-extern void Ldots();
-extern void EndOfSentenceDot();
-extern void MenuSeparator();
-extern void HFill();
-extern void MenuUndo();
-extern void MenuRedo();
extern void SetUpdateTimer(float timer = 0.3);
extern void FreeUpdateTimer();
extern bool MenuPreview(Buffer *);
extern int current_layout;
extern int getISOCodeFromLaTeX(char *);
-extern int UnlockInset(UpdatableInset *);
+//extern int UnlockInset(UpdatableInset *);
extern void ShowLatexLog();
if (owner->view()->available() &&
owner->view()->the_locking_inset &&
keysym_return == XK_Escape) {
- UnlockInset(owner->view()->the_locking_inset);
+ owner->view()->unlockInset(owner->view()->the_locking_inset);
owner->view()->text->CursorRight();
return 0;
}
UpdatableInset * inset =
owner->view()->the_locking_inset;
inset->GetCursorPos(slx, sly);
- UnlockInset(inset);
- MenuUndo();
+ owner->view()->unlockInset(inset);
+ owner->view()->menuUndo();
inset = static_cast<UpdatableInset*>(owner->view()->text->cursor.par->GetInset(owner->view()->text->cursor.pos));
if (inset)
inset->Edit(slx, sly);
int slx, sly;
UpdatableInset * inset = owner->view()->the_locking_inset;
inset->GetCursorPos(slx, sly);
- UnlockInset(inset);
- MenuRedo();
+ owner->view()->unlockInset(inset);
+ owner->view()->menuRedo();
inset = static_cast<UpdatableInset*>(owner->view()->text->cursor.par->GetInset(owner->view()->text->cursor.pos));
if (inset)
inset->Edit(slx, sly);
case LFUN_TOC_INSERT:
{
Inset * new_inset = new InsetTOC(owner->buffer());
- owner->buffer()->insertInset(new_inset, "Standard", true);
+ owner->view()->insertInset(new_inset, "Standard", true);
break;
}
case LFUN_LOF_INSERT:
{
Inset * new_inset = new InsetLOF(owner->buffer());
- owner->buffer()->insertInset(new_inset, "Standard", true);
+ owner->view()->insertInset(new_inset, "Standard", true);
break;
}
case LFUN_LOA_INSERT:
{
Inset * new_inset = new InsetLOA(owner->buffer());
- owner->buffer()->insertInset(new_inset, "Standard", true);
+ owner->view()->insertInset(new_inset, "Standard", true);
break;
}
case LFUN_LOT_INSERT:
{
Inset * new_inset = new InsetLOT(owner->buffer());
- owner->buffer()->insertInset(new_inset, "Standard", true);
+ owner->view()->insertInset(new_inset, "Standard", true);
break;
}
break;
case LFUN_UNDO:
- MenuUndo();
+ owner->view()->menuUndo();
break;
case LFUN_REDO:
- MenuRedo();
+ owner->view()->menuRedo();
break;
case LFUN_MENUSEARCH:
break;
case LFUN_PASTE:
- PasteCB();
+ owner->view()->paste();
break;
case LFUN_PASTESELECTION:
}
case LFUN_CUT:
- CutCB();
+ owner->view()->cut();
break;
case LFUN_COPY:
- CopyCB();
+ owner->view()->copy();
break;
case LFUN_LAYOUT_COPY:
- CopyEnvironmentCB();
+ owner->view()->copyEnvironment();
break;
case LFUN_LAYOUT_PASTE:
- PasteEnvironmentCB();
+ owner->view()->pasteEnvironment();
break;
case LFUN_GOTOERROR:
break;
case LFUN_REMOVEERRORS:
- if (owner->buffer()->removeAutoInsets()) {
+ if (owner->view()->removeAutoInsets()) {
owner->view()->redraw();
owner->view()->fitCursor();
owner->view()->updateScrollbar();
break;
case LFUN_GOTONOTE:
- GotoNote();
+ owner->view()->gotoNote();
break;
case LFUN_OPENSTUFF:
- OpenStuff();
+ owner->view()->openStuff();
break;
case LFUN_HYPHENATION:
- HyphenationPoint();
+ owner->view()->hyphenationPoint();
break;
case LFUN_LDOTS:
- Ldots();
+ owner->view()->ldots();
break;
case LFUN_END_OF_SENTENCE:
- EndOfSentenceDot();
+ owner->view()->endOfSentenceDot();
break;
case LFUN_MENU_SEPARATOR:
- MenuSeparator();
+ owner->view()->menuSeparator();
break;
case LFUN_HFILL:
- HFill();
+ owner->view()->hfill();
break;
case LFUN_DEPTH:
if (!label.empty()) {
owner->view()->savePosition();
- owner->buffer()->gotoLabel(label.c_str());
+ owner->view()->gotoLabel(label.c_str());
}
}
break;
// just comment out the lone below...
owner->view()->getScreen()->ShowCursor();
} else {
- CutCB();
+ owner->view()->cut();
}
SetUpdateTimer();
break;
owner->view()->smallUpdate(1);
}
} else {
- CutCB();
+ owner->view()->cut();
}
SetUpdateTimer();
}
owner->view()->getScreen()->ShowCursor();
}
} else {
- CutCB();
+ owner->view()->cut();
}
SetUpdateTimer();
}
owner->view()->smallUpdate (1);
}
} else
- CutCB();
+ owner->view()->cut();
SetUpdateTimer();
}
break;
new_inset = new InsetUrl("htmlurl", "", "");
else
new_inset = new InsetUrl("url", "", "");
- owner->buffer()->insertInset(new_inset);
+ owner->view()->insertInset(new_inset);
new_inset->Edit(0, 0);
}
break;
owner->view()->buffer(bufferlist.loadLyXFile(s));
// Set the cursor
- owner->buffer()->setCursorFromRow(row);
+ owner->view()->setCursorFromRow(row);
// Recenter screen
owner->view()->beforeChange();
case LFUN_INSERT_MATRIX:
{
if (owner->view()->available()) {
- owner->buffer()->
+ owner->view()->
open_new_inset(new InsetFormula(false));
owner->view()->
the_locking_inset->LocalDispatch(action, argument.c_str());
case LFUN_MATH_DISPLAY:
{
if (owner->view()->available())
- owner->buffer()->open_new_inset(new InsetFormula(true));
+ owner->view()->open_new_inset(new InsetFormula(true));
break;
}
else {
string s1 = token(s, ' ', 1);
int na = s1.empty() ? 0: atoi(s1.c_str());
- owner->buffer()->
+ owner->view()->
open_new_inset(new InsetFormulaMacro(token(s, ' ', 0), na));
}
}
{
if (owner->view()->available())
- owner->buffer()->open_new_inset(new InsetFormula);
+ owner->view()->open_new_inset(new InsetFormula);
setMessage(N_("Math editor mode"));
}
break;
new_inset->setOptions(token(lsarg, '|', 1));
} else
new_inset->setContents(lsarg);
- owner->buffer()->insertInset(new_inset);
+ owner->view()->insertInset(new_inset);
} else {
- owner->buffer()->insertInset(new_inset);
+ owner->view()->insertInset(new_inset);
new_inset->Edit(0, 0);
}
}
bibstyle,
owner->buffer());
- owner->buffer()->insertInset(new_inset);
+ owner->view()->insertInset(new_inset);
if (lsarg.empty()) {
new_inset->Edit(0, 0);
}
if (!argument.empty()) {
string lsarg(argument);
new_inset->setContents(lsarg);
- owner->buffer()->insertInset(new_inset);
+ owner->view()->insertInset(new_inset);
} else {
//reh 98/09/21
//get the current word for an argument
//put the new inset into the buffer.
// there should be some way of knowing the user
//cancelled & avoiding this, but i don't know how
- owner->buffer()->insertInset(new_inset);
+ owner->view()->insertInset(new_inset);
}
}
break;
case LFUN_INDEX_PRINT:
{
Inset * new_inset = new InsetPrintIndex(owner->buffer());
- owner->buffer()->insertInset(new_inset, "Standard", true);
+ owner->view()->insertInset(new_inset, "Standard", true);
}
break;
{
lyxerr << "arg " << argument << endl;
Inset * new_inset = new InsetParent(argument, owner->buffer());
- owner->buffer()->insertInset(new_inset, "Standard", true);
+ owner->view()->insertInset(new_inset, "Standard", true);
}
break;
{
Inset * new_inset = new InsetInclude(argument,
owner->buffer());
- owner->buffer()->insertInset(new_inset, "Standard", true);
+ owner->view()->insertInset(new_inset, "Standard", true);
new_inset->Edit(0, 0);
}
break;
break;
case LFUN_INSERT_NOTE:
- NoteCB();
+ owner->view()->insertNote();
break;
case LFUN_INSERTFOOTNOTE:
// Inserts document
owner->getMiniBuffer()->Set(_("Inserting document"),
MakeDisplayPath(filename), "...");
- bool res = owner->buffer()->insertLyXFile(filename);
+ bool res = owner->view()->insertLyXFile(filename);
if (res) {
owner->getMiniBuffer()->Set(_("Document"),
MakeDisplayPath(filename),
#include "LyXView.h"
extern void UpdateInset(Inset * inset, bool mark_dirty = true);
-extern void LockedInsetStoreUndo(Undo::undo_kind);
-extern void ShowLockedInsetCursor(long, long, int, int);
-extern void HideLockedInsetCursor(long, long, int, int);
-extern void FitLockedInsetCursor(long, long, int, int);
-extern int LockInset(UpdatableInset *);
-extern int UnlockInset(UpdatableInset *);
+//extern void LockedInsetStoreUndo(Undo::undo_kind);
+//extern void ShowLockedInsetCursor(long, long, int, int);
+//extern void HideLockedInsetCursor(long, long, int, int);
+//extern void FitLockedInsetCursor(long, long, int, int);
+//extern int LockInset(UpdatableInset *);
+//extern int UnlockInset(UpdatableInset *);
extern GC canvasGC, mathGC, mathLineGC, latexGC, cursorGC, mathFrameGC;
void InsetFormula::Edit(int x, int y)
{
mathcursor = new MathedCursor(par);
- LockInset(this);
+ current_view->lockInset(this);
par->Metrics();
UpdateInset(this, false);
x += par->xo;
desc = font.maxDescent();
if (cursor_visible)
- HideLockedInsetCursor(x, y, asc, desc);
+ current_view->hideLockedInsetCursor(x, y, asc, desc);
else
- ShowLockedInsetCursor(x, y, asc, desc);
+ current_view->showLockedInsetCursor(x, y, asc, desc);
cursor_visible = !cursor_visible;
}
LyXFont font = WhichFont(LM_TC_TEXTRM, LM_ST_TEXT);
asc = font.maxAscent();
desc = font.maxDescent();
- FitLockedInsetCursor(x, y, asc, desc);
+ current_view->fitLockedInsetCursor(x, y, asc, desc);
}
ToggleInsetCursor();
}
mathcursor->End();
break;
case LFUN_DELETE_LINE_FORWARD:
- //LockedInsetStoreUndo(Undo::INSERT);
- LockedInsetStoreUndo(Undo::DELETE);
+ //current_view->lockedInsetStoreUndo(Undo::INSERT);
+ current_view->lockedInsetStoreUndo(Undo::DELETE);
mathcursor->DelLine();
UpdateLocal();
break;
case LFUN_BREAKLINE:
- LockedInsetStoreUndo(Undo::INSERT);
+ current_view->lockedInsetStoreUndo(Undo::INSERT);
mathcursor->Insert(' ', LM_TC_CR);
par = mathcursor->GetPar();
UpdateLocal();
break;
case LFUN_TAB:
- LockedInsetStoreUndo(Undo::INSERT);
+ current_view->lockedInsetStoreUndo(Undo::INSERT);
mathcursor->Insert(0, LM_TC_TAB);
//UpdateInset(this);
break;
case LFUN_TABINSERT:
- LockedInsetStoreUndo(Undo::INSERT);
+ current_view->lockedInsetStoreUndo(Undo::INSERT);
mathcursor->Insert('T', LM_TC_TAB);
UpdateLocal();
break;
}
case LFUN_DELETE:
- //LockedInsetStoreUndo(Undo::INSERT);
- LockedInsetStoreUndo(Undo::DELETE);
+ //current_view->lockedInsetStoreUndo(Undo::INSERT);
+ current_view->lockedInsetStoreUndo(Undo::DELETE);
mathcursor->Delete();
UpdateInset(this);
break;
case LFUN_PASTE:
if (was_macro)
mathcursor->MacroModeClose();
- LockedInsetStoreUndo(Undo::INSERT);
+ current_view->lockedInsetStoreUndo(Undo::INSERT);
mathcursor->SelPaste(); UpdateLocal(); break;
case LFUN_CUT:
- LockedInsetStoreUndo(Undo::DELETE);
+ current_view->lockedInsetStoreUndo(Undo::DELETE);
mathcursor->SelCut(); UpdateLocal(); break;
case LFUN_COPY: mathcursor->SelCopy(); break;
case LFUN_HOMESEL:
case LFUN_MATH_NUMBER:
{
- LockedInsetStoreUndo(Undo::INSERT);
+ current_view->lockedInsetStoreUndo(Undo::INSERT);
if (disp_flag) {
short type = par->GetType();
bool oldf = (type == LM_OT_PARN || type == LM_OT_MPARN);
case LFUN_MATH_LIMITS:
{
- LockedInsetStoreUndo(Undo::INSERT);
+ current_view->lockedInsetStoreUndo(Undo::INSERT);
if (mathcursor->Limits())
UpdateLocal();
}
case LFUN_INSERT_MATH:
{
- LockedInsetStoreUndo(Undo::INSERT);
+ current_view->lockedInsetStoreUndo(Undo::INSERT);
InsertSymbol(arg);
break;
}
case LFUN_INSERT_MATRIX:
{
- LockedInsetStoreUndo(Undo::INSERT);
+ current_view->lockedInsetStoreUndo(Undo::INSERT);
int k, m, n;
char s[80], arg2[80];
// This is just so that too long args won't ooze out of s.
case LFUN_MATH_DELIM:
{
- LockedInsetStoreUndo(Undo::INSERT);
+ current_view->lockedInsetStoreUndo(Undo::INSERT);
char lf[40], rg[40], arg2[40];
int ilf = '(', irg = '.';
latexkeys * l;
case LFUN_PROTECTEDSPACE:
{
- LockedInsetStoreUndo(Undo::INSERT);
+ current_view->lockedInsetStoreUndo(Undo::INSERT);
sp = new MathSpaceInset(1);
mathcursor->Insert(sp);
space_on = true;
case LFUN_INSERT_LABEL:
{
- LockedInsetStoreUndo(Undo::INSERT);
+ current_view->lockedInsetStoreUndo(Undo::INSERT);
if (par->GetType() < LM_OT_PAR) break;
string lb = arg;
if (lb.empty()) {
}
case LFUN_MATH_DISPLAY:
- //LockedInsetStoreUndo(Undo::INSERT);
- LockedInsetStoreUndo(Undo::EDIT);
+ //current_view->lockedInsetStoreUndo(Undo::INSERT);
+ current_view->lockedInsetStoreUndo(Undo::EDIT);
display(!disp_flag);
UpdateLocal();
break;
default:
if ((action == -1 || action == LFUN_SELFINSERT) && arg) {
unsigned char c = arg[0];
- LockedInsetStoreUndo(Undo::INSERT);
+ current_view->lockedInsetStoreUndo(Undo::INSERT);
if (c == ' ' && mathcursor->getAccent() == LM_hat) {
c = '^';
if (result)
ShowInsetCursor();
else
- UnlockInset(this);
+ current_view->unlockInset(this);
return result;
}
#include "math_panel.h"
#include "math_parser.h"
-extern void Update(signed char);
-extern int UnlockInset(UpdatableInset *);
+//extern void Update(signed char);
+//extern int UnlockInset(UpdatableInset *);
extern short greek_kb_flag;
extern BufferView * current_view;
math_insert_symbol(s);
if (greek_kb_flag<2) {
greek_kb_flag = 0;
- UnlockInset(current_view->the_locking_inset);
+ current_view->unlockInset(current_view->the_locking_inset);
}
return True;
} else
return False;
}
-void math_insert_symbol(char const* s)
+
+void math_insert_symbol(char const * s)
{
if (current_view->available()) {
if (!current_view->the_locking_inset) {
InsetFormula * new_inset = new InsetFormula();
current_view->beforeChange();
- current_view->buffer()->insertInset(new_inset);
+ current_view->insertInset(new_inset);
// Update(1);//BUG
new_inset->Edit(0, 0);
new_inset->InsertSymbol(s);
}
}
+
BitmapMenu * sym_menu= 0;
void create_symbol_menues(FD_panel * symb_form)
extern void show_symbols_form(LyXFunc *);
extern void ProhibitInput();
extern void AllowInput();
-extern void OpenStuff();
-extern void ToggleFloat();
-extern void AllFloats(char flag, char figmar);
extern void LaTeXOptions();
// A bunch of wrappers
case 17: tmpfunc->Dispatch(LFUN_PASTESELECTION, "paragraph"); break;
// floats & insets sub-menu
- case 21: ToggleFloat(); break;
+ case 21: men->currentView()->toggleFloat(); break;
case 22: tmpfunc->Dispatch(LFUN_MELT); break;
- case 23: AllFloats(1, 0); break;
- case 24: AllFloats(0, 0); break;
- case 25: AllFloats(1, 1); break;
- case 26: AllFloats(0, 1); break;
+ case 23: men->currentView()->allFloats(1, 0); break;
+ case 24: men->currentView()->allFloats(0, 0); break;
+ case 25: men->currentView()->allFloats(1, 1); break;
+ case 26: men->currentView()->allFloats(0, 1); break;
case 27: tmpfunc->Dispatch(LFUN_REMOVEERRORS); break;
case 31: tmpfunc->Dispatch(LFUN_TABLE); break;
if (obj == fd_form_spell_check->done) break;
}
fl_hide_form(fd_form_spell_check->form_spell_check);
- EndOfSpellCheck();
+ current_view->endOfSpellCheck();
return;
}
ispell_terse_mode();
while (true) {
- word = NextWord(newval);
+ word = current_view->nextWord(newval);
if (word == 0) break;
word_count++;
switch (result->flag) {
case ISP_UNKNOWN:
case ISP_MISSED:
- SelectLastWord();
+ current_view->selectLastWord();
fl_set_object_label(fd_form_spell_check->text, word);
fl_set_input(fd_form_spell_check->input, word);
fl_clear_browser(fd_form_spell_check->browser);
if (obj == fd_form_spell_check->replace ||
obj == fd_form_spell_check->input) {
ispell_store_replacement(word, fl_get_input(fd_form_spell_check->input));
- ReplaceWord(fl_get_input(fd_form_spell_check->input));
+ current_view->replaceWord(fl_get_input(fd_form_spell_check->input));
break;
}
if (obj == fd_form_spell_check->browser) {
if (clickline ==
fl_get_browser(fd_form_spell_check->browser)) {
ispell_store_replacement(word, fl_get_input(fd_form_spell_check->input));
- ReplaceWord(fl_get_input(fd_form_spell_check->input));
+ current_view->replaceWord(fl_get_input(fd_form_spell_check->input));
break;
}
clickline = fl_get_browser(fd_form_spell_check->browser);
/* These functions are defined in lyx_cb.C */
-/** The returned word has to be deleted manually
- */
-char * NextWord(float & value);
-
/** MarkLastWord should only be used immidiately after NextWord().
If you give control back to the user, you _have_ to call EndOfSpellCheck()
or SelectLastWord(), otherwise segfaults should appear.
*/
-void EndOfSpellCheck();
+//void EndOfSpellCheck();
///
-void SelectLastWord();
-///
-void ReplaceWord(string const & replacestringstring);
-
+//void SelectLastWord();
/** This function has to be implemented by the spell checker.
It will show the spellcheker form*/
public:
typedef T value_type;
typedef size_t size_type;
- typedef value_type * pointer;
- typedef value_type const * const_pointer;
- typedef value_type & reference;
- typedef value_type const & const_reference;
- typedef value_type * iterator;
- typedef value_type const * const_iterator;
+ typedef T * pointer;
+ typedef T const * const_pointer;
+ typedef T & reference;
+ typedef T const & const_reference;
+ typedef T * iterator;
+ typedef T const * const_iterator;
size_type size() const { return s; }
+ operator T* () { return arr; }
+ reference at(int i) {
+ Assert(i >= 0 && i < s);
+ return arr[i];
+ }
+ const_reference at(int i) const {
+ Assert(i >= 0 && i < s);
+ return arr[i];
+ }
reference operator[](int i) { return arr[i]; }
const_reference operator[](int i) const { return arr[i]; }
void operator=(block const & b) {
const_iterator begin() const { return arr[0]; }
const_iterator end() const { return arr[s]; }
private:
- value_type arr[s + 1];
+ T arr[s];
};
#endif // BLOCK_H_
// Is doing a getenv() and a free() of the older value
// a good idea? (JMarc)
// Actually we don't have to leak...calling putenv like this
- // should be enough:
+ // should be enough: ... and this is obviously not enough if putenv
+ // does not make a copy of the string. It is also not very wise to
+ // put a string on the free store. If we have to leak we should do it
+ // like this:
+ /*
+ char * leaker = new char[envstr.length() + 1];
+ envstr.copy(leaker, envstr.length());
+ leaker[envstr.length()] = '\0';
+ int retval = putenv(const_cast<PUTENV_TYPE_ARG>(leaker));
+ */
+
+ // If putenv does not make a copy of the char const * this
+ // is very dangerous. OTOH if it does take a copy this is the
+ // best solution.
int retval = putenv(const_cast<PUTENV_TYPE_ARG>(envstr.c_str()));
- //int retval = putenv(const_cast<PUTENV_TYPE_ARG>((new string(envstr))->c_str()));
#else
#ifdef HAVE_SETENV
string varname;
char str[30];
ostrstream oss(str, 30);
oss << i << '\0';
+ return oss.str();
#else
ostringstream oss;
oss << i;
+ return oss.str().c_str();
#endif
- return oss.str();
}
char str[30];
ostrstream oss(str, 30);
oss << i << '\0';
+ return oss.str();
#else
ostringstream oss;
oss << i;
+ return oss.str().c_str();
#endif
- return oss.str();
}
char tmp[40];
ostrstream oss(tmp, 40);
oss << d << '\0';
+ return oss.str();
#else
ostringstream oss;
oss << d;
+ return oss.str().c_str();
#endif
- return oss.str();
}
extern int reverse_video;
extern int fast_selection;
extern BufferView * current_view;
-extern int UnlockInset(UpdatableInset * inset);
+//extern int UnlockInset(UpdatableInset * inset);
// ale070405
extern int bibitemMaxWidth(LyXFont const &);
}
case LyXTable::DELETE_ROW:
if (current_view->the_locking_inset)
- UnlockInset(current_view->the_locking_inset);
+ current_view->unlockInset(current_view->the_locking_inset);
RemoveTableRow(&cursor);
RedoParagraph();
return;
int cell_org = actCell;
int cell = 0;
if (current_view->the_locking_inset)
- UnlockInset(current_view->the_locking_inset);
+ current_view->unlockInset(current_view->the_locking_inset);
do {
if (!pos || (cursor.par->IsNewline(pos-1))){
if (cursor.par->table->DeleteCellIfColumnIsDeleted(cell, cell_org)){
// Set font
SetFont(font, toggleall);
- //current_view->owner()->getMiniBuffer()->Set(_("Font style changed"));
/* Implicit selections are cleared afterwards and cursor is set to the
original position. */
extern LyXRC * lyxrc;
extern string DoAccent(string const &, tex_accent);
-extern void InsertCorrectQuote();
extern string DoAccent(char, tex_accent);
extern BufferView * current_view;
if (str[i] == '\"'
&& text->GetFont(text->cursor.par,
text->cursor.pos).latex() == LyXFont::OFF)
- InsertCorrectQuote();
+ current_view->insertCorrectQuote();
else
text->InsertChar(str[i]);
}